]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/strconv.cpp
fixing mngw32 (cross)compilation
[wxWidgets.git] / src / common / strconv.cpp
index 9c505d0cc82c9b815b42d2da03aabbff299ea687..69f9a7a85a497ab12979ea12b967a0dd3574cee9 100644 (file)
   #pragma hdrstop
 #endif
 
   #pragma hdrstop
 #endif
 
+#ifdef __WXMSW__
+  #include "wx/msw/private.h"
+#endif
+
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
 #include <errno.h>
 #include <ctype.h>
 #include <string.h>
   #include <langinfo.h>
 #endif
 
   #include <langinfo.h>
 #endif
 
+#ifdef __WXMSW__
+  #include <windows.h>
+#endif
+
 #include "wx/debug.h"
 #include "wx/strconv.h"
 
 #include "wx/debug.h"
 #include "wx/strconv.h"
 
-#ifdef WORDS_BIGENDIAN
+#if defined(WORDS_BIGENDIAN) || defined(__STDC_ISO_10646__)
 #define BSWAP_UCS4(str, len)
 #define BSWAP_UCS2(str, len)
 #else
 #define BSWAP_UCS4(str, len)
 #define BSWAP_UCS2(str, len)
 #else
@@ -79,6 +87,8 @@ WXDLLEXPORT_DATA(wxMBConv *) wxConvCurrent = &wxConvLibc;
 
 #if wxUSE_WCHAR_T
 
 
 #if wxUSE_WCHAR_T
 
+#ifdef WC_UTF16
+
 static size_t encode_utf16(wxUint32 input,wxUint16*output)
 {
   if (input<=0xffff) {
 static size_t encode_utf16(wxUint32 input,wxUint16*output)
 {
   if (input<=0xffff) {
@@ -111,6 +121,8 @@ static size_t decode_utf16(wxUint16*input,wxUint32&output)
   }
 }
 
   }
 }
 
+#endif // WC_UTF16
+
 // ----------------------------------------------------------------------------
 // wxMBConv
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxMBConv
 // ----------------------------------------------------------------------------