diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in index 79b36148a7..c94d05989a 100644 --- a/build/cmake/setup.h.in +++ b/build/cmake/setup.h.in @@ -148,11 +148,6 @@ -#ifndef wxUSE_UNICODE - #cmakedefine01 wxUSE_UNICODE -#endif - - #cmakedefine01 wxUSE_EXCEPTIONS #cmakedefine01 wxUSE_EXTENDED_RTTI diff --git a/include/wx/android/setup.h b/include/wx/android/setup.h index 04eb147ddc..8e3d287524 100644 --- a/include/wx/android/setup.h +++ b/include/wx/android/setup.h @@ -180,18 +180,6 @@ #define wxUSE_DEBUG_NEW_ALWAYS 0 -// ---------------------------------------------------------------------------- -// Unicode support -// ---------------------------------------------------------------------------- - -// 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 -// absolutely necessary -- updating it is strongly recommended as the ANSI mode -// will disappear completely in future wxWidgets releases. -#ifndef wxUSE_UNICODE - #define wxUSE_UNICODE 1 -#endif - // ---------------------------------------------------------------------------- // global features // ---------------------------------------------------------------------------- diff --git a/include/wx/gtk/setup.h b/include/wx/gtk/setup.h index 0dd052d801..366abd5a3f 100644 --- a/include/wx/gtk/setup.h +++ b/include/wx/gtk/setup.h @@ -181,18 +181,6 @@ #define wxUSE_DEBUG_NEW_ALWAYS 0 -// ---------------------------------------------------------------------------- -// Unicode support -// ---------------------------------------------------------------------------- - -// 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 -// absolutely necessary -- updating it is strongly recommended as the ANSI mode -// will disappear completely in future wxWidgets releases. -#ifndef wxUSE_UNICODE - #define wxUSE_UNICODE 1 -#endif - // ---------------------------------------------------------------------------- // global features // ---------------------------------------------------------------------------- diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h index a1905621cd..90f356c513 100644 --- a/include/wx/msw/setup.h +++ b/include/wx/msw/setup.h @@ -181,18 +181,6 @@ #define wxUSE_DEBUG_NEW_ALWAYS 0 -// ---------------------------------------------------------------------------- -// Unicode support -// ---------------------------------------------------------------------------- - -// 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 -// absolutely necessary -- updating it is strongly recommended as the ANSI mode -// will disappear completely in future wxWidgets releases. -#ifndef wxUSE_UNICODE - #define wxUSE_UNICODE 1 -#endif - // ---------------------------------------------------------------------------- // global features // ---------------------------------------------------------------------------- diff --git a/include/wx/osx/setup.h b/include/wx/osx/setup.h index d2cc1f0d8a..149ffee681 100644 --- a/include/wx/osx/setup.h +++ b/include/wx/osx/setup.h @@ -187,18 +187,6 @@ #define wxUSE_DEBUG_NEW_ALWAYS 0 -// ---------------------------------------------------------------------------- -// Unicode support -// ---------------------------------------------------------------------------- - -// 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 -// absolutely necessary -- updating it is strongly recommended as the ANSI mode -// will disappear completely in future wxWidgets releases. -#ifndef wxUSE_UNICODE - #define wxUSE_UNICODE 1 -#endif - // ---------------------------------------------------------------------------- // global features // ---------------------------------------------------------------------------- diff --git a/include/wx/platform.h b/include/wx/platform.h index 66e1ab2421..28a3f66641 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -197,30 +197,26 @@ /* - adjust the Unicode setting: wxUSE_UNICODE should be defined as 0 or 1 - and is used by wxWidgets, _UNICODE and/or UNICODE may be defined or used by - the system headers so bring these settings in sync + Always define wxUSE_UNICODE as 1 for compatibility. + + Additionally, define _UNICODE and UNICODE too: this is used by MSW SDK/CRT + headers and also may be used by wx applications code. */ -/* set wxUSE_UNICODE to 1 if UNICODE or _UNICODE is defined */ -#if defined(_UNICODE) || defined(UNICODE) -# undef wxUSE_UNICODE +#ifdef wxUSE_UNICODE +# if wxUSE_UNICODE != 1 +# error "wxUSE_UNICODE may be only defined as 1" +# endif +#else # define wxUSE_UNICODE 1 -#else /* !UNICODE */ -# ifndef wxUSE_UNICODE -# define wxUSE_UNICODE 0 -# endif -#endif /* UNICODE/!UNICODE */ +#endif -/* and vice versa: define UNICODE and _UNICODE if wxUSE_UNICODE is 1 */ -#if wxUSE_UNICODE -# ifndef _UNICODE -# define _UNICODE -# endif -# ifndef UNICODE -# define UNICODE -# endif -#endif /* wxUSE_UNICODE */ +#ifndef _UNICODE +# define _UNICODE +#endif +#ifndef UNICODE +# define UNICODE +#endif diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index f76e744321..d2f534ee96 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -177,18 +177,6 @@ #define wxUSE_DEBUG_NEW_ALWAYS 0 -// ---------------------------------------------------------------------------- -// Unicode support -// ---------------------------------------------------------------------------- - -// 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 -// absolutely necessary -- updating it is strongly recommended as the ANSI mode -// will disappear completely in future wxWidgets releases. -#ifndef wxUSE_UNICODE - #define wxUSE_UNICODE 1 -#endif - // ---------------------------------------------------------------------------- // global features // ---------------------------------------------------------------------------- diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h index fcda796cec..3ed6cd3113 100644 --- a/include/wx/univ/setup.h +++ b/include/wx/univ/setup.h @@ -180,18 +180,6 @@ #define wxUSE_DEBUG_NEW_ALWAYS 0 -// ---------------------------------------------------------------------------- -// Unicode support -// ---------------------------------------------------------------------------- - -// 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 -// absolutely necessary -- updating it is strongly recommended as the ANSI mode -// will disappear completely in future wxWidgets releases. -#ifndef wxUSE_UNICODE - #define wxUSE_UNICODE 1 -#endif - // ---------------------------------------------------------------------------- // global features // ---------------------------------------------------------------------------- diff --git a/setup.h.in b/setup.h.in index 384e818e4e..ace1560807 100644 --- a/setup.h.in +++ b/setup.h.in @@ -151,11 +151,6 @@ -#ifndef wxUSE_UNICODE - #define wxUSE_UNICODE 0 -#endif - - #define wxUSE_EXCEPTIONS 0 #define wxUSE_EXTENDED_RTTI 0