]> git.saurik.com Git - wxWidgets.git/commitdiff
use ifdef, not if, to test for HAVE_WCSRTOMBS
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 4 Aug 2005 21:02:15 +0000 (21:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 4 Aug 2005 21:02:15 +0000 (21:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wxchar.cpp

index 94b56cde9e2248055d475505a5a8df0964f65196..64b05d266710efbd4585305eb8a4741c17f186cb 100644 (file)
@@ -65,7 +65,7 @@ using namespace std ;
 size_t WXDLLEXPORT wxMB2WC(wchar_t *buf, const char *psz, size_t n)
 {
   // assume that we have mbsrtowcs() too if we have wcsrtombs()
-#if HAVE_WCSRTOMBS
+#ifdef HAVE_WCSRTOMBS
   mbstate_t mbstate;
   memset(&mbstate, 0, sizeof(mbstate_t));
 #endif
@@ -91,7 +91,7 @@ size_t WXDLLEXPORT wxMB2WC(wchar_t *buf, const char *psz, size_t n)
 
 size_t WXDLLEXPORT wxWC2MB(char *buf, const wchar_t *pwz, size_t n)
 {
-#if HAVE_WCSRTOMBS
+#ifdef HAVE_WCSRTOMBS
   mbstate_t mbstate;
   memset(&mbstate, 0, sizeof(mbstate_t));
 #endif
@@ -102,14 +102,14 @@ size_t WXDLLEXPORT wxWC2MB(char *buf, const wchar_t *pwz, size_t n)
       if (n) *buf = '\0';
       return 0;
     }
-#if HAVE_WCSRTOMBS
+#ifdef HAVE_WCSRTOMBS
     return wcsrtombs(buf, &pwz, n, &mbstate);
 #else
     return wxWcstombs(buf, pwz, n);
 #endif
   }
 
-#if HAVE_WCSRTOMBS
+#ifdef HAVE_WCSRTOMBS
   return wcsrtombs((char *) NULL, &pwz, 0, &mbstate);
 #else
   return wxWcstombs((char *) NULL, pwz, 0);