Author: cfinck
Date: Sun Aug 19 01:10:14 2007
New Revision: 28411
URL: http://svn.reactos.org/svn/reactos?rev=28411&view=rev
Log:
Include windef.h, which then includes winnt.h, which uses our wchar_t check and reports the wchar_t definition back to the host.
Then the host finally knows that it should not define wchar_t again.
Modified:
trunk/reactos/tools/unicode/cptable.c
Modified: trunk/reactos/tools/unicode/cptable.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/cptable.c?re…
==============================================================================
--- trunk/reactos/tools/unicode/cptable.c (original)
+++ trunk/reactos/tools/unicode/cptable.c Sun Aug 19 01:10:14 2007
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include <windef.h>
#include <stdlib.h>
#include "wine/unicode.h"
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=2…
==============================================================================
--- 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>
Author: cfinck
Date: Sat Aug 18 23:25:43 2007
New Revision: 28407
URL: http://svn.reactos.org/svn/reactos?rev=28407&view=rev
Log:
Add a check for the wchar_t existence for Mac OS X hosts
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=2…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h (original)
+++ trunk/reactos/include/psdk/winnt.h Sat Aug 18 23:25:43 2007
@@ -122,6 +122,8 @@
#define _WCHAR_T_DEFINED
#ifndef _WCHAR_T_DECLARED /* for FreeBSD 5 and later */
#define _WCHAR_T_DECLARED
+#ifndef _WCHAR_T /* for Mac OS X */
+#define _WCHAR_T
#ifndef _WCHAR_T_
#define _WCHAR_T_
#undef __need_wchar_t