]> git.saurik.com Git - wxWidgets.git/commitdiff
assume sizeof(wchar_t) == 2 by default, not 4
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 22 Sep 2003 19:25:32 +0000 (19:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 22 Sep 2003 19:25:32 +0000 (19:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/defs.h

index 2df1c5cf6c763610dfc08f43eb5229d51e1bcf53..65a37491902b402a0a7cdac30739148487f003b2 100644 (file)
@@ -810,11 +810,15 @@ typedef wxUint16 wxWord;
         typedef int wxInt32;
         typedef unsigned int wxUint32;
 
-        #if wxUSE_WCHAR_T
-            // also assume that sizeof(wchar_t) == 4 under Unix, this is by far
+        #if wxUSE_WCHAR_T && !defined(SIZEOF_WCHAR_T)
+            // also assume that sizeof(wchar_t) == 2 (under Unix the most
+            // common case is 4 but there configure would have defined
+            // SIZEOF_WCHAR_T for us)
             // the most common case
-            wxCOMPILE_TIME_ASSERT( sizeof(wchar_t) == 4,
-                                    Wchar_tMustBeExactly4Bytes);
+            wxCOMPILE_TIME_ASSERT( sizeof(wchar_t) == 2,
+                                    Wchar_tMustBeExactly2Bytes);
+
+            #define SIZEOF_WCHAR_T 2
         #endif // wxUSE_WCHAR_T
     #endif
 #endif // Win/!Win