include: Fix undefined char16_t in C11.
In c++11 char16_t is a distinct fundamental type, but in c11 it is merely a typedef in <uchar.h>. Explicitly mention char16_t only in c++11 (where it is built-in), otherwise define WCHAR as unsigned short (without naming char16_t) and just hope that on C11 this matches u"..." Remove WINE_UNICODE_CHAR16; it is now the default when supported. Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bda21aa992
commit
d45b3d4fdd
|
@ -30,7 +30,7 @@ extern "C" {
|
|||
typedef unsigned char SQLCHAR;
|
||||
#if defined(WINE_UNICODE_NATIVE)
|
||||
typedef wchar_t SQLWCHAR;
|
||||
#elif defined(WINE_UNICODE_CHAR16)
|
||||
#elif __cpp_unicode_literals >= 200710
|
||||
typedef char16_t SQLWCHAR;
|
||||
#else
|
||||
typedef unsigned short SQLWCHAR;
|
||||
|
|
|
@ -240,7 +240,7 @@ typedef unsigned short wctype_t;
|
|||
#ifndef __TCHAR_DEFINED
|
||||
#if defined(WINE_UNICODE_NATIVE)
|
||||
typedef wchar_t _TCHAR;
|
||||
#elif defined(WINE_UNICODE_CHAR16)
|
||||
#elif __cpp_unicode_literals >= 200710
|
||||
typedef char16_t _TCHAR;
|
||||
#else
|
||||
typedef unsigned short _TCHAR;
|
||||
|
|
|
@ -462,7 +462,7 @@ typedef int LONG, *PLONG;
|
|||
/* Some systems might have wchar_t, but we really need 16 bit characters */
|
||||
#if defined(WINE_UNICODE_NATIVE)
|
||||
typedef wchar_t WCHAR;
|
||||
#elif defined(WINE_UNICODE_CHAR16)
|
||||
#elif __cpp_unicode_literals >= 200710
|
||||
typedef char16_t WCHAR;
|
||||
#else
|
||||
typedef unsigned short WCHAR;
|
||||
|
|
Loading…
Reference in New Issue