From d59ba4ccf1ab42ba7c5e2925c9447be70285abca Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 15 Aug 2005 20:53:40 +0000 Subject: [PATCH] Added a WINE_NO_UNICODE_MACROS define to allow Winelib apps to switch off the Unicode macros too. --- include/objidl.idl | 6 +++--- include/ocidl.idl | 2 +- include/oleidl.idl | 4 ++-- include/windef.h | 16 ++++++++++------ 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/include/objidl.idl b/include/objidl.idl index 02de2ef12ef..aa249de4865 100644 --- a/include/objidl.idl +++ b/include/objidl.idl @@ -435,10 +435,10 @@ interface IRunnableObject : IUnknown } /* 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 fbdb00d75ad..8cfaf5e9b21 100644 --- a/include/ocidl.idl +++ b/include/ocidl.idl @@ -514,7 +514,7 @@ interface IProvideClassInfo : IUnknown { 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 be323f624ac..c9e8aa02e6d 100644 --- a/include/oleidl.idl +++ b/include/oleidl.idl @@ -97,7 +97,7 @@ interface IOleInPlaceObject : IOleWindow /* 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 @@ interface IOleItemContainer : IOleContainer 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 8724e6239e1..c9f64cd3213 100644 --- a/include/windef.h +++ b/include/windef.h @@ -184,22 +184,26 @@ typedef char *PSZ; /* 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 -- 2.11.4.GIT