Rename __WINE__ to __WINESRC__.
diff --git a/Make.rules.in b/Make.rules.in
index 8abf4d0..8f2ad54 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -171,13 +171,13 @@
cd `dirname $@` && $(MAKE) man
man: $(C_SRCS) $(SUBDIRS:%=%/__man__)
- if [ -n "$(C_SRCS)" ]; then $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w; for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/man3w -S3w $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done; fi
+ if [ -n "$(C_SRCS)" ]; then $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/man3w; for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/man3w -S3w $(DIVINCL) -D__WINESRC__ $(MANSPECS) $$i; done; fi
$(SUBDIRS:%=%/__doc_html__): dummy
cd `dirname $@` && $(MAKE) doc-html
doc-html: $(C_SRCS) $(SUBDIRS:%=%/__doc_html__)
- if [ -n "$(C_SRCS)" ]; then $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html; for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/html -Th -iwindows.h $(DIVINCL) -D__WINE__ $(MANSPECS) $$i; done; fi
+ if [ -n "$(C_SRCS)" ]; then $(MKINSTALLDIRS) $(TOPOBJDIR)/documentation/html; for i in $(C_SRCS); do $(C2MAN) -L -o $(TOPOBJDIR)/documentation/html -Th -iwindows.h $(DIVINCL) -D__WINESRC__ $(MANSPECS) $$i; done; fi
.PHONY: man doc-html $(SUBDIRS:%=%/__man__) $(SUBDIRS:%=%/__doc_html__)
diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in
index 557ff6e..81cf938 100644
--- a/dlls/Makedll.rules.in
+++ b/dlls/Makedll.rules.in
@@ -8,7 +8,7 @@
# plus all variables required by the global Make.rules.in
#
-DEFS = @DLLFLAGS@ -D__WINE__ $(EXTRADEFS)
+DEFS = @DLLFLAGS@ -D__WINESRC__ $(EXTRADEFS)
DLLEXT = @DLLEXT@
ALTSPECS = $(ALTNAMES:%.dll=%)
SPEC_SRCS = $(ALTSPECS:%=%.spec)
diff --git a/include/mmddk.h b/include/mmddk.h
index c6c53e1..476944c 100644
--- a/include/mmddk.h
+++ b/include/mmddk.h
@@ -79,7 +79,7 @@
#define DRV_QUERYNAME (DRV_RESERVED + 3)
#define DRV_QUERYDRIVERIDS (DRV_RESERVED + 4)
#define DRV_QUERYMAPPABLE (DRV_RESERVED + 5)
-#ifdef __WINE__
+#ifdef __WINESRC__
#define DRV_QUERYDSOUNDIFACE (DRV_RESERVED + 10)
#endif
diff --git a/include/mmsystem.h b/include/mmsystem.h
index 9324b5b..147c567 100644
--- a/include/mmsystem.h
+++ b/include/mmsystem.h
@@ -228,7 +228,7 @@
HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver);
DWORD WINAPI GetDriverFlags(HDRVR hDriver);
-#ifdef __WINE__
+#ifdef __WINESRC__
/* this call (GetDriverFlags) is not documented, nor the flags returned.
* here are Wine only definitions
*/
@@ -303,7 +303,7 @@
#define WAVE_MAPPED 0x0004
#define WAVE_FORMAT_DIRECT 0x0008
#define WAVE_FORMAT_DIRECT_QUERY (WAVE_FORMAT_QUERY | WAVE_FORMAT_DIRECT)
-#ifdef __WINE__
+#ifdef __WINESRC__
#define WAVE_DIRECTSOUND 0x0080
#endif
diff --git a/include/oaidl.h b/include/oaidl.h
index e3e42d8..24f7c91 100644
--- a/include/oaidl.h
+++ b/include/oaidl.h
@@ -26,7 +26,7 @@
#ifndef __WINE_OAIDL_H
#define __WINE_OAIDL_H
-#if defined(__WINE__) && !defined(INITGUID) && !defined(__WINE_INCLUDE_OAIDL)
+#if defined(__WINESRC__) && !defined(INITGUID) && !defined(__WINE_INCLUDE_OAIDL)
#error DO NOT INCLUDE DIRECTLY
#endif
diff --git a/include/objbase.h b/include/objbase.h
index 1ea8313..3aa3234 100644
--- a/include/objbase.h
+++ b/include/objbase.h
@@ -805,7 +805,7 @@
#define ICOM_CALL26(xfn, ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) ICOM_VTBL(ptr)->xfn(ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z)
-#ifndef __WINE__
+#ifndef __WINESRC__
/* These macros are msdev's way of defining COM objects.
* They are provided here for use by Winelib developpers.
*/
@@ -859,6 +859,6 @@
#endif /* __cplusplus && !CINTERFACE */
-#endif /* __WINE__ */
+#endif /* __WINESRC__ */
#endif /* _OBJBASE_H_ */
diff --git a/include/objidl.h b/include/objidl.h
index 657250a..b4cf987 100644
--- a/include/objidl.h
+++ b/include/objidl.h
@@ -1711,7 +1711,7 @@
PRPC_MESSAGE pRpcMessage,
DWORD* pdwStubPhase);
-#ifdef __WINE__
+#ifdef __WINESRC__
#undef GetObject
#endif
typedef IRunningObjectTable *LPRUNNINGOBJECTTABLE;
diff --git a/include/objidl.idl b/include/objidl.idl
index b3d3917..0849370 100644
--- a/include/objidl.idl
+++ b/include/objidl.idl
@@ -424,10 +424,10 @@
}
/* GetObject is defined in wingdi.h as WINELIB_NAME_AW(GetObject),
- * which resolves to a compilation failure if __WINE__ is defined,
+ * which resolves to a compilation failure if __WINESRC__ is defined,
* but GetObject is used as a valid method name below, so we have
- * to undefine it if __WINE__ is defined */
-cpp_quote("#ifdef __WINE__")
+ * to undefine it if __WINESRC__ is defined */
+cpp_quote("#ifdef __WINESRC__")
cpp_quote("#undef GetObject")
cpp_quote("#endif")
diff --git a/include/ocidl.h b/include/ocidl.h
index 6e007a8..dc9664e 100644
--- a/include/ocidl.h
+++ b/include/ocidl.h
@@ -26,7 +26,7 @@
#ifndef __WINE_OCIDL_H
#define __WINE_OCIDL_H
-#if defined(__WINE__) && !defined(INITGUID) && !defined(__WINE_INCLUDE_OCIDL)
+#if defined(__WINESRC__) && !defined(INITGUID) && !defined(__WINE_INCLUDE_OCIDL)
#error DO NOT INCLUDE DIRECTLY
#endif
diff --git a/include/oleidl.h b/include/oleidl.h
index 1fe96d1..1e91789 100644
--- a/include/oleidl.h
+++ b/include/oleidl.h
@@ -26,7 +26,7 @@
#ifndef __WINE_OLEIDL_H
#define __WINE_OLEIDL_H
-#if defined(__WINE__) && !defined(INITGUID) && !defined(__WINE_INCLUDE_OLEIDL)
+#if defined(__WINESRC__) && !defined(INITGUID) && !defined(__WINE_INCLUDE_OLEIDL)
#error DO NOT INCLUDE DIRECTLY
#endif
diff --git a/include/prsht.h b/include/prsht.h
index 24f6fb7..f964711 100644
--- a/include/prsht.h
+++ b/include/prsht.h
@@ -264,7 +264,7 @@
#define PSH_WIZARD_LITE 0x00400000
#define PSH_WIZARD97_NEW 0x01000000 /* for IE >= 5 */
#define PSH_NOCONTEXTHELP 0x02000000
-#ifndef __WINE__
+#ifndef __WINESRC__
# if _WIN32_IE < 0x0500
# define PSH_WIZARD97 PSH_WIZARD97_OLD
# else
diff --git a/include/rpc.h b/include/rpc.h
index 2919199..28be46e 100644
--- a/include/rpc.h
+++ b/include/rpc.h
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#if !defined(RPC_NO_WINDOWS_H) && !defined(__WINE__)
+#if !defined(RPC_NO_WINDOWS_H) && !defined(__WINESRC__)
#include "windows.h"
#endif
diff --git a/include/rpcdce.h b/include/rpcdce.h
index c0b4e55..ad1aa5d 100644
--- a/include/rpcdce.h
+++ b/include/rpcdce.h
@@ -21,7 +21,7 @@
#include "windef.h"
-/* avoid delving into windows.h ifndef __WINE__; this
+/* avoid delving into windows.h ifndef __WINESRC__; this
would pull in rpcndr.h, which needs rpcdcep.h, which
needs us, in turn, causing a compile failure */
#ifndef RPC_NO_WINDOWS_H
diff --git a/include/rpcproxy.h b/include/rpcproxy.h
index bbd8428..d29a7da 100644
--- a/include/rpcproxy.h
+++ b/include/rpcproxy.h
@@ -195,7 +195,7 @@
#define IID_GENERIC_CHECK_IID(name,pIID,index) memcmp(pIID, name##_ProxyVtblList[index]->header.piid, sizeof(IID))
-#if defined(__WINE__) && defined(__WINE_WINE_OBJ_OLEAUT_H)
+#if defined(__WINESRC__) && defined(__WINE_WINE_OBJ_OLEAUT_H)
/* see http://msdn.microsoft.com/library/en-us/dnmsj99/html/com0199.asp?frame=true */
RPCRTAPI HRESULT RPC_ENTRY
diff --git a/include/shlwapi.h b/include/shlwapi.h
index 29d5edf..3ec7e1d 100644
--- a/include/shlwapi.h
+++ b/include/shlwapi.h
@@ -715,7 +715,7 @@
/* A/W Pairing is broken for this function */
LPSTR WINAPI StrFormatByteSize64A (LONGLONG,LPSTR,UINT);
LPWSTR WINAPI StrFormatByteSizeW (LONGLONG,LPWSTR,UINT);
-#ifndef __WINE__
+#ifndef __WINESRC__
#ifdef UNICODE
#define StrFormatByteSize StrFormatByteSizeW
#else
diff --git a/include/tchar.h b/include/tchar.h
index deead02..b34ec80 100644
--- a/include/tchar.h
+++ b/include/tchar.h
@@ -19,7 +19,7 @@
#ifndef __WINE_TCHAR_H
#define __WINE_TCHAR_H
-#ifdef __WINE__
+#ifdef __WINESRC__
#error Wine should not include tchar.h internally
#endif
diff --git a/include/winbase.h b/include/winbase.h
index 7bba6c4..bcaf220 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -828,7 +828,7 @@
#define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000
#define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF
-#ifdef __WINE__
+#ifdef __WINESRC__
#define CRITICAL_SECTION_INIT(name) { (void *)(__FILE__ ": " name), -1, 0, 0, 0, 0 }
#endif
@@ -1944,7 +1944,7 @@
return (PVOID)InterlockedExchange( (PLONG)dest, (LONG)val );
}
-#ifdef __WINE__
+#ifdef __WINESRC__
#define GetCurrentProcess() ((HANDLE)0xffffffff)
#define GetCurrentThread() ((HANDLE)0xfffffffe)
#endif
diff --git a/include/windef.h b/include/windef.h
index e53d014..4cba236 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -21,9 +21,9 @@
#ifndef __WINE_WINDEF_H
#define __WINE_WINDEF_H
-#ifdef __WINE__
+#ifdef __WINESRC__
# undef UNICODE
-#endif /* __WINE__ */
+#endif /* __WINESRC__ */
#ifndef WINVER
#define WINVER 0x0500
@@ -58,7 +58,7 @@
# define __cdecl
#endif /* __i386__ */
-#ifndef __WINE__
+#ifndef __WINESRC__
#ifndef pascal
#define pascal __stdcall
@@ -111,7 +111,7 @@
#define __declspec(x)
#endif
-#endif /* __WINE__ */
+#endif /* __WINESRC__ */
#define CALLBACK __stdcall
#define WINAPI __stdcall
@@ -175,26 +175,26 @@
#include "winnt.h"
/* Macros to map Winelib names to the correct implementation name */
-/* depending on __WINE__ and UNICODE macros. */
+/* depending on __WINESRC__ and UNICODE macros. */
/* Note that Winelib is purely Win32. */
-#ifdef __WINE__
+#ifdef __WINESRC__
# define WINELIB_NAME_AW(func) \
func##_must_be_suffixed_with_W_or_A_in_this_context \
func##_must_be_suffixed_with_W_or_A_in_this_context
-#else /* __WINE__ */
+#else /* __WINESRC__ */
# ifdef UNICODE
# define WINELIB_NAME_AW(func) func##W
# else
# define WINELIB_NAME_AW(func) func##A
# endif /* UNICODE */
-#endif /* __WINE__ */
+#endif /* __WINESRC__ */
-#ifdef __WINE__
+#ifdef __WINESRC__
# define DECL_WINELIB_TYPE_AW(type) /* nothing */
-#else /* __WINE__ */
+#else /* __WINESRC__ */
# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
-#endif /* __WINE__ */
+#endif /* __WINESRC__ */
/* Integer types */
diff --git a/include/windows.h b/include/windows.h
index 017816b..b1a8758 100644
--- a/include/windows.h
+++ b/include/windows.h
@@ -19,7 +19,7 @@
#ifndef __WINE_WINDOWS_H
#define __WINE_WINDOWS_H
-#ifdef __WINE__
+#ifdef __WINESRC__
#error Wine should not include windows.h internally
#endif
diff --git a/include/wine/debug.h b/include/wine/debug.h
index e0e177c..769e066 100644
--- a/include/wine/debug.h
+++ b/include/wine/debug.h
@@ -174,7 +174,7 @@
#define WINE_DPRINTF wine_dbg_printf
#define WINE_MESSAGE wine_dbg_printf
-#ifdef __WINE__
+#ifdef __WINESRC__
/* Wine uses shorter names that are very likely to conflict with other software */
inline static const char *debugstr_an( const char * s, int n ) { return wine_dbgstr_an( s, n ); }
@@ -203,7 +203,7 @@
#define DPRINTF WINE_DPRINTF
#define MESSAGE WINE_MESSAGE
-#endif /* __WINE__ */
+#endif /* __WINESRC__ */
#ifdef __cplusplus
}
diff --git a/include/wine/obj_control.h b/include/wine/obj_control.h
index e4a4791..31dde88 100644
--- a/include/wine/obj_control.h
+++ b/include/wine/obj_control.h
@@ -424,7 +424,7 @@
/*****************************************************************************
* IProvideClassInfo interface
*/
-#ifdef __WINE__
+#ifdef __WINESRC__
#undef GetClassInfo
#endif
diff --git a/include/wine/obj_inplace.h b/include/wine/obj_inplace.h
index 663d5d4..2471b1b 100644
--- a/include/wine/obj_inplace.h
+++ b/include/wine/obj_inplace.h
@@ -425,7 +425,7 @@
/*****************************************************************************
* IOleItemContainer interface
*/
-#ifdef __WINE__
+#ifdef __WINESRC__
#undef GetObject
#endif
diff --git a/include/winnt.h b/include/winnt.h
index a377c4b..7e7deb3 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -136,7 +136,7 @@
/* Anonymous union/struct handling */
-#ifdef __WINE__
+#ifdef __WINESRC__
# define NONAMELESSSTRUCT
# define NONAMELESSUNION
#else
@@ -266,7 +266,7 @@
# define EXTERN_C extern
#endif
-#ifndef __WINE__
+#ifndef __WINESRC__
#define STDMETHODCALLTYPE __stdcall
#define STDMETHODVCALLTYPE __cdecl
#define STDAPICALLTYPE __stdcall
@@ -328,7 +328,7 @@
* the emulator. The reason is they depend on the UNICODE
* macro which only exists in the user's code.
*/
-#ifndef __WINE__
+#ifndef __WINESRC__
# ifdef WINE_UNICODE_REWRITE
/* Use this if your compiler does not provide a 16bit wchar_t type.
@@ -379,7 +379,7 @@
# define __TEXT(string) string
# endif /* UNICODE */
# define TEXT(quote) __TEXT(quote)
-#endif /* __WINE__ */
+#endif /* __WINESRC__ */
/* Misc common WIN32 types */
typedef char CCHAR;
@@ -474,7 +474,7 @@
#define MEM_MAPPED 0x00040000
#define MEM_RESET 0x00080000
#define MEM_TOP_DOWN 0x00100000
-#ifdef __WINE__
+#ifdef __WINESRC__
#define MEM_SYSTEM 0x80000000
#endif
@@ -1132,7 +1132,7 @@
typedef CONTEXT *PCONTEXT;
-#ifdef __WINE__
+#ifdef __WINESRC__
/* Macros to retrieve the current context */
@@ -1269,7 +1269,7 @@
#error You need to define DEFINE_REGS_ENTRYPOINT macros for your CPU
#endif
-#endif /* __WINE__ */
+#endif /* __WINESRC__ */
/*
* Language IDs
diff --git a/include/winsock.h b/include/winsock.h
index 47cb66b..2b68147 100644
--- a/include/winsock.h
+++ b/include/winsock.h
@@ -20,13 +20,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef __WINE__
+#ifdef __WINESRC__
# ifndef __WINE_WINSOCK2__
# error Please use Winsock2 in Wine
# endif
#endif
-#ifndef __WINE__
+#ifndef __WINESRC__
# include "windows.h"
#else
# include "windef.h"
@@ -720,7 +720,7 @@
#define FD_CLOSE 0x00000020
/* internal per-socket flags */
-#ifdef __WINE__
+#ifdef __WINESRC__
#define FD_WINE_LISTENING 0x10000000
#define FD_WINE_NONBLOCKING 0x20000000
#define FD_WINE_CONNECTED 0x40000000
@@ -936,7 +936,7 @@
u_short WINAPI WS(ntohs)(u_short);
#endif
-#if defined(__WINE__) || !defined(__WINE_WINSOCK2__)
+#if defined(__WINESRC__) || !defined(__WINE_WINSOCK2__)
/* Stuff specific to winsock.h */
#include "mswsock.h"
diff --git a/include/winternl.h b/include/winternl.h
index c3e71f2..bc7ce48 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -475,7 +475,7 @@
} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
typedef struct _PROCESS_BASIC_INFORMATION {
-#ifdef __WINE__
+#ifdef __WINESRC__
DWORD ExitStatus;
DWORD PebBaseAddress;
DWORD AffinityMask;
@@ -556,7 +556,7 @@
/* System Information Class 0x00 */
typedef struct _SYSTEM_BASIC_INFORMATION {
-#ifdef __WINE__
+#ifdef __WINESRC__
DWORD dwUnknown1;
ULONG uKeMaximumIncrement;
ULONG uPageSize;
@@ -645,7 +645,7 @@
/* System Information Class 0x02 */
typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
-#ifdef __WINE__
+#ifdef __WINESRC__
LARGE_INTEGER liIdleTime;
DWORD dwSpare[76];
#else
@@ -659,7 +659,7 @@
/* System Information Class 0x05 */
typedef struct _SYSTEM_PROCESS_INFORMATION {
-#ifdef __WINE__
+#ifdef __WINESRC__
DWORD dwOffset;
DWORD dwThreadCount;
DWORD dwUnknown1[6];
@@ -714,7 +714,7 @@
/* System Information Class 0x03 */
typedef struct _SYSTEM_TIMEOFDAY_INFORMATION {
-#ifdef __WINE__
+#ifdef __WINESRC__
LARGE_INTEGER liKeBootTime;
LARGE_INTEGER liKeSystemTime;
LARGE_INTEGER liExpTimeZoneBias;
diff --git a/include/wownt32.h b/include/wownt32.h
index 100dfe6..295f700 100644
--- a/include/wownt32.h
+++ b/include/wownt32.h
@@ -59,7 +59,7 @@
HANDLE WINAPI WOWHandle32(WORD,WOW_HANDLE_TYPE);
WORD WINAPI WOWHandle16(HANDLE,WOW_HANDLE_TYPE);
-#ifdef __WINE__
+#ifdef __WINESRC__
/* under Wine use the kernel functions directly so we don't have to import wow32 */
HANDLE WINAPI K32WOWHandle32(WORD,WOW_HANDLE_TYPE);
WORD WINAPI K32WOWHandle16(HANDLE,WOW_HANDLE_TYPE);
@@ -67,7 +67,7 @@
#define WOWHandle16 K32WOWHandle16
#endif
-#ifdef __WINE__
+#ifdef __WINESRC__
/* under Wine we use optimized versions where we can */
#define HWND_32(h16) ((HWND) (ULONG_PTR)(h16))
#define HMENU_32(h16) ((HMENU) (ULONG_PTR)(h16))
@@ -95,7 +95,7 @@
#define HPEN_16(h32) (LOWORD(h32))
#define HACCEL_16(h32) (LOWORD(h32))
-#else /* __WINE__ */
+#else /* __WINESRC__ */
#define HWND_32(h16) ((HWND) (WOWHandle32(h16, WOW_TYPE_HWND)))
#define HMENU_32(h16) ((HMENU) (WOWHandle32(h16, WOW_TYPE_HMENU)))
@@ -123,7 +123,7 @@
#define HPEN_16(h32) (WOWHandle16(h32, WOW_TYPE_HPEN))
#define HACCEL_16(h32) (WOWHandle16(h32, WOW_TYPE_HACCEL))
-#endif /* __WINE__ */
+#endif /* __WINESRC__ */
#define HMETAFILE_32(h16) ((HMETAFILE)(WOWHandle32(h16, WOW_TYPE_HMETAFILE)))
#define HTASK_32(h16) ((DWORD)(WOWHandle32(h16, WOW_TYPE_HTASK)))
diff --git a/include/wtypes.h b/include/wtypes.h
index 258ffeb..0b50575 100644
--- a/include/wtypes.h
+++ b/include/wtypes.h
@@ -151,7 +151,7 @@
typedef const OLECHAR *LPCOLESTR;
-#ifndef __WINE__
+#ifndef __WINESRC__
#define OLESTR(str) WINE_UNICODE_TEXT(str)
#endif
typedef CHAR OLECHAR16;
diff --git a/include/wtypes.idl b/include/wtypes.idl
index 633f791..80861ff 100644
--- a/include/wtypes.idl
+++ b/include/wtypes.idl
@@ -153,7 +153,7 @@
typedef WCHAR OLECHAR;
typedef [string] OLECHAR *LPOLESTR;
typedef [string] const OLECHAR *LPCOLESTR;
-cpp_quote("#ifndef __WINE__")
+cpp_quote("#ifndef __WINESRC__")
cpp_quote("#define OLESTR(str) WINE_UNICODE_TEXT(str)")
cpp_quote("#endif")
diff --git a/library/Makefile.in b/library/Makefile.in
index 1adb5b3..2bc6005 100644
--- a/library/Makefile.in
+++ b/library/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = @DLLFLAGS@ -D__WINE__ -DDLLDIR="\"$(dlldir)\""
+DEFS = @DLLFLAGS@ -D__WINESRC__ -DDLLDIR="\"$(dlldir)\""
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@
diff --git a/miscemu/Makefile.in b/miscemu/Makefile.in
index 79fb731..8f590ef 100644
--- a/miscemu/Makefile.in
+++ b/miscemu/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = -D__WINE__
+DEFS = -D__WINESRC__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@
diff --git a/ole/Makefile.in b/ole/Makefile.in
index dedbec7..cfd285e 100644
--- a/ole/Makefile.in
+++ b/ole/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = @DLLFLAGS@ -D__WINE__
+DEFS = @DLLFLAGS@ -D__WINESRC__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@
diff --git a/server/Makefile.in b/server/Makefile.in
index 91dde18..543b8e3 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = -D__WINE__
+DEFS = -D__WINESRC__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@
diff --git a/tools/widl/Makefile.in b/tools/widl/Makefile.in
index ab9b52c..4379f1c 100644
--- a/tools/widl/Makefile.in
+++ b/tools/widl/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = -D__WINE__
+DEFS = -D__WINESRC__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
diff --git a/tools/winapi/Makefile.in b/tools/winapi/Makefile.in
index c9ad9e1..518c3a6 100644
--- a/tools/winapi/Makefile.in
+++ b/tools/winapi/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = -D__WINE__
+DEFS = -D__WINESRC__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
diff --git a/tools/winapi/msvcmaker b/tools/winapi/msvcmaker
index b19ad14..b446bed 100755
--- a/tools/winapi/msvcmaker
+++ b/tools/winapi/msvcmaker
@@ -673,7 +673,7 @@
my @includes = ();
if($wine) {
push @defines2, "_\U${project}\E_";
- push @defines2, qw(__WINE__) if $project !~ /^(?:wine(?:build|test)|.*?_test)$/;
+ push @defines2, qw(__WINESRC__) if $project !~ /^(?:wine(?:build|test)|.*?_test)$/;
push @defines2, qw(__WINE_USE_MSVCRT);
my $output_dir2 = $output_dir;
$output_dir =~ s/\\/\\\\/g;
diff --git a/tools/winebuild/Makefile.in b/tools/winebuild/Makefile.in
index 158aaa0..04618d1 100644
--- a/tools/winebuild/Makefile.in
+++ b/tools/winebuild/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = -D__WINE__
+DEFS = -D__WINESRC__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
diff --git a/tools/winedump/Makefile.in b/tools/winedump/Makefile.in
index 28f3fc5..be7534a 100644
--- a/tools/winedump/Makefile.in
+++ b/tools/winedump/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = -D__WINE__
+DEFS = -D__WINESRC__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
diff --git a/tools/wmc/Makefile.in b/tools/wmc/Makefile.in
index 3cd7898..e47a573 100644
--- a/tools/wmc/Makefile.in
+++ b/tools/wmc/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = -D__WINE__
+DEFS = -D__WINESRC__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
diff --git a/tools/wpp/Makefile.in b/tools/wpp/Makefile.in
index 29f04d2..0b5a0ed 100644
--- a/tools/wpp/Makefile.in
+++ b/tools/wpp/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = -D__WINE__
+DEFS = -D__WINESRC__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
diff --git a/tools/wrc/Makefile.in b/tools/wrc/Makefile.in
index 080bdb7..30e1455 100644
--- a/tools/wrc/Makefile.in
+++ b/tools/wrc/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = -D__WINE__ -DINCLUDEDIR="\"$(includedir)\""
+DEFS = -D__WINESRC__ -DINCLUDEDIR="\"$(includedir)\""
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
diff --git a/unicode/Makefile.in b/unicode/Makefile.in
index c1b34ce..dd85d6e 100644
--- a/unicode/Makefile.in
+++ b/unicode/Makefile.in
@@ -1,4 +1,4 @@
-DEFS = @DLLFLAGS@ -D__WINE__
+DEFS = @DLLFLAGS@ -D__WINESRC__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@