diff options
author | wm4 <wm4@nowhere> | 2015-07-30 21:50:11 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-07-30 21:50:11 +0200 |
commit | fefac2c941149fb49bcb5126060be74494d0c287 (patch) | |
tree | 9835f45627a3c3bbb18f8e037ed0ff5ea24606a8 /waftools/detections | |
parent | c8fab7cc7b98af8da0bf734dbdb1a3efc5db977e (diff) |
win32: more wchar_t -> WCHAR replacements
This was essentially missing from commit 0b52ac8a.
Since L"..." string literals have the type wchar_t[], we can't use them
for UTF-16 strings. Use C11 u"..." string literals instead. These have
the type char16_t[], but we simply assume char16_t is the same
underlying type as WCHAR. In practice, they're both unsigned short.
For this reason use -std=c11 on Windows. Since Windows is a "special"
environment (we require either MinGW or Cygwin), we don't need to worry
too much about compiler compatibility.
Diffstat (limited to 'waftools/detections')
-rw-r--r-- | waftools/detections/compiler.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py index d3e6b34455..29b90127f0 100644 --- a/waftools/detections/compiler.py +++ b/waftools/detections/compiler.py @@ -51,6 +51,7 @@ def __add_clang_flags__(ctx): def __add_mswin_flags__(ctx): ctx.env.CFLAGS += ['-D_WIN32_WINNT=0x600', '-DUNICODE', '-DCOBJMACROS', '-U__STRICT_ANSI__'] + ctx.env.CFLAGS += ['-std=c11'] def __add_mingw_flags__(ctx): __add_mswin_flags__(ctx) |