Author: cfinck Date: Sun Aug 19 00:30:12 2007 New Revision: 28410
URL: http://svn.reactos.org/svn/reactos?rev=28410&view=rev Log: Fix the logic for the wchar_t checks. We don't only need to check if wchar_t has already been defined, but also report this to all known hosts and operating systems.
Modified: trunk/reactos/include/psdk/winnt.h
Modified: trunk/reactos/include/psdk/winnt.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=28... ============================================================================== --- trunk/reactos/include/psdk/winnt.h (original) +++ trunk/reactos/include/psdk/winnt.h Sun Aug 19 00:30:12 2007 @@ -50,22 +50,38 @@ #include <basetsd.h> #include <guiddef.h>
+/* wchar_t checks + * First check if wchar_t has already been defined by any host/OS */ +#ifndef _WCHAR_T_DEFINED +#ifndef _WCHAR_T_DECLARED /* for FreeBSD 5 and later */ +#ifndef _WCHAR_T /* for Mac OS X */ +#ifndef _WCHAR_T_ +#undef __need_wchar_t +#ifndef __cplusplus + typedef unsigned short wchar_t; +#endif +#endif +#endif +#endif +#endif + +/* Now report that it has been defined to all known hosts/operating systems */ #ifndef _WCHAR_T_DEFINED #define _WCHAR_T_DEFINED -#ifndef _WCHAR_T_DECLARED /* for FreeBSD 5 and later */ +#endif + +#ifndef _WCHAR_T_DECLARED #define _WCHAR_T_DECLARED -#ifndef _WCHAR_T /* for Mac OS X */ +#endif + +#ifndef _WCHAR_T #define _WCHAR_T +#endif + #ifndef _WCHAR_T_ #define _WCHAR_T_ -#undef __need_wchar_t -#ifndef __cplusplus -typedef unsigned short wchar_t; -#endif -#endif -#endif -#endif -#endif +#endif +
#include <ctype.h> #include <winerror.h>