Commit d45b3d4f authored by Kevin Puetz's avatar Kevin Puetz Committed by Alexandre Julliard

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: 's avatarKevin Puetz <PuetzKevinA@JohnDeere.com> Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent bda21aa9
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment