@@ -41,16 +41,20 @@ if [ "$cxx_type" = "Ubuntu" ] || [ "$cxx_type" = "Debian" ]; then
4141fi
4242
4343# TODO: generate defines from compiler
44- if [ " $cxx_type " = " g++" ]; then
44+ if [ " $cxx_type " = " g++" ] || [ " $cxx_type " = " g++.exe " ] ; then
4545 defs=
4646 defs=" $defs -D__GNUC__"
4747 defs=" $defs -D__STDC__"
4848 defs=" $defs -D__x86_64__"
4949 defs=" $defs -D__STDC_HOSTED__"
5050 defs=" $defs -D__CHAR_BIT__=8"
51+ if [ " ${MSYSTEM} " = " MINGW32" ] || [ " ${MSYSTEM} " = " MINGW64" ]; then
52+ defs=" $defs -D_WIN32"
53+ fi
5154 defs=" $defs -D__has_builtin(x)=(1)"
5255 defs=" $defs -D__has_cpp_attribute(x)=(1)"
5356 defs=" $defs -D__has_attribute(x)=(1)"
57+ defs=" $defs -Ddefined(x)=(0)"
5458
5559 inc=
5660 while read line
@@ -63,12 +67,19 @@ elif [ "$cxx_type" = "clang" ]; then
6367 defs=" $defs -D__x86_64__"
6468 defs=" $defs -D__STDC_HOSTED__"
6569 defs=" $defs -D__CHAR_BIT__=8"
70+ defs=" $defs -D__BYTE_ORDER__=1234"
71+ defs=" $defs -D__SIZEOF_SIZE_T__=8"
72+ if [ " ${MSYSTEM} " = " MINGW32" ] || [ " ${MSYSTEM} " = " MINGW64" ] || [ " ${MSYSTEM} " = " CLANG64" ]; then
73+ defs=" $defs -D_WIN32"
74+ fi
6675 defs=" $defs -D__has_builtin(x)=(1)"
6776 defs=" $defs -D__has_cpp_attribute(x)=(1)"
6877 defs=" $defs -D__has_feature(x)=(1)"
69- defs=" $defs -D__has_include_next(x)=(0 )"
78+ defs=" $defs -D__has_include_next(x)=(1 )"
7079 defs=" $defs -D__has_attribute(x)=(0)"
7180 defs=" $defs -D__building_module(x)=(0)"
81+ defs=" $defs -D__has_extension(x)=(1)"
82+ defs=" $defs -Ddefined(x)=(0)"
7283
7384 inc=
7485 while read line
0 commit comments