]> git.saurik.com Git - wxWidgets.git/commitdiff
moved wxUSE_UNICODE <-> _UNICODE checks to wx/platform.h from wx/wxchar.h because...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 22 Oct 2003 21:24:16 +0000 (21:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 22 Oct 2003 21:24:16 +0000 (21:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/platform.h
include/wx/wxchar.h

index 7aff61182ba2af2c5636bef4e909e258a00796cf..b87b204f8e404da475a642dd7ba22c00ceed17a0 100644 (file)
 /* check the consistency of the settings in setup.h */
 #include "wx/chkconf.h"
 
+/*
+   adjust the Unicode setting: wxUSE_UNICODE should be defined as 0 or 1
+   and is used by wxWindows, _UNICODE and/or UNICODE may be defined or used by
+   the system headers so bring these settings in sync
+ */
+
+/* set wxUSE_UNICODE to 1 if UNICODE or _UNICODE is defined */
+#if defined(_UNICODE) || defined(UNICODE)
+#   undef wxUSE_UNICODE
+#   define wxUSE_UNICODE 1
+#else /* !UNICODE */
+#   ifndef wxUSE_UNICODE
+#       define wxUSE_UNICODE 0
+#   endif
+#endif /* UNICODE/!UNICODE */
+
+/* and vice versa: define UNICODE and _UNICODE if wxUSE_UNICODE is 1 */
+#if wxUSE_UNICODE
+#   ifndef _UNICODE
+#       define _UNICODE
+#   endif
+#   ifndef UNICODE
+#       define UNICODE
+#   endif
+#endif /* wxUSE_UNICODE */
+
+
 /*
    some compilers don't support iostream.h any longer, so override the users
    setting here in such case.
index 6dadaecf49bea4306685d0d2df75557a7b3d9acf..4b95026c0ccc3cc95cfe96e3e037b5e15a6df16f 100644 (file)
     #pragma interface "wxchar.h"
 #endif
 
+#include "wx/defs.h"        // for wxUSE_UNICODE
+
 // ----------------------------------------------------------------------------
-// first deal with Unicode setting: wxUSE_UNICODE should be defined as 0 or 1
-// and is used by wxWindows, _UNICODE and/or UNICODE may be defined or used by
-// the system headers so bring these settings in sync
+// check whether we have wchar_t and which size it is if we do
 // ----------------------------------------------------------------------------
 
-// set wxUSE_UNICODE to 1 if UNICODE or _UNICODE is defined
-#if defined(_UNICODE) || defined(UNICODE)
-    #undef wxUSE_UNICODE
-    #define wxUSE_UNICODE 1
-#else
-    #ifndef wxUSE_UNICODE
-        #define wxUSE_UNICODE 0
-    #endif
-#endif // Unicode
-
-// and vice versa: define UNICODE and _UNICODE if wxUSE_UNICODE is 1...
-#if wxUSE_UNICODE
-    #ifndef _UNICODE
-        #define _UNICODE
-    #endif
-    #ifndef UNICODE
-        #define UNICODE
-    #endif
-#endif // Unicode
-
-// check whether we have wchar_t
 #if !defined(wxUSE_WCHAR_T)
     #if defined(__WIN16__)
         // no wchar_t under Win16 regadrless of compiler used