@@ -20,16 +20,20 @@ if [ "$cxx_type" = "Ubuntu" ] || [ "$cxx_type" = "Debian" ]; then
2020fi
2121
2222# TODO: generate defines from compiler
23- if [ " $cxx_type " = " g++" ]; then
23+ if [ " $cxx_type " = " g++" ] || [ " $cxx_type " = " g++.exe " ] ; then
2424 defs=
2525 defs=" $defs -D__GNUC__"
2626 defs=" $defs -D__STDC__"
2727 defs=" $defs -D__x86_64__"
2828 defs=" $defs -D__STDC_HOSTED__"
2929 defs=" $defs -D__CHAR_BIT__=8"
30+ if [ " ${MSYSTEM} " = " MINGW32" ] || [ " ${MSYSTEM} " = " MINGW64" ]; then
31+ defs=" $defs -D_WIN32"
32+ fi
3033 defs=" $defs -D__has_builtin(x)=(1)"
3134 defs=" $defs -D__has_cpp_attribute(x)=(1)"
3235 defs=" $defs -D__has_attribute(x)=(1)"
36+ defs=" $defs -Ddefined(x)=(0)"
3337
3438 inc=
3539 while read line
@@ -42,12 +46,19 @@ elif [ "$cxx_type" = "clang" ]; then
4246 defs=" $defs -D__x86_64__"
4347 defs=" $defs -D__STDC_HOSTED__"
4448 defs=" $defs -D__CHAR_BIT__=8"
49+ defs=" $defs -D__BYTE_ORDER__=1234"
50+ defs=" $defs -D__SIZEOF_SIZE_T__=8"
51+ if [ " ${MSYSTEM} " = " MINGW32" ] || [ " ${MSYSTEM} " = " MINGW64" ] || [ " ${MSYSTEM} " = " CLANG64" ]; then
52+ defs=" $defs -D_WIN32"
53+ fi
4554 defs=" $defs -D__has_builtin(x)=(1)"
4655 defs=" $defs -D__has_cpp_attribute(x)=(1)"
4756 defs=" $defs -D__has_feature(x)=(1)"
48- defs=" $defs -D__has_include_next(x)=(0 )"
57+ defs=" $defs -D__has_include_next(x)=(1 )"
4958 defs=" $defs -D__has_attribute(x)=(0)"
5059 defs=" $defs -D__building_module(x)=(0)"
60+ defs=" $defs -D__has_extension(x)=(1)"
61+ defs=" $defs -Ddefined(x)=(0)"
5162
5263 inc=
5364 while read line
0 commit comments