[ros-diffs] [cfinck] 28410: 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.

cfinck at svn.reactos.org cfinck at svn.reactos.org
Sat Aug 18 22:30:13 CEST 2007


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=28410&r1=28409&r2=28410&view=diff
==============================================================================
--- 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>




More information about the Ros-diffs mailing list