]> git.saurik.com Git - wxWidgets.git/commitdiff
Heavier checks for wxUSE_WCHAR_T
authorOve Kaaven <ovek@arcticnet.no>
Mon, 26 Apr 1999 10:33:43 +0000 (10:33 +0000)
committerOve Kaaven <ovek@arcticnet.no>
Mon, 26 Apr 1999 10:33:43 +0000 (10:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/wxchar.h

index 6b44b31fadeca0f210252762a8e5515488f5cdd9..065cd7da36cb7c443428874504ecf5f67fc8c92f 100644 (file)
@@ -205,15 +205,22 @@ inline WORD __wxMSW_ctype(wxChar ch)
 
 // check whether we should include wchar.h or equivalent
 #if wxUSE_UNICODE
-#undef wxUSE_WCHAR_T
-#define wxUSE_WCHAR_T 1 // wchar_t *must* be available in Unicode mode
+ #undef wxUSE_WCHAR_T
+ #define wxUSE_WCHAR_T 1 // wchar_t *must* be available in Unicode mode
 #elif !defined(wxUSE_WCHAR_T)
-#if defined(__VISUALC__) && (__VISUALC__ < 900)
-#define wxUSE_WCHAR_T 0 // wchar_t is not available for MSVC++ 1.5
-#else
-#define wxUSE_WCHAR_T 1
-#endif
-#endif
+ #if defined(__VISUALC__) && (__VISUALC__ < 900)
+  #define wxUSE_WCHAR_T 0 // wchar_t is not available for MSVC++ 1.5
+ #elif defined(__UNIX__)
+  #if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H)
+   #define wxUSE_WCHAR_T 1
+  #else
+   #define wxUSE_WCHAR_T 0
+  #endif
+ #else
+  // add additional compiler checks if this fails
+  #define wxUSE_WCHAR_T 1
+ #endif
+#endif//wxUSE_UNICODE
 
 #if wxUSE_WCHAR_T
 #ifdef HAVE_WCSTR_H