compilation fixes for wxUSE_WCHAR_T==0 (this is the case for DJGPP which is used for wxMGL compilation)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1197,6 +1197,18 @@
|
||||
# endif
|
||||
#endif /* wxUSE_ZIPSTREAM */
|
||||
|
||||
#if wxUSE_TARSTREAM
|
||||
/* wxTar doesn't currently compile without wchar_t */
|
||||
# if !wxUSE_WCHAR_T
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxTar requires wchar_t"
|
||||
# else
|
||||
# undef wxUSE_TARSTREAM
|
||||
# define wxUSE_TARSTREAM 0
|
||||
# endif
|
||||
# endif
|
||||
#endif /* wxUSE_TARSTREAM */
|
||||
|
||||
#if wxUSE_TARSTREAM
|
||||
# if !wxUSE_ARCHIVE_STREAMS
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
|
@@ -95,7 +95,14 @@ private:
|
||||
DECLARE_NO_ASSIGN_CLASS(wxConvAuto)
|
||||
};
|
||||
|
||||
#endif // wxUSE_WCHAR_T
|
||||
#else // !wxUSE_WCHAR_T
|
||||
|
||||
// it doesn't matter how we define it in this case as it's unused anyhow, but
|
||||
// do define it to allow the code using wxConvAuto() as default argument (this
|
||||
// is done in many places) to compile
|
||||
typedef wxMBConv wxConvAuto;
|
||||
|
||||
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
|
||||
|
||||
#endif // _WX_CONVAUTO_H_
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#define wxGTK_CONV_FONT(s, font) wxGTK_CONV((s))
|
||||
#define wxGTK_CONV_SYS(s) wxGTK_CONV((s))
|
||||
#define wxGTK_CONV_BACK(s) wxConvUTF8.cMB2WX((s))
|
||||
#else
|
||||
#elif wxUSE_WCHAR_T
|
||||
#include "wx/font.h"
|
||||
|
||||
// convert the text in given encoding to UTF-8 used by wxGTK
|
||||
@@ -49,6 +49,12 @@
|
||||
#define wxGTK_CONV(s) wxGTK_CONV_FONT((s), m_font)
|
||||
#define wxGTK_CONV_SYS(s) wxConvertToGTK((s))
|
||||
#define wxGTK_CONV_BACK(s) wxConvLocal.cWC2WX(wxConvUTF8.cMB2WC((s)))
|
||||
#else // we're limited to ASCII
|
||||
#define wxGTK_CONV_ENC(s, enc) (s)
|
||||
#define wxGTK_CONV_FONT(s, font) (s)
|
||||
#define wxGTK_CONV(s) (s)
|
||||
#define wxGTK_CONV_SYS(s) (s)
|
||||
#define wxGTK_CONV_BACK(s) (wxString(s))
|
||||
#endif
|
||||
|
||||
// Some deprecated GTK+ prototypes we still use often
|
||||
|
@@ -500,9 +500,13 @@ class WXDLLIMPEXP_BASE wxMBConv
|
||||
public:
|
||||
const char* cMB2WX(const char *psz) const { return psz; }
|
||||
const char* cWX2MB(const char *psz) const { return psz; }
|
||||
wxMBConv *Clone() const { return NULL; }
|
||||
};
|
||||
|
||||
#define wxConvFile wxConvLocal
|
||||
#define wxConvUI wxConvCurrent
|
||||
|
||||
typedef wxMBConv wxCSConv;
|
||||
|
||||
extern WXDLLIMPEXP_DATA_BASE(wxMBConv) wxConvLibc,
|
||||
wxConvLocal,
|
||||
@@ -513,8 +517,7 @@ extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvCurrent;
|
||||
#define wxFNCONV(name) name
|
||||
#define wxFNSTRINGCAST WXSTRINGCAST
|
||||
|
||||
#endif
|
||||
// wxUSE_WCHAR_T
|
||||
#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// macros for the most common conversions
|
||||
|
Reference in New Issue
Block a user