On August 25, 2003 05:30 pm, Alexandre Julliard wrote: > I agree for UNICODE, but not for NEAR, FAR etc. Allowing them in Wine > will actually encourage bad coding, since we will see FAR pointers pop > up all over the place. A better approach would be to #define them to > something like do_not_use_this when building Wine. OK, what about this: ChangeLog Remove some unneeded __WINESRC__ tests from the headers. Miscellaneous cleanups and fixes. Index: dlls/dpnhpast/main.c =================================================================== RCS file: /var/cvs/wine/dlls/dpnhpast/main.c,v retrieving revision 1.3 diff -u -r1.3 main.c --- dlls/dpnhpast/main.c 30 Jun 2003 20:53:49 -0000 1.3 +++ dlls/dpnhpast/main.c 26 Aug 2003 13:13:01 -0000 @@ -89,7 +89,7 @@ * * */ -HRESULT WINAPI DPNHPAST_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID FAR) +HRESULT WINAPI DPNHPAST_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID) { FIXME(":stub\n"); return E_FAIL; Index: dlls/dsound/tests/propset.c =================================================================== RCS file: /var/cvs/wine/dlls/dsound/tests/propset.c,v retrieving revision 1.3 diff -u -r1.3 propset.c --- dlls/dsound/tests/propset.c 20 Aug 2003 18:18:39 -0000 1.3 +++ dlls/dsound/tests/propset.c 26 Aug 2003 12:15:58 -0000 @@ -38,7 +38,7 @@ DEFINE_GUID(DSPROPSETID_I3DL2_BufferProperties,0xDA0F0521,0x300A,0x11D3,0x8A,0x2B,0x00,0x60,0x97,0x0D,0xB0,0x11); DEFINE_GUID(DSPROPSETID_ZOOMFX_BufferProperties,0xCD5368E0,0x3450,0x11D3,0x8B,0x6E,0x00,0x10,0x5A,0x9B,0x7B,0xBC); -typedef HRESULT (CALLBACK * MYPROC)(REFCLSID, REFIID, LPVOID FAR*); +typedef HRESULT (CALLBACK * MYPROC)(REFCLSID, REFIID, LPVOID *); BOOL CALLBACK callback(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA data, LPVOID context) { Index: dlls/opengl32/opengl_norm.c =================================================================== RCS file: /var/cvs/wine/dlls/opengl32/opengl_norm.c,v retrieving revision 1.9 diff -u -r1.9 opengl_norm.c --- dlls/opengl32/opengl_norm.c 8 Jul 2003 21:07:03 -0000 1.9 +++ dlls/opengl32/opengl_norm.c 24 Aug 2003 14:09:00 -0000 @@ -802,10 +802,10 @@ /*********************************************************************** * glDepthRange (OPENGL32.@) */ -void WINAPI wine_glDepthRange( GLclampd near, GLclampd far ) { - TRACE("(%f, %f)\n", near, far ); +void WINAPI wine_glDepthRange( GLclampd nearParm, GLclampd farParm ) { + TRACE("(%f, %f)\n", nearParm, farParm ); ENTER_GL(); - glDepthRange( near, far ); + glDepthRange( nearParm, farParm ); LEAVE_GL(); } Index: include/windef.h =================================================================== RCS file: /var/cvs/wine/include/windef.h,v retrieving revision 1.84 diff -u -r1.84 windef.h --- include/windef.h 15 Jan 2003 03:31:49 -0000 1.84 +++ include/windef.h 26 Aug 2003 13:14:18 -0000 @@ -21,10 +21,6 @@ #ifndef __WINE_WINDEF_H #define __WINE_WINDEF_H -#ifdef __WINESRC__ -# undef UNICODE -#endif /* __WINESRC__ */ - #ifndef WINVER #define WINVER 0x0500 #endif @@ -67,61 +63,63 @@ # endif #endif /* __stdcall */ -#ifndef __WINESRC__ +#ifdef __WINESRC__ +#define __ONLY_IN_WINELIB(x) do_not_use_this_in_wine +#else +#define __ONLY_IN_WINELIB(x) x +#endif #ifndef pascal -#define pascal __stdcall +#define pascal __ONLY_IN_WINELIB(__stdcall) #endif #ifndef _pascal -#define _pascal __stdcall +#define _pascal __ONLY_IN_WINELIB(__stdcall) #endif #ifndef _stdcall -#define _stdcall __stdcall +#define _stdcall __ONLY_IN_WINELIB(__stdcall) #endif #ifndef _fastcall -#define _fastcall __stdcall +#define _fastcall __ONLY_IN_WINELIB(__stdcall) #endif #ifndef __fastcall -#define __fastcall __stdcall +#define __fastcall __ONLY_IN_WINELIB(__stdcall) #endif #ifndef __export -#define __export __stdcall +#define __export __ONLY_IN_WINELIB(__stdcall) #endif #ifndef cdecl -#define cdecl __cdecl +#define cdecl __ONLY_IN_WINELIB(__cdecl) #endif #ifndef _cdecl -#define _cdecl __cdecl +#define _cdecl __ONLY_IN_WINELIB(__cdecl) #endif #ifndef near -#define near +#define near __ONLY_IN_WINELIB() #endif #ifndef far -#define far +#define far __ONLY_IN_WINELIB() #endif #ifndef _near -#define _near +#define _near __ONLY_IN_WINELIB() #endif #ifndef _far -#define _far +#define _far __ONLY_IN_WINELIB() #endif #ifndef NEAR -#define NEAR +#define NEAR __ONLY_IN_WINELIB() #endif #ifndef FAR -#define FAR +#define FAR __ONLY_IN_WINELIB() #endif #ifndef _declspec -#define _declspec(x) +#define _declspec(x) __ONLY_IN_WINELIB() #endif #ifndef __declspec -#define __declspec(x) +#define __declspec(x) __ONLY_IN_WINELIB() #endif -#endif /* __WINESRC__ */ - #define CALLBACK __stdcall #define WINAPI __stdcall #define APIPRIVATE __stdcall @@ -184,7 +182,6 @@ #include "winnt.h" /* Macros to map Winelib names to the correct implementation name */ -/* depending on __WINESRC__ and UNICODE macros. */ /* Note that Winelib is purely Win32. */ #ifdef __WINESRC__ Index: include/wtypes.idl =================================================================== RCS file: /var/cvs/wine/include/wtypes.idl,v retrieving revision 1.11 diff -u -r1.11 wtypes.idl --- include/wtypes.idl 20 Jun 2003 21:30:37 -0000 1.11 +++ include/wtypes.idl 22 Aug 2003 19:15:31 -0000 @@ -263,7 +263,7 @@ typedef [string] OLECHAR *LPOLESTR; typedef [string] const OLECHAR *LPCOLESTR; cpp_quote("#ifndef __WINESRC__") -cpp_quote("#define OLESTR(str) WINE_UNICODE_TEXT(str)") +cpp_quote("#define OLESTR(str) L##str") cpp_quote("#endif") /* from Wine's pre-WIDL wtypes.h */ Index: programs/cmdlgtst/cmdlgtst.c =================================================================== RCS file: /var/cvs/wine/programs/cmdlgtst/cmdlgtst.c,v retrieving revision 1.11 diff -u -r1.11 cmdlgtst.c --- programs/cmdlgtst/cmdlgtst.c 16 Oct 2002 18:58:21 -0000 1.11 +++ programs/cmdlgtst/cmdlgtst.c 26 Aug 2003 12:50:00 -0000 @@ -56,9 +56,6 @@ unsigned long ft_bit; }; -#if 0 -#define FAR -#endif #define EXPORT static char menuName[] = "CmdlgtstMenu"; @@ -288,9 +285,9 @@ /* now draw a couple of lines, just for giggles. */ - MoveToEx(ps.hdc, rect.left, rect.top, (POINT FAR *) 0); + MoveToEx(ps.hdc, rect.left, rect.top, (POINT *) 0); LineTo(ps.hdc, rect.right, rect.bottom); - MoveToEx(ps.hdc, rect.left, rect.bottom, (POINT FAR *) 0); + MoveToEx(ps.hdc, rect.left, rect.bottom, (POINT *) 0); LineTo(ps.hdc, rect.right, rect.top); /* draw some text */ @@ -722,7 +719,7 @@ { if(uMsg == findMessageId) { - FINDREPLACE FAR* lpfr = (FINDREPLACE FAR*) lParam; + FINDREPLACE * lpfr = (FINDREPLACE *) lParam; if(lpfr->Flags & FR_DIALOGTERM) { MessageBox(hWnd, "User closing us down.", "Down", MB_OK); findDialogBox = 0; -- Dimi.