From 8311715bdf2d0e3446c6875efec945ff1b87fb6b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 21 Jun 2017 19:08:27 +0200 Subject: [PATCH] Ensure that SIZEOF_WCHAR_T is defined in wx/chartype.h This should always the case now, but wasn't when not using configure (e.g. in MSVC builds) before, so verify this explicitly to ensure that we don't just silently define wxUSE_UNICODE_UTF16 wrongly, as it happened before the fix in the previous commit. --- include/wx/chartype.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/wx/chartype.h b/include/wx/chartype.h index 0e81a3344d..3ff445f602 100644 --- a/include/wx/chartype.h +++ b/include/wx/chartype.h @@ -175,6 +175,10 @@ #define wxUSE_UTF8_LOCALE_ONLY 0 #endif +#ifndef SIZEOF_WCHAR_T + #error "SIZEOF_WCHAR_T must be defined before including this file in wx/defs.h" +#endif + #if wxUSE_UNICODE_WCHAR && SIZEOF_WCHAR_T == 2 #define wxUSE_UNICODE_UTF16 1 #else