diff options
author | Szabolcs Nagy <nsz@port70.net> | 2018-07-08 15:19:03 +0200 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-07-17 22:24:03 -0400 |
commit | cbf16c4abf63e47c2e8b34faac8a2a74a64973b5 (patch) | |
tree | afc8130e333b3dbaf1fd1a5f7f05ba4164e00371 /include | |
parent | 5c2f46a214fceeee3c3e41700c51415e0a4f1acd (diff) | |
download | musl-cbf16c4abf63e47c2e8b34faac8a2a74a64973b5.tar.gz musl-cbf16c4abf63e47c2e8b34faac8a2a74a64973b5.tar.bz2 musl-cbf16c4abf63e47c2e8b34faac8a2a74a64973b5.tar.xz musl-cbf16c4abf63e47c2e8b34faac8a2a74a64973b5.zip |
uchar.h: define char16_t and char32_t for old c++
including uchar.h in c++ code is only well defined in c++11 onwards
where char16_t and char32_t type definitions must be hidden since they
are keywords. however some c++ code compiled for older c++ standard
include uchar.h too and they need the typedefs, this fix makes such
code work.
Diffstat (limited to 'include')
-rw-r--r-- | include/uchar.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/uchar.h b/include/uchar.h index 8dabf1ed..7e5c4d40 100644 --- a/include/uchar.h +++ b/include/uchar.h @@ -3,7 +3,9 @@ #ifdef __cplusplus extern "C" { -#else +#endif + +#if __cplusplus < 201103L typedef unsigned short char16_t; typedef unsigned char32_t; #endif |