Remove wxUSE_WCHAR_T, it must always be 1 anyhow
This is not really an option as building requires it to be 1, so don't make it one in setup.h/configure/cmake and just hardcode it as 1 for compatibility. Closes #18558.
This commit is contained in:
@@ -194,9 +194,6 @@ endif()
|
|||||||
|
|
||||||
# Constants for setup.h creation
|
# Constants for setup.h creation
|
||||||
set(wxUSE_STD_DEFAULT ON)
|
set(wxUSE_STD_DEFAULT ON)
|
||||||
if(wxUSE_UNICODE)
|
|
||||||
set(wxUSE_WCHAR_T ON)
|
|
||||||
endif()
|
|
||||||
if(NOT wxUSE_EXPAT)
|
if(NOT wxUSE_EXPAT)
|
||||||
set(wxUSE_XRC OFF)
|
set(wxUSE_XRC OFF)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -182,8 +182,6 @@
|
|||||||
#cmakedefine01 wxUSE_UNICODE
|
#cmakedefine01 wxUSE_UNICODE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#cmakedefine01 wxUSE_WCHAR_T
|
|
||||||
|
|
||||||
|
|
||||||
#cmakedefine01 wxUSE_EXCEPTIONS
|
#cmakedefine01 wxUSE_EXCEPTIONS
|
||||||
|
|
||||||
|
2
configure
vendored
2
configure
vendored
@@ -19573,8 +19573,6 @@ _ACEOF
|
|||||||
if test "$ac_cv_sizeof_wchar_t" = 0; then
|
if test "$ac_cv_sizeof_wchar_t" = 0; then
|
||||||
as_fn_error $? "wxWidgets requires wchar_t support." "$LINENO" 5
|
as_fn_error $? "wxWidgets requires wchar_t support." "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
$as_echo "#define wxUSE_WCHAR_T 1" >>confdefs.h
|
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
|
||||||
$as_echo_n "checking for va_copy... " >&6; }
|
$as_echo_n "checking for va_copy... " >&6; }
|
||||||
|
@@ -1561,7 +1561,6 @@ AC_CHECK_SIZEOF(wchar_t, 0,
|
|||||||
if test "$ac_cv_sizeof_wchar_t" = 0; then
|
if test "$ac_cv_sizeof_wchar_t" = 0; then
|
||||||
AC_MSG_ERROR([wxWidgets requires wchar_t support.])
|
AC_MSG_ERROR([wxWidgets requires wchar_t support.])
|
||||||
fi
|
fi
|
||||||
AC_DEFINE(wxUSE_WCHAR_T)
|
|
||||||
|
|
||||||
dnl checks needed to define wxVaCopy
|
dnl checks needed to define wxVaCopy
|
||||||
AC_CACHE_CHECK([for va_copy],
|
AC_CACHE_CHECK([for va_copy],
|
||||||
|
@@ -183,7 +183,7 @@
|
|||||||
// Unicode support
|
// Unicode support
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// These settings are obsolete: the library is always built in Unicode mode
|
// This option is deprecated: the library should be always built in Unicode mode
|
||||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||||
// will disappear completely in future wxWidgets releases.
|
// will disappear completely in future wxWidgets releases.
|
||||||
@@ -191,9 +191,6 @@
|
|||||||
#define wxUSE_UNICODE 1
|
#define wxUSE_UNICODE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
|
||||||
#define wxUSE_WCHAR_T 1
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// global features
|
// global features
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -21,26 +21,9 @@
|
|||||||
*/
|
*/
|
||||||
#include "wx/types.h"
|
#include "wx/types.h"
|
||||||
|
|
||||||
/* check whether we have wchar_t and which size it is if we do */
|
/* This is kept only for backwards compatibility, in case some application code
|
||||||
#if !defined(wxUSE_WCHAR_T)
|
checks for it. It's always 1 and can't be changed. */
|
||||||
#if defined(__UNIX__)
|
#define wxUSE_WCHAR_T 1
|
||||||
#if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__) || defined(__DARWIN__)
|
|
||||||
#define wxUSE_WCHAR_T 1
|
|
||||||
#else
|
|
||||||
#define wxUSE_WCHAR_T 0
|
|
||||||
#endif
|
|
||||||
#elif defined(__GNUWIN32__) && !defined(__MINGW32__)
|
|
||||||
#define wxUSE_WCHAR_T 0
|
|
||||||
#else
|
|
||||||
/* add additional compiler checks if this fails */
|
|
||||||
#define wxUSE_WCHAR_T 1
|
|
||||||
#endif
|
|
||||||
#endif /* !defined(wxUSE_WCHAR_T) */
|
|
||||||
|
|
||||||
/* Unicode support requires wchar_t */
|
|
||||||
#if !wxUSE_WCHAR_T
|
|
||||||
#error "wchar_t must be available"
|
|
||||||
#endif /* Unicode */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
non Unix compilers which do have wchar.h (but not tchar.h which is included
|
non Unix compilers which do have wchar.h (but not tchar.h which is included
|
||||||
@@ -123,11 +106,6 @@
|
|||||||
#ifdef wxHAVE_TCHAR_SUPPORT
|
#ifdef wxHAVE_TCHAR_SUPPORT
|
||||||
/* get TCHAR definition if we've got it */
|
/* get TCHAR definition if we've got it */
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
|
||||||
/* we surely do have wchar_t if we have TCHAR */
|
|
||||||
#ifndef wxUSE_WCHAR_T
|
|
||||||
#define wxUSE_WCHAR_T 1
|
|
||||||
#endif /* !defined(wxUSE_WCHAR_T) */
|
|
||||||
#endif /* wxHAVE_TCHAR_SUPPORT */
|
#endif /* wxHAVE_TCHAR_SUPPORT */
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
@@ -184,7 +184,7 @@
|
|||||||
// Unicode support
|
// Unicode support
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// These settings are obsolete: the library is always built in Unicode mode
|
// This option is deprecated: the library should be always built in Unicode mode
|
||||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||||
// will disappear completely in future wxWidgets releases.
|
// will disappear completely in future wxWidgets releases.
|
||||||
@@ -192,9 +192,6 @@
|
|||||||
#define wxUSE_UNICODE 1
|
#define wxUSE_UNICODE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
|
||||||
#define wxUSE_WCHAR_T 1
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// global features
|
// global features
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -184,7 +184,7 @@
|
|||||||
// Unicode support
|
// Unicode support
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// These settings are obsolete: the library is always built in Unicode mode
|
// This option is deprecated: the library should be always built in Unicode mode
|
||||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||||
// will disappear completely in future wxWidgets releases.
|
// will disappear completely in future wxWidgets releases.
|
||||||
@@ -192,9 +192,6 @@
|
|||||||
#define wxUSE_UNICODE 1
|
#define wxUSE_UNICODE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
|
||||||
#define wxUSE_WCHAR_T 1
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// global features
|
// global features
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -175,14 +175,6 @@
|
|||||||
# undef wxUSE_DEBUG_NEW_ALWAYS
|
# undef wxUSE_DEBUG_NEW_ALWAYS
|
||||||
# define wxUSE_DEBUG_NEW_ALWAYS 0
|
# define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||||
|
|
||||||
/* some Cygwin versions don't have wcslen */
|
|
||||||
# if defined(__CYGWIN__) || defined(__CYGWIN32__)
|
|
||||||
# if ! ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95)))
|
|
||||||
# undef wxUSE_WCHAR_T
|
|
||||||
# define wxUSE_WCHAR_T 0
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __GNUWIN32__ */
|
#endif /* __GNUWIN32__ */
|
||||||
|
|
||||||
/* MinGW32 doesn't provide wincred.h defining the API needed by this */
|
/* MinGW32 doesn't provide wincred.h defining the API needed by this */
|
||||||
|
@@ -184,7 +184,7 @@
|
|||||||
// Unicode support
|
// Unicode support
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// These settings are obsolete: the library is always built in Unicode mode
|
// This option is deprecated: the library should be always built in Unicode mode
|
||||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||||
// will disappear completely in future wxWidgets releases.
|
// will disappear completely in future wxWidgets releases.
|
||||||
@@ -192,9 +192,6 @@
|
|||||||
#define wxUSE_UNICODE 1
|
#define wxUSE_UNICODE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
|
||||||
#define wxUSE_WCHAR_T 1
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// global features
|
// global features
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -190,7 +190,7 @@
|
|||||||
// Unicode support
|
// Unicode support
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// These settings are obsolete: the library is always built in Unicode mode
|
// This option is deprecated: the library should be always built in Unicode mode
|
||||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||||
// will disappear completely in future wxWidgets releases.
|
// will disappear completely in future wxWidgets releases.
|
||||||
@@ -198,9 +198,6 @@
|
|||||||
#define wxUSE_UNICODE 1
|
#define wxUSE_UNICODE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
|
||||||
#define wxUSE_WCHAR_T 1
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// global features
|
// global features
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -180,7 +180,7 @@
|
|||||||
// Unicode support
|
// Unicode support
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// These settings are obsolete: the library is always built in Unicode mode
|
// This option is deprecated: the library should be always built in Unicode mode
|
||||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||||
// will disappear completely in future wxWidgets releases.
|
// will disappear completely in future wxWidgets releases.
|
||||||
@@ -188,9 +188,6 @@
|
|||||||
#define wxUSE_UNICODE 1
|
#define wxUSE_UNICODE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
|
||||||
#define wxUSE_WCHAR_T 1
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// global features
|
// global features
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -183,7 +183,7 @@
|
|||||||
// Unicode support
|
// Unicode support
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// These settings are obsolete: the library is always built in Unicode mode
|
// This option is deprecated: the library should be always built in Unicode mode
|
||||||
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if
|
||||||
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
// absolutely necessary -- updating it is strongly recommended as the ANSI mode
|
||||||
// will disappear completely in future wxWidgets releases.
|
// will disappear completely in future wxWidgets releases.
|
||||||
@@ -191,9 +191,6 @@
|
|||||||
#define wxUSE_UNICODE 1
|
#define wxUSE_UNICODE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// wxUSE_WCHAR_T is required by wxWidgets now, don't change.
|
|
||||||
#define wxUSE_WCHAR_T 1
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// global features
|
// global features
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -182,8 +182,6 @@
|
|||||||
#define wxUSE_UNICODE 0
|
#define wxUSE_UNICODE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define wxUSE_WCHAR_T 0
|
|
||||||
|
|
||||||
|
|
||||||
#define wxUSE_EXCEPTIONS 0
|
#define wxUSE_EXCEPTIONS 0
|
||||||
|
|
||||||
|
@@ -218,8 +218,6 @@ typedef pid_t GPid;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define wxUSE_WCHAR_T 1
|
|
||||||
|
|
||||||
|
|
||||||
#define wxUSE_EXCEPTIONS 1
|
#define wxUSE_EXCEPTIONS 1
|
||||||
|
|
||||||
|
@@ -502,16 +502,12 @@ bool wxHtmlHelpData::AddBookParam(const wxFSFile& bookfile,
|
|||||||
const wxString& indexfile, const wxString& deftopic,
|
const wxString& indexfile, const wxString& deftopic,
|
||||||
const wxString& path)
|
const wxString& path)
|
||||||
{
|
{
|
||||||
#if wxUSE_WCHAR_T
|
#if wxUSE_UNICODE
|
||||||
#if wxUSE_UNICODE
|
|
||||||
#define CORRECT_STR(str, conv) \
|
#define CORRECT_STR(str, conv) \
|
||||||
str = wxString((str).mb_str(wxConvISO8859_1), conv)
|
str = wxString((str).mb_str(wxConvISO8859_1), conv)
|
||||||
#else
|
#else
|
||||||
#define CORRECT_STR(str, conv) \
|
#define CORRECT_STR(str, conv) \
|
||||||
str = wxString((str).wc_str(conv), wxConvLocal)
|
str = wxString((str).wc_str(conv), wxConvLocal)
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define CORRECT_STR(str, conv)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxFileSystem fsys;
|
wxFileSystem fsys;
|
||||||
|
Reference in New Issue
Block a user