Commit d59ba4cc authored by Alexandre Julliard's avatar Alexandre Julliard

Added a WINE_NO_UNICODE_MACROS define to allow Winelib apps to switch

off the Unicode macros too.
parent ece9de5a
......@@ -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")
......
......@@ -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")
......
......@@ -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(
......
......@@ -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 <winnt.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment