Detect XML_UNICODE_WCHAR_T with sizeof(wchar_t) != 2 (issue #33)

This commit is contained in:
Sebastian Pipping 2017-05-29 00:03:02 +02:00
parent 4be2cb5afc
commit 11f5e68e30

View file

@ -93,7 +93,10 @@ extern "C" {
#endif
#ifdef XML_UNICODE_WCHAR_T
#define XML_UNICODE
# define XML_UNICODE
# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2)
# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc"
# endif
#endif
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */