don't define wchar_t on c++

it's a keyword in c++ (wtf). i'm not sure this is the cleanest
solution; it might be better to avoid ever defining __NEED_wchar_t on
c++. but in any case, this works for now.
This commit is contained in:
Rich Felker 2011-10-15 00:28:49 -04:00
parent 2bb75db611
commit 1d3c276807
3 changed files with 6 additions and 0 deletions

View File

@ -22,7 +22,9 @@ TYPEDEF long ptrdiff_t;
TYPEDEF __builtin_va_list va_list;
#ifndef __cplusplus
TYPEDEF unsigned wchar_t;
#endif
TYPEDEF int wint_t;
TYPEDEF long wctrans_t;
TYPEDEF long wctype_t;

View File

@ -26,11 +26,13 @@ TYPEDEF __builtin_va_list va_list;
TYPEDEF struct __va_list * va_list;
#endif
#ifndef __cplusplus
#ifdef __WCHAR_TYPE__
TYPEDEF __WCHAR_TYPE__ wchar_t;
#else
TYPEDEF long wchar_t;
#endif
#endif
TYPEDEF long wint_t;
TYPEDEF long wctrans_t;
TYPEDEF long wctype_t;

View File

@ -21,7 +21,9 @@ TYPEDEF long ssize_t;
TYPEDEF long ptrdiff_t;
TYPEDEF __builtin_va_list va_list;
#ifndef __cplusplus
TYPEDEF int wchar_t;
#endif
TYPEDEF int wint_t;
TYPEDEF int wctrans_t;
TYPEDEF int wctype_t;