Added a WINE_NO_UNICODE_MACROS define to allow Winelib apps to switch
off the Unicode macros too.
This commit is contained in:
parent
ece9de5aaa
commit
d59ba4ccf1
|
@ -435,10 +435,10 @@ interface IRunnableObject : IUnknown
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GetObject is defined in wingdi.h as WINELIB_NAME_AW(GetObject),
|
/* 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
|
* but GetObject is used as a valid method name below, so we have
|
||||||
* to undefine it if __WINESRC__ is defined */
|
* to undefine it in that case */
|
||||||
cpp_quote("#ifdef __WINESRC__")
|
cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
|
||||||
cpp_quote("#undef GetObject")
|
cpp_quote("#undef GetObject")
|
||||||
cpp_quote("#endif")
|
cpp_quote("#endif")
|
||||||
|
|
||||||
|
|
|
@ -514,7 +514,7 @@ interface IProvideClassInfo : IUnknown
|
||||||
{
|
{
|
||||||
typedef IProvideClassInfo *LPPROVIDECLASSINFO;
|
typedef IProvideClassInfo *LPPROVIDECLASSINFO;
|
||||||
|
|
||||||
cpp_quote("#ifdef __WINESRC__")
|
cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
|
||||||
cpp_quote("#undef GetClassInfo")
|
cpp_quote("#undef GetClassInfo")
|
||||||
cpp_quote("#endif")
|
cpp_quote("#endif")
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ interface IOleInPlaceObject : IOleWindow
|
||||||
|
|
||||||
|
|
||||||
/* avoid conflict with Wine Unicode macros */
|
/* avoid conflict with Wine Unicode macros */
|
||||||
cpp_quote("#ifdef __WINESRC__")
|
cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
|
||||||
cpp_quote("#undef TranslateAccelerator")
|
cpp_quote("#undef TranslateAccelerator")
|
||||||
cpp_quote("#endif")
|
cpp_quote("#endif")
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ interface IOleItemContainer : IOleContainer
|
||||||
OLECONTF_ONLYIFRUNNING = 16
|
OLECONTF_ONLYIFRUNNING = 16
|
||||||
} OLECONTF;
|
} OLECONTF;
|
||||||
|
|
||||||
cpp_quote("#ifdef __WINESRC__")
|
cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
|
||||||
cpp_quote("#undef GetObject")
|
cpp_quote("#undef GetObject")
|
||||||
cpp_quote("#endif")
|
cpp_quote("#endif")
|
||||||
HRESULT GetObject(
|
HRESULT GetObject(
|
||||||
|
|
|
@ -184,22 +184,26 @@ typedef char *PSZ;
|
||||||
/* Note that Winelib is purely Win32. */
|
/* Note that Winelib is purely Win32. */
|
||||||
|
|
||||||
#ifdef __WINESRC__
|
#ifdef __WINESRC__
|
||||||
|
#define WINE_NO_UNICODE_MACROS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef WINE_NO_UNICODE_MACROS
|
||||||
# define WINELIB_NAME_AW(func) \
|
# 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 \
|
||||||
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
|
# ifdef UNICODE
|
||||||
# define WINELIB_NAME_AW(func) func##W
|
# define WINELIB_NAME_AW(func) func##W
|
||||||
# else
|
# else
|
||||||
# define WINELIB_NAME_AW(func) func##A
|
# define WINELIB_NAME_AW(func) func##A
|
||||||
# endif /* UNICODE */
|
# endif
|
||||||
#endif /* __WINESRC__ */
|
#endif /* WINE_NO_UNICODE_MACROS */
|
||||||
|
|
||||||
#ifdef __WINESRC__
|
#ifdef WINE_NO_UNICODE_MACROS
|
||||||
# define DECL_WINELIB_TYPE_AW(type) /* nothing */
|
# define DECL_WINELIB_TYPE_AW(type) /* nothing */
|
||||||
#else /* __WINESRC__ */
|
#else
|
||||||
# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
|
# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
|
||||||
#endif /* __WINESRC__ */
|
#endif
|
||||||
|
|
||||||
#include <winnt.h>
|
#include <winnt.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue