]> git.saurik.com Git - wxWidgets.git/commitdiff
an attempt to fix glibc2.0 stupidness
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 13 Apr 1999 08:56:14 +0000 (08:56 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 13 Apr 1999 08:56:14 +0000 (08:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/wxchar.h

index 7df4892f82545e56e5fc2687092a890c12ab4b30..963af6cdd0aff7112c565d17088727a16f73cb60 100644 (file)
@@ -151,8 +151,17 @@ typedef unsigned __WCHAR_TYPE__ wxUChar;
 #define  wxIsspace   iswspace
 #define  wxIsupper   iswupper
 #define  wxIsxdigit  iswxdigit
-#define  wxTolower   towlower
-#define  wxToupper   towupper
+
+    // VZ: the test is incorrect, should test for glibc2.0 somehow probably
+#ifdef __GNUG__
+    // /usr/include/wctype.h incorrectly declares translations tables which
+    // provokes tons of compile-time warnings - try to correct this
+    #define  wxTolower(wc)   towctrans((wc), (wctrans_t)__ctype_tolower)
+    #define  wxToupper(wc)   towctrans((wc), (wctrans_t)__ctype_toupper)
+#else
+    #define  wxTolower   towlower
+    #define  wxToupper   towupper
+#endif // gcc/!gcc
 
    // string.h functions (wchar.h)
 #define  wxStrcat    wcscat