winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
919 discussions
Start a n
N
ew thread
Roderick Colenbrander : wined3d: Use draw_textured_quad in BltOverride.
by Alexandre Julliard
19 Mar '10
19 Mar '10
Module: wine Branch: master Commit: fd99ab78c25f37c66151773f042f5b14c0d88b39 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd99ab78c25f37c66151773f0…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Thu Mar 18 22:03:27 2010 +0100 wined3d: Use draw_textured_quad in BltOverride. --- dlls/wined3d/surface.c | 46 +------------------------------------ dlls/wined3d/utils.c | 50 ---------------------------------------- dlls/wined3d/wined3d_private.h | 2 - 3 files changed, 1 insertions(+), 97 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index c24a5e4..acc24e5 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3964,7 +3964,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const return WINED3D_OK; } else if(Src) { /* Blit from offscreen surface to render target */ - float glTexCoord[4]; DWORD oldCKeyFlags = Src->CKeyFlags; WINEDDCOLORKEY oldBltCKey = Src->SrcBltCKey; struct wined3d_context *context; @@ -4014,14 +4013,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const return WINED3D_OK; } - if(!CalculateTexRect(Src, &SourceRectangle, glTexCoord)) { - /* Fall back to software */ - WARN("(%p) Source texture area (%d,%d)-(%d,%d) is too big\n", Src, - SourceRectangle.left, SourceRectangle.top, - SourceRectangle.right, SourceRectangle.bottom); - return WINED3DERR_INVALIDCALL; - } - /* Color keying: Check if we have to do a color keyed blt, * and if not check if a color key is activated. * @@ -4083,22 +4074,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const ENTER_GL(); - /* Bind the texture */ - glBindTexture(Src->texture_target, Src->texture_name); - checkGLcall("glBindTexture"); - - /* Filtering for StretchRect */ - glTexParameteri(Src->texture_target, GL_TEXTURE_MAG_FILTER, - wined3d_gl_mag_filter(magLookup, Filter)); - checkGLcall("glTexParameteri"); - glTexParameteri(Src->texture_target, GL_TEXTURE_MIN_FILTER, - wined3d_gl_min_mip_filter(minMipLookup, Filter, WINED3DTEXF_NONE)); - checkGLcall("glTexParameteri"); - glTexParameteri(Src->texture_target, GL_TEXTURE_WRAP_S, GL_CLAMP); - glTexParameteri(Src->texture_target, GL_TEXTURE_WRAP_T, GL_CLAMP); - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - checkGLcall("glTexEnvi"); - /* This is for color keying */ if(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) { glEnable(GL_ALPHA_TEST); @@ -4119,32 +4094,13 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const /* Draw a textured quad */ - glBegin(GL_QUADS); - - glColor3f(1.0f, 1.0f, 1.0f); - glTexCoord2f(glTexCoord[0], glTexCoord[2]); - glVertex3f(rect.x1, rect.y1, 0.0f); - - glTexCoord2f(glTexCoord[0], glTexCoord[3]); - glVertex3f(rect.x1, rect.y2, 0.0f); - - glTexCoord2f(glTexCoord[1], glTexCoord[3]); - glVertex3f(rect.x2, rect.y2, 0.0f); - - glTexCoord2f(glTexCoord[1], glTexCoord[2]); - glVertex3f(rect.x2, rect.y1, 0.0f); - - glEnd(); - checkGLcall("glEnd"); + draw_textured_quad(Src, &SourceRectangle, (RECT*)&rect, Filter); if(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) { glDisable(GL_ALPHA_TEST); checkGLcall("glDisable(GL_ALPHA_TEST)"); } - glBindTexture(Src->texture_target, 0); - checkGLcall("glBindTexture(Src->texture_target, 0)"); - /* Restore the color key parameters */ Src->CKeyFlags = oldCKeyFlags; Src->SrcBltCKey = oldBltCKey; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 73091ff..19d5949 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -2258,56 +2258,6 @@ DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) { return size; } -/*********************************************************************** - * CalculateTexRect - * - * Calculates the dimensions of the opengl texture used for blits. - * Handled oversized opengl textures and updates the source rectangle - * accordingly - * - * Params: - * This: Surface to operate on - * Rect: Requested rectangle - * - * Returns: - * TRUE if the texture part can be loaded, - * FALSE otherwise - * - *********************************************************************/ -BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4]) -{ - int x1 = Rect->left, x2 = Rect->right; - int y1 = Rect->top, y2 = Rect->bottom; - - TRACE("(%p)->(%d,%d)-(%d,%d)\n", This, - Rect->left, Rect->top, Rect->right, Rect->bottom); - - /* The sizes might be reversed */ - if(Rect->left > Rect->right) { - x1 = Rect->right; - x2 = Rect->left; - } - if(Rect->top > Rect->bottom) { - y1 = Rect->bottom; - y2 = Rect->top; - } - - /* Which rect from the texture do I need? */ - if (This->texture_target == GL_TEXTURE_RECTANGLE_ARB) - { - glTexCoord[0] = (float) Rect->left; - glTexCoord[2] = (float) Rect->top; - glTexCoord[1] = (float) Rect->right; - glTexCoord[3] = (float) Rect->bottom; - } else { - glTexCoord[0] = (float) Rect->left / (float) This->pow2Width; - glTexCoord[2] = (float) Rect->top / (float) This->pow2Height; - glTexCoord[1] = (float) Rect->right / (float) This->pow2Width; - glTexCoord[3] = (float) Rect->bottom / (float) This->pow2Height; - } - return TRUE; -} - void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_settings *settings, BOOL ignore_textype) { #define ARG1 0x01 #define ARG2 0x02 diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 7ac0665..091e85d 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2202,8 +2202,6 @@ void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) DECLSPE SFLAG_DS_OFFSCREEN) #define SFLAG_DS_DISCARDED SFLAG_DS_LOCATIONS -BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4]) DECLSPEC_HIDDEN; - typedef enum { NO_CONVERSION, CONVERT_PALETTED,
1
0
0
0
Roderick Colenbrander : wined3d: Add a helper function for drawing a textured quad.
by Alexandre Julliard
19 Mar '10
19 Mar '10
Module: wine Branch: master Commit: 4bd627cc7f4f613eea640bed1379f1ad61c0a7f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4bd627cc7f4f613eea640bed1…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Wed Mar 17 13:56:18 2010 +0100 wined3d: Add a helper function for drawing a textured quad. --- dlls/wined3d/surface.c | 124 ++++++++++++++++++++++++++++-------------------- 1 files changed, 72 insertions(+), 52 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d55b73c..c24a5e4 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -273,6 +273,62 @@ static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w, } } +/* GL locking and context activation is done by the caller */ +static void draw_textured_quad(IWineD3DSurfaceImpl *src_surface, const RECT *src_rect, const RECT *dst_rect, WINED3DTEXTUREFILTERTYPE Filter) +{ + IWineD3DBaseTextureImpl *texture; + struct blt_info info; + + surface_get_blt_info(src_surface->texture_target, src_rect, src_surface->pow2Width, src_surface->pow2Height, &info); + + glEnable(info.bind_target); + checkGLcall("glEnable(bind_target)"); + + /* Bind the texture */ + glBindTexture(info.bind_target, src_surface->texture_name); + checkGLcall("glBindTexture"); + + /* Filtering for StretchRect */ + glTexParameteri(info.bind_target, GL_TEXTURE_MAG_FILTER, + wined3d_gl_mag_filter(magLookup, Filter)); + checkGLcall("glTexParameteri"); + glTexParameteri(info.bind_target, GL_TEXTURE_MIN_FILTER, + wined3d_gl_min_mip_filter(minMipLookup, Filter, WINED3DTEXF_NONE)); + checkGLcall("glTexParameteri"); + glTexParameteri(info.bind_target, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(info.bind_target, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + checkGLcall("glTexEnvi"); + + /* Draw a quad */ + glBegin(GL_TRIANGLE_STRIP); + glTexCoord3fv(info.coords[0]); + glVertex2i(dst_rect->left, dst_rect->top); + + glTexCoord3fv(info.coords[1]); + glVertex2i(dst_rect->right, dst_rect->top); + + glTexCoord3fv(info.coords[2]); + glVertex2i(dst_rect->left, dst_rect->bottom); + + glTexCoord3fv(info.coords[3]); + glVertex2i(dst_rect->right, dst_rect->bottom); + glEnd(); + + /* Unbind the texture */ + glBindTexture(info.bind_target, 0); + checkGLcall("glBindTexture(info->bind_target, 0)"); + + /* We changed the filtering settings on the texture. Inform the + * container about this to get the filters reset properly next draw. */ + if (SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface *)src_surface, &IID_IWineD3DBaseTexture, (void **)&texture))) + { + texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT; + texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; + texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE; + IWineD3DBaseTexture_Release((IWineD3DBaseTexture *)texture); + } +} HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, UINT alignment, UINT width, UINT height, UINT level, BOOL lockable, BOOL discard, WINED3DMULTISAMPLE_TYPE multisample_type, @@ -4733,73 +4789,37 @@ static void WINAPI IWineD3DSurfaceImpl_ModifyLocation(IWineD3DSurface *iface, DW static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT *rect_in) { IWineD3DDeviceImpl *device = This->resource.device; - IWineD3DBaseTextureImpl *texture; struct wined3d_context *context; - RECT rect; - struct blt_info info; + RECT src_rect, dst_rect; if(rect_in) { - rect = *rect_in; + src_rect = *rect_in; } else { - rect.left = 0; - rect.top = 0; - rect.right = This->currentDesc.Width; - rect.bottom = This->currentDesc.Height; + src_rect.left = 0; + src_rect.top = 0; + src_rect.right = This->currentDesc.Width; + src_rect.bottom = This->currentDesc.Height; } - surface_get_blt_info(This->texture_target, &rect, This->pow2Width, This->pow2Height, &info); - context = context_acquire(device, (IWineD3DSurface*)This, CTXUSAGE_BLIT); - - ENTER_GL(); - - glEnable(info.bind_target); - checkGLcall("glEnable(bind_target)"); - glBindTexture(info.bind_target, This->texture_name); - checkGLcall("glBindTexture(bind_target, This->texture_name)"); - glTexParameteri(info.bind_target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri"); - glTexParameteri(info.bind_target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - checkGLcall("glTexParameteri"); - if (context->render_offscreen) { - LONG tmp = rect.top; - rect.top = rect.bottom; - rect.bottom = tmp; + dst_rect.left = src_rect.left; + dst_rect.right = src_rect.right; + dst_rect.top = src_rect.bottom; + dst_rect.bottom = src_rect.top; + } + else + { + dst_rect = src_rect; } - glBegin(GL_TRIANGLE_STRIP); - glTexCoord3fv(info.coords[0]); - glVertex2i(rect.left, rect.top); - - glTexCoord3fv(info.coords[1]); - glVertex2i(rect.right, rect.top); - - glTexCoord3fv(info.coords[2]); - glVertex2i(rect.left, rect.bottom); - - glTexCoord3fv(info.coords[3]); - glVertex2i(rect.right, rect.bottom); - glEnd(); - - glDisable(info.bind_target); - checkGLcall("glDisable(bind_target)"); - + ENTER_GL(); + draw_textured_quad(This, &src_rect, &dst_rect, WINED3DTEXF_POINT); LEAVE_GL(); wglFlush(); /* Flush to ensure ordering across contexts. */ - /* We changed the filtering settings on the texture. Inform the - * container about this to get the filters reset properly next draw. */ - if (SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface *)This, &IID_IWineD3DBaseTexture, (void **)&texture))) - { - texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT; - texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT; - texture->baseTexture.texture_rgb.states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE; - IWineD3DBaseTexture_Release((IWineD3DBaseTexture *)texture); - } - context_release(context); }
1
0
0
0
Francois Gouget : server: Don't include winsock. h to avoid creating a dependency on generated headers.
by Alexandre Julliard
19 Mar '10
19 Mar '10
Module: wine Branch: master Commit: bc8d21b5d7bb7735ed0d140744cb9b1655f776f9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc8d21b5d7bb7735ed0d14074…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Mar 19 10:16:04 2010 +0100 server: Don't include winsock.h to avoid creating a dependency on generated headers. The dependency does not really exist thanks to various #ifdefs, but makedep does not know that and records it which causes a build failure. --- server/sock.c | 32 ++++++++++++++++++++++++++++---- 1 files changed, 28 insertions(+), 4 deletions(-) diff --git a/server/sock.c b/server/sock.c index ed89ca2..5eaed6b 100644 --- a/server/sock.c +++ b/server/sock.c @@ -51,6 +51,7 @@ #define WIN32_NO_STATUS #include "windef.h" #include "winternl.h" +#include "winerror.h" #include "process.h" #include "file.h" @@ -59,11 +60,34 @@ #include "request.h" #include "user.h" -/* To avoid conflicts with the Unix socket headers. Plus we only need a few - * macros anyway. +/* From winsock.h */ +#define FD_MAX_EVENTS 10 +#define FD_READ_BIT 0 +#define FD_WRITE_BIT 1 +#define FD_OOB_BIT 2 +#define FD_ACCEPT_BIT 3 +#define FD_CONNECT_BIT 4 +#define FD_CLOSE_BIT 5 + +/* + * Define flags to be used with the WSAAsyncSelect() call. */ -#define USE_WS_PREFIX -#include "winsock2.h" +#define FD_READ 0x00000001 +#define FD_WRITE 0x00000002 +#define FD_OOB 0x00000004 +#define FD_ACCEPT 0x00000008 +#define FD_CONNECT 0x00000010 +#define FD_CLOSE 0x00000020 + +/* internal per-socket flags */ +#define FD_WINE_LISTENING 0x10000000 +#define FD_WINE_NONBLOCKING 0x20000000 +#define FD_WINE_CONNECTED 0x40000000 +#define FD_WINE_RAW 0x80000000 +#define FD_WINE_INTERNAL 0xFFFF0000 + +/* Constants for WSAIoctl() */ +#define WSA_FLAG_OVERLAPPED 0x01 struct sock {
1
0
0
0
Francois Gouget : include: Also define the WSAxxx error codes in winerror.h .
by Alexandre Julliard
19 Mar '10
19 Mar '10
Module: wine Branch: master Commit: 0c0c87a99eb50948f6ae2cce7a713fed9d845906 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c0c87a99eb50948f6ae2cce7…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Mar 19 10:12:46 2010 +0100 include: Also define the WSAxxx error codes in winerror.h. This matches the PSK. --- include/winerror.h | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++ include/winsock.h | 2 +- 2 files changed, 80 insertions(+), 1 deletions(-) diff --git a/include/winerror.h b/include/winerror.h index 0bab882..6a56f74 100644 --- a/include/winerror.h +++ b/include/winerror.h @@ -1550,6 +1550,85 @@ static inline HRESULT HRESULT_FROM_WIN32(unsigned int x) #define DNS_STATUS_CONTINUE_NEEDED 9801 #define DNS_ERROR_NO_TCPIP 9851 #define DNS_ERROR_NO_DNS_SERVERS 9852 + +/* + * Also defined in winsock.h. + * + * All Windows Sockets error constants are biased by WSABASEERR from + * the "normal" + */ +#define WSABASEERR 10000 +/* + * Windows Sockets definitions of regular Microsoft C error constants + */ +#define WSAEINTR (WSABASEERR+4) +#define WSAEBADF (WSABASEERR+9) +#define WSAEACCES (WSABASEERR+13) +#define WSAEFAULT (WSABASEERR+14) +#define WSAEINVAL (WSABASEERR+22) +#define WSAEMFILE (WSABASEERR+24) + +/* + * Windows Sockets definitions of regular Berkeley error constants + */ +#define WSAEWOULDBLOCK (WSABASEERR+35) +#define WSAEINPROGRESS (WSABASEERR+36) +#define WSAEALREADY (WSABASEERR+37) +#define WSAENOTSOCK (WSABASEERR+38) +#define WSAEDESTADDRREQ (WSABASEERR+39) +#define WSAEMSGSIZE (WSABASEERR+40) +#define WSAEPROTOTYPE (WSABASEERR+41) +#define WSAENOPROTOOPT (WSABASEERR+42) +#define WSAEPROTONOSUPPORT (WSABASEERR+43) +#define WSAESOCKTNOSUPPORT (WSABASEERR+44) +#define WSAEOPNOTSUPP (WSABASEERR+45) +#define WSAEPFNOSUPPORT (WSABASEERR+46) +#define WSAEAFNOSUPPORT (WSABASEERR+47) +#define WSAEADDRINUSE (WSABASEERR+48) +#define WSAEADDRNOTAVAIL (WSABASEERR+49) +#define WSAENETDOWN (WSABASEERR+50) +#define WSAENETUNREACH (WSABASEERR+51) +#define WSAENETRESET (WSABASEERR+52) +#define WSAECONNABORTED (WSABASEERR+53) +#define WSAECONNRESET (WSABASEERR+54) +#define WSAENOBUFS (WSABASEERR+55) +#define WSAEISCONN (WSABASEERR+56) +#define WSAENOTCONN (WSABASEERR+57) +#define WSAESHUTDOWN (WSABASEERR+58) +#define WSAETOOMANYREFS (WSABASEERR+59) +#define WSAETIMEDOUT (WSABASEERR+60) +#define WSAECONNREFUSED (WSABASEERR+61) +#define WSAELOOP (WSABASEERR+62) +#define WSAENAMETOOLONG (WSABASEERR+63) +#define WSAEHOSTDOWN (WSABASEERR+64) +#define WSAEHOSTUNREACH (WSABASEERR+65) +#define WSAENOTEMPTY (WSABASEERR+66) +#define WSAEPROCLIM (WSABASEERR+67) +#define WSAEUSERS (WSABASEERR+68) +#define WSAEDQUOT (WSABASEERR+69) +#define WSAESTALE (WSABASEERR+70) +#define WSAEREMOTE (WSABASEERR+71) + +/* + * Extended Windows Sockets error constant definitions + */ +#define WSASYSNOTREADY (WSABASEERR+91) +#define WSAVERNOTSUPPORTED (WSABASEERR+92) +#define WSANOTINITIALISED (WSABASEERR+93) +#define WSAEDISCON (WSABASEERR+101) +#define WSAENOMORE (WSABASEERR+102) +#define WSAECANCELLED (WSABASEERR+103) +#define WSAEINVALIDPROCTABLE (WSABASEERR+104) +#define WSAEINVALIDPROVIDER (WSABASEERR+105) +#define WSAEPROVIDERFAILEDINIT (WSABASEERR+106) +#define WSASYSCALLFAILURE (WSABASEERR+107) +#define WSASERVICE_NOT_FOUND (WSABASEERR+108) +#define WSATYPE_NOT_FOUND (WSABASEERR+109) +#define WSA_E_NO_MORE (WSABASEERR+110) +#define WSA_E_CANCELLED (WSABASEERR+111) +#define WSAEREFUSED (WSABASEERR+112) + + #define ERROR_SXS_SECTION_NOT_FOUND 14000 #define ERROR_SXS_CANT_GEN_ACTCTX 14001 #define ERROR_SXS_INVALID_ACTCTXDATA_FORMAT 14002 diff --git a/include/winsock.h b/include/winsock.h index 69819d5..95b4a51 100644 --- a/include/winsock.h +++ b/include/winsock.h @@ -853,7 +853,7 @@ typedef struct WS(WSAData) /* * All Windows Sockets error constants are biased by WSABASEERR from - * the "normal" + * the "normal". They are also defined in winerror.h. */ #define WSABASEERR 10000 /*
1
0
0
0
Paul Vriens : user32/tests: Fix timeouts on Win9x/WinMe.
by Alexandre Julliard
19 Mar '10
19 Mar '10
Module: wine Branch: master Commit: b897a37f384055e1b84722b9ba5ed4bc50385960 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b897a37f384055e1b84722b9b…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Fri Mar 19 10:03:58 2010 +0100 user32/tests: Fix timeouts on Win9x/WinMe. --- dlls/user32/tests/win.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 9793af2..af0fa49 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -2505,7 +2505,7 @@ static void test_SetForegroundWindow(HWND hwnd) { struct create_window_thread_params thread_params; HANDLE thread; - DWORD res; + DWORD res, tid; BOOL ret; HWND hwnd2; MSG msg; @@ -2589,7 +2589,7 @@ static void test_SetForegroundWindow(HWND hwnd) ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError()); thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL); ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError()); - thread = CreateThread(NULL, 0, create_window_thread, &thread_params, 0, NULL); + thread = CreateThread(NULL, 0, create_window_thread, &thread_params, 0, &tid); ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); res = WaitForSingleObject(thread_params.window_created, INFINITE); ok(res == WAIT_OBJECT_0, "Wait failed (%#x), last error %#x.\n", res, GetLastError());
1
0
0
0
Paul Vriens : d3d9/tests: Fix timeouts on Win9x/WinMe.
by Alexandre Julliard
19 Mar '10
19 Mar '10
Module: wine Branch: master Commit: a0da7b6d3b9da4b80a54a01bca044753d7f0bb7b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0da7b6d3b9da4b80a54a01bc…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Fri Mar 19 10:03:48 2010 +0100 d3d9/tests: Fix timeouts on Win9x/WinMe. --- dlls/d3d9/tests/device.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 5ef2910..eb424e2 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -2388,7 +2388,7 @@ static void test_wndproc(void) HANDLE thread; LONG_PTR proc; ULONG ref; - DWORD res; + DWORD res, tid; if (!(d3d9 = pDirect3DCreate9(D3D_SDK_VERSION))) { @@ -2409,7 +2409,7 @@ static void test_wndproc(void) WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); device_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); - thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, NULL); + thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, &tid); ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); res = WaitForSingleObject(thread_params.window_created, INFINITE); @@ -2519,7 +2519,7 @@ static void test_wndproc_windowed(void) HANDLE thread; LONG_PTR proc; ULONG ref; - DWORD res; + DWORD res, tid; if (!(d3d9 = pDirect3DCreate9(D3D_SDK_VERSION))) { @@ -2540,7 +2540,7 @@ static void test_wndproc_windowed(void) WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); device_window = CreateWindowA("d3d9_test_wndproc_wc", "d3d9_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); - thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, NULL); + thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, &tid); ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); res = WaitForSingleObject(thread_params.window_created, INFINITE);
1
0
0
0
Paul Vriens : d3d8/tests: Fix timeouts on Win9x/WinMe.
by Alexandre Julliard
19 Mar '10
19 Mar '10
Module: wine Branch: master Commit: dcb62f265d88531a4fef2a5289f4fe1fe00034ef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dcb62f265d88531a4fef2a528…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Fri Mar 19 10:03:45 2010 +0100 d3d8/tests: Fix timeouts on Win9x/WinMe. --- dlls/d3d8/tests/device.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index c6613ca..c0e1985 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -1543,7 +1543,7 @@ static void test_wndproc(void) HANDLE thread; LONG_PTR proc; ULONG ref; - DWORD res; + DWORD res, tid; if (!(d3d8 = pDirect3DCreate8(D3D_SDK_VERSION))) { @@ -1564,7 +1564,7 @@ static void test_wndproc(void) WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0); device_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0); - thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, NULL); + thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, &tid); ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); res = WaitForSingleObject(thread_params.window_created, INFINITE); @@ -1674,7 +1674,7 @@ static void test_wndproc_windowed(void) HANDLE thread; LONG_PTR proc; ULONG ref; - DWORD res; + DWORD res, tid; if (!(d3d8 = pDirect3DCreate8(D3D_SDK_VERSION))) { @@ -1695,7 +1695,7 @@ static void test_wndproc_windowed(void) WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); device_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0); - thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, NULL); + thread = CreateThread(NULL, 0, wndproc_thread, &thread_params, 0, &tid); ok(!!thread, "Failed to create thread, last error %#x.\n", GetLastError()); res = WaitForSingleObject(thread_params.window_created, INFINITE);
1
0
0
0
Nikolay Sivov : shell32: Add IPersistFile:: GetCurFile implementation for IShellLink.
by Alexandre Julliard
19 Mar '10
19 Mar '10
Module: wine Branch: master Commit: b774baa35c6faf3135240dd860321372d06e16ef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b774baa35c6faf3135240dd86…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Mar 19 00:52:41 2010 +0300 shell32: Add IPersistFile::GetCurFile implementation for IShellLink. --- dlls/shell32/shelllink.c | 36 +++++++++++++++++++++-- dlls/shell32/tests/shelllink.c | 60 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 88 insertions(+), 8 deletions(-) diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index 1718df7..88a188f 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -161,6 +161,8 @@ typedef struct BOOL bDirty; INT iIdOpen; /* id of the "Open" entry in the context menu */ IUnknown *site; + + LPOLESTR filepath; /* file path returned by IPersistFile::GetCurFile */ } IShellLinkImpl; static inline IShellLinkImpl *impl_from_IShellLinkW( IShellLinkW *iface ) @@ -307,6 +309,7 @@ static ULONG ShellLink_Release( IShellLinkImpl *This ) HeapFree(GetProcessHeap(), 0, This->sPathRel); HeapFree(GetProcessHeap(), 0, This->sProduct); HeapFree(GetProcessHeap(), 0, This->sComponent); + HeapFree(GetProcessHeap(), 0, This->filepath); if (This->site) IUnknown_Release( This->site ); @@ -392,6 +395,11 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFile r = IPersistStream_Load(StreamThis, stm); ShellLink_UpdatePath(This->sPathRel, pszFileName, This->sWorkDir, &This->sPath); IStream_Release( stm ); + + /* update file path */ + HeapFree(GetProcessHeap(), 0, This->filepath); + This->filepath = strdupW(pszFileName); + This->bDirty = FALSE; } TRACE("-- returning hr %08x\n", r); @@ -477,6 +485,10 @@ static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFile { StartLinkProcessor( pszFileName ); + /* update file path */ + HeapFree(GetProcessHeap(), 0, This->filepath); + This->filepath = strdupW(pszFileName); + This->bDirty = FALSE; } else @@ -496,11 +508,26 @@ static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLEST return NOERROR; } -static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *ppszFileName) +static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *filename) { - IShellLinkImpl *This = impl_from_IPersistFile(iface); - FIXME("(%p)->(%p): stub\n", This, ppszFileName); - return NOERROR; + IShellLinkImpl *This = impl_from_IPersistFile(iface); + IMalloc *pMalloc; + + TRACE("(%p)->(%p)\n", This, filename); + + if (!This->filepath) + { + *filename = NULL; + return S_FALSE; + } + + SHGetMalloc(&pMalloc); + *filename = IMalloc_Alloc(pMalloc, (strlenW(This->filepath)+1)*sizeof(WCHAR)); + if (!*filename) return E_OUTOFMEMORY; + + strcpyW(*filename, This->filepath); + + return S_OK; } static const IPersistFileVtbl pfvt = @@ -1239,6 +1266,7 @@ HRESULT WINAPI IShellLink_Constructor( IUnknown *pUnkOuter, sl->bDirty = FALSE; sl->iIdOpen = -1; sl->site = NULL; + sl->filepath = NULL; TRACE("(%p)->()\n",sl); diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c index bb2d5b3..52a21f1 100644 --- a/dlls/shell32/tests/shelllink.c +++ b/dlls/shell32/tests/shelllink.c @@ -421,6 +421,22 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails) lok(SUCCEEDED(r), "no IID_IPersistFile (0x%08x)\n", r); if (SUCCEEDED(r)) { + CHAR buff[MAX_PATH], buff2[MAX_PATH]; + IMalloc *pmalloc; + LPOLESTR str; + + if (0) + { + /* crashes on XP */ + r = IPersistFile_GetCurFile(pf, NULL); + } + + /* test GetCurFile before ::Save */ + str = (LPWSTR)0xdeadbeef; + r = IPersistFile_GetCurFile(pf, &str); + lok(r == S_FALSE, "got 0x%08x\n", r); + ok(str == NULL, "got %p\n", str); + r = IPersistFile_Save(pf, path, TRUE); if (save_fails) { @@ -432,6 +448,18 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails) { lok(SUCCEEDED(r), "save failed (0x%08x)\n", r); } + + /* test GetCurFile after ::Save */ + r = IPersistFile_GetCurFile(pf, &str); + lok(r == S_OK, "got 0x%08x\n", r); + + WideCharToMultiByte( CP_ACP, 0, str, -1, buff, sizeof(buff), NULL, NULL ); + WideCharToMultiByte( CP_ACP, 0, path, -1, buff2, sizeof(buff2), NULL, NULL ); + + lok(!strcmp(buff, buff2), "Expected %s, got %s\n", buff2, buff); + + SHGetMalloc(&pmalloc); + IMalloc_Free(pmalloc, str); IPersistFile_Release(pf); } @@ -444,6 +472,9 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) IShellLinkA *sl; IPersistFile *pf; char buffer[INFOTIPSIZE]; + CHAR buff[MAX_PATH], buff2[MAX_PATH]; + IMalloc *pmalloc; + LPOLESTR str; r = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkA, (LPVOID*)&sl); @@ -459,8 +490,28 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo) return; } + SHGetMalloc(&pmalloc); + + /* test GetCurFile before ::Load */ + str = (LPWSTR)0xdeadbeef; + r = IPersistFile_GetCurFile(pf, &str); + lok(r == S_FALSE, "got 0x%08x\n", r); + lok(str == NULL, "got %p\n", str); + r = IPersistFile_Load(pf, path, STGM_READ); lok(SUCCEEDED(r), "load failed (0x%08x)\n", r); + + /* test GetCurFile after ::Save */ + r = IPersistFile_GetCurFile(pf, &str); + lok(r == S_OK, "got 0x%08x\n", r); + + WideCharToMultiByte( CP_ACP, 0, str, -1, buff, sizeof(buff), NULL, NULL ); + WideCharToMultiByte( CP_ACP, 0, path, -1, buff2, sizeof(buff2), NULL, NULL ); + + lok(!strcmp(buff, buff2), "Expected %s, got %s\n", buff2, buff); + + IMalloc_Free(pmalloc, str); + IPersistFile_Release(pf); if (FAILED(r)) { @@ -744,10 +795,11 @@ static void test_datalink(void) r = IShellLinkW_SetPath(sl, lnk); ok(r == S_OK, "set path failed\n"); - /* - * The following crashes: - * r = IShellLinkDataList_GetFlags( dl, NULL ); - */ +if (0) +{ + /* the following crashes */ + r = IShellLinkDataList_GetFlags( dl, NULL ); +} flags = 0; r = IShellLinkDataList_GetFlags( dl, &flags );
1
0
0
0
Eric Pouech : dbghelp: Move the mach-o information into the modfmt structure.
by Alexandre Julliard
19 Mar '10
19 Mar '10
Module: wine Branch: master Commit: cecb80a4e89e9d60357c4522ebfd933dc2572dcc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cecb80a4e89e9d60357c4522e…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Mar 18 21:32:02 2010 +0100 dbghelp: Move the mach-o information into the modfmt structure. --- dlls/dbghelp/dbghelp_private.h | 4 +- dlls/dbghelp/macho_module.c | 46 ++++++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 5957804..5ea2e82 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -322,6 +322,7 @@ enum format_info { DFI_ELF, DFI_PE, + DFI_MACHO, DFI_DWARF, DFI_LAST }; @@ -339,6 +340,7 @@ struct module_format struct elf_module_info* elf_info; struct dwarf2_module_info_s* dwarf2_info; struct pe_module_info* pe_info; + struct macho_module_info* macho_info; } u; }; @@ -354,8 +356,6 @@ struct module /* specific information for debug types */ struct module_format* format_info[DFI_LAST]; - struct macho_module_info* macho_info; - /* memory allocation pool */ struct pool pool; diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index 379596b..44fa4f2 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -655,9 +655,10 @@ static int macho_parse_symtab(struct macho_file_map* fmap, sc->stroff, sc->strsize, (const void**)&stab, (const void**)&stabstr)) return 0; - if (!stabs_parse(mdi->module, mdi->module->macho_info->load_addr - fmap->segs_start, - stab, sc->nsyms * sizeof(struct nlist), - stabstr, sc->strsize, macho_stabs_def_cb, mdi)) + if (!stabs_parse(mdi->module, + mdi->module->format_info[DFI_MACHO]->u.macho_info->load_addr - fmap->segs_start, + stab, sc->nsyms * sizeof(struct nlist), + stabstr, sc->strsize, macho_stabs_def_cb, mdi)) ret = -1; macho_unmap_ranges(fmap, sc->symoff, sc->nsyms * sizeof(struct nlist), @@ -703,7 +704,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt { case SymTagFunction: func = (struct symt_function*)sym; - if (func->address == module->macho_info->load_addr) + if (func->address == module->format_info[DFI_MACHO]->u.macho_info->load_addr) { TRACE("Adjusting function %p/%s!%s from 0x%08lx to 0x%08lx\n", func, debugstr_w(module->module.ModuleName), sym->hash_elt.name, @@ -720,7 +721,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt { case DataIsGlobal: case DataIsFileStatic: - if (data->u.var.offset == module->macho_info->load_addr) + if (data->u.var.offset == module->format_info[DFI_MACHO]->u.macho_info->load_addr) { TRACE("Adjusting data symbol %p/%s!%s from 0x%08lx to 0x%08lx\n", data, debugstr_w(module->module.ModuleName), sym->hash_elt.name, @@ -879,7 +880,7 @@ BOOL macho_load_debug_info(struct module* module, struct macho_file_map* fmap) TRACE("(%p, %p/%d)\n", module, fmap, fmap ? fmap->fd : -1); - if (module->type != DMT_MACHO || !module->macho_info) + if (module->type != DMT_MACHO || !module->format_info[DFI_MACHO]->u.macho_info) { ERR("Bad Mach-O module '%s'\n", debugstr_w(module->module.LoadedImageName)); return FALSE; @@ -963,26 +964,34 @@ static BOOL macho_load_file(struct process* pcs, const WCHAR* filename, if (macho_info->flags & MACHO_INFO_MODULE) { - struct macho_module_info *macho_module_info = - HeapAlloc(GetProcessHeap(), 0, sizeof(struct macho_module_info)); - if (!macho_module_info) goto leave; + struct macho_module_info *macho_module_info; + struct module_format* modfmt = + HeapAlloc(GetProcessHeap(), 0, sizeof(struct module_format) + sizeof(struct macho_module_info)); + if (!modfmt) goto leave; macho_info->module = module_new(pcs, filename, DMT_MACHO, FALSE, load_addr, fmap.segs_size, 0, calc_crc32(fmap.fd)); if (!macho_info->module) { - HeapFree(GetProcessHeap(), 0, macho_module_info); + HeapFree(GetProcessHeap(), 0, modfmt); goto leave; } - macho_info->module->macho_info = macho_module_info; - macho_info->module->macho_info->load_addr = load_addr; + macho_module_info = (void*)(modfmt + 1); + macho_info->module->format_info[DFI_MACHO] = modfmt; + + modfmt->module = macho_info->module; + modfmt->remove = NULL; + modfmt->loc_compute = NULL; + modfmt->u.macho_info = macho_module_info; + + macho_module_info->load_addr = load_addr; if (dbghelp_options & SYMOPT_DEFERRED_LOADS) macho_info->module->module.SymType = SymDeferred; else if (!macho_load_debug_info(macho_info->module, &fmap)) ret = FALSE; - macho_info->module->macho_info->in_use = 1; - macho_info->module->macho_info->is_loader = 0; + macho_info->module->format_info[DFI_MACHO]->u.macho_info->in_use = 1; + macho_info->module->format_info[DFI_MACHO]->u.macho_info->is_loader = 0; TRACE("module = %p\n", macho_info->module); } @@ -1109,7 +1118,7 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam if ((module = module_is_already_loaded(pcs, filename))) { macho_info->module = module; - module->macho_info->in_use = 1; + module->format_info[DFI_MACHO]->u.macho_info->in_use = 1; return module->module.SymType; } @@ -1231,7 +1240,7 @@ BOOL macho_synchronize_module_list(struct process* pcs) for (module = pcs->lmodules; module; module = module->next) { if (module->type == DMT_MACHO && !module->is_virtual) - module->macho_info->in_use = 0; + module->format_info[DFI_MACHO]->u.macho_info->in_use = 0; } ms.pcs = pcs; @@ -1243,7 +1252,8 @@ BOOL macho_synchronize_module_list(struct process* pcs) while (module) { if (module->type == DMT_MACHO && !module->is_virtual && - !module->macho_info->in_use && !module->macho_info->is_loader) + !module->format_info[DFI_MACHO]->u.macho_info->in_use && + !module->format_info[DFI_MACHO]->u.macho_info->is_loader) { module_remove(pcs, module); /* restart all over */ @@ -1297,7 +1307,7 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs) TRACE("(%p/%p)\n", pcs, pcs->handle); macho_info.flags = MACHO_INFO_DEBUG_HEADER | MACHO_INFO_MODULE; if (!macho_search_loader(pcs, &macho_info)) return FALSE; - macho_info.module->macho_info->is_loader = 1; + macho_info.module->format_info[DFI_MACHO]->u.macho_info->is_loader = 1; module_set_module(macho_info.module, S_WineLoaderW); return (pcs->dbg_hdr_addr = macho_info.dbg_hdr_addr) != 0; }
1
0
0
0
Eric Pouech : dbghelp: Moved the ELF' s module information into the new scheme.
by Alexandre Julliard
19 Mar '10
19 Mar '10
Module: wine Branch: master Commit: fe2ae803eeb4c9f65ddea32a761444ae0e9cea3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fe2ae803eeb4c9f65ddea32a7…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Mar 18 21:31:56 2010 +0100 dbghelp: Moved the ELF's module information into the new scheme. --- dlls/dbghelp/dbghelp_private.h | 4 +- dlls/dbghelp/elf_module.c | 94 +++++++++++++++++++++++----------------- dlls/dbghelp/module.c | 1 - 3 files changed, 56 insertions(+), 43 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=fe2ae803eeb4c9f65ddea…
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
92
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200