Added a WINE_NO_UNICODE_MACROS define to allow Winelib apps to switch
off the Unicode macros too.
diff --git a/include/objidl.idl b/include/objidl.idl
index 02de2ef..aa249de 100644
--- a/include/objidl.idl
+++ b/include/objidl.idl
@@ -435,10 +435,10 @@
}
/* GetObject is defined in wingdi.h as WINELIB_NAME_AW(GetObject),
- * which resolves to a compilation failure if __WINESRC__ is defined,
+ * which resolves to a compilation failure if WINE_NO_UNICODE_MACROS is defined,
* but GetObject is used as a valid method name below, so we have
- * to undefine it if __WINESRC__ is defined */
-cpp_quote("#ifdef __WINESRC__")
+ * to undefine it in that case */
+cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
cpp_quote("#undef GetObject")
cpp_quote("#endif")
diff --git a/include/ocidl.idl b/include/ocidl.idl
index fbdb00d..8cfaf5e 100644
--- a/include/ocidl.idl
+++ b/include/ocidl.idl
@@ -514,7 +514,7 @@
{
typedef IProvideClassInfo *LPPROVIDECLASSINFO;
-cpp_quote("#ifdef __WINESRC__")
+cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
cpp_quote("#undef GetClassInfo")
cpp_quote("#endif")
diff --git a/include/oleidl.idl b/include/oleidl.idl
index be323f6..c9e8aa0 100644
--- a/include/oleidl.idl
+++ b/include/oleidl.idl
@@ -97,7 +97,7 @@
/* avoid conflict with Wine Unicode macros */
-cpp_quote("#ifdef __WINESRC__")
+cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
cpp_quote("#undef TranslateAccelerator")
cpp_quote("#endif")
@@ -335,7 +335,7 @@
OLECONTF_ONLYIFRUNNING = 16
} OLECONTF;
-cpp_quote("#ifdef __WINESRC__")
+cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
cpp_quote("#undef GetObject")
cpp_quote("#endif")
HRESULT GetObject(
diff --git a/include/windef.h b/include/windef.h
index 8724e62..c9f64cd 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -184,22 +184,26 @@
/* Note that Winelib is purely Win32. */
#ifdef __WINESRC__
+#define WINE_NO_UNICODE_MACROS
+#endif
+
+#ifdef WINE_NO_UNICODE_MACROS
# 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 /* __WINESRC__ */
+#else /* WINE_NO_UNICODE_MACROS */
# ifdef UNICODE
# define WINELIB_NAME_AW(func) func##W
# else
# define WINELIB_NAME_AW(func) func##A
-# endif /* UNICODE */
-#endif /* __WINESRC__ */
+# endif
+#endif /* WINE_NO_UNICODE_MACROS */
-#ifdef __WINESRC__
+#ifdef WINE_NO_UNICODE_MACROS
# define DECL_WINELIB_TYPE_AW(type) /* nothing */
-#else /* __WINESRC__ */
+#else
# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
-#endif /* __WINESRC__ */
+#endif
#include <winnt.h>