From 7af284fda7500594b2ab86c8ba60138164ab4d04 Mon Sep 17 00:00:00 2001
From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= <vslavik@fastmail.fm>
Date: Sun, 19 Aug 2001 22:22:59 +0000
Subject: [PATCH] nicer version compilation fix for wxUSE_WCHAR_T=0 (why should
 we duplicate definitions in all #ifdef branches???)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/common/strconv.cpp | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp
index 8b97f59337..82656dd1d2 100644
--- a/src/common/strconv.cpp
+++ b/src/common/strconv.cpp
@@ -37,6 +37,25 @@
 #include <string.h>
 #include <stdlib.h>
 
+
+#include "wx/debug.h"
+#include "wx/strconv.h"
+#include "wx/intl.h"
+#include "wx/log.h"
+
+// ----------------------------------------------------------------------------
+// globals
+// ----------------------------------------------------------------------------
+
+WXDLLEXPORT_DATA(wxMBConv *) wxConvCurrent = &wxConvLibc;
+
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+#if wxUSE_WCHAR_T
+
 #ifdef __SALFORDC__
   #include <clib.h>
 #endif
@@ -49,12 +68,6 @@
   #include <windows.h>
 #endif
 
-#include "wx/debug.h"
-#include "wx/strconv.h"
-#include "wx/intl.h"
-#include "wx/log.h"
-
-#if wxUSE_WCHAR_T
 #define BSWAP_UCS4(str, len) { unsigned _c; for (_c=0; _c<len; _c++) str[_c]=wxUINT32_SWAP_ALWAYS(str[_c]); }
 #define BSWAP_UTF16(str, len) { unsigned _c; for (_c=0; _c<len; _c++) str[_c]=wxUINT16_SWAP_ALWAYS(str[_c]); }
 
@@ -86,15 +99,6 @@
     #error "Weird sizeof(wchar_t): please report your platform details to wx-users mailing list"
 #endif
 
-// ----------------------------------------------------------------------------
-// globals
-// ----------------------------------------------------------------------------
-
-WXDLLEXPORT_DATA(wxMBConv *) wxConvCurrent = &wxConvLibc;
-
-// ============================================================================
-// implementation
-// ============================================================================
 
 #ifdef WC_UTF16
 
@@ -969,7 +973,6 @@ public:
 // ----------------------------------------------------------------------------
 
 WXDLLEXPORT_DATA(wxMBConv) wxConvLibc, wxConvFile;
-WXDLLEXPORT_DATA(wxMBConv *) wxConvCurrent = &wxConvLibc;
 
 #endif // wxUSE_WCHAR_T
 
-- 
2.47.2