Skip to content

Commit 0ea7395

Browse files
committed
mingw
1 parent da2c8d5 commit 0ea7395

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

selfcheck.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [ "$cxx_type" = "Ubuntu" ] || [ "$cxx_type" = "Debian" ]; then
2020
fi
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__"
@@ -42,12 +42,15 @@ elif [ "$cxx_type" = "clang" ]; then
4242
defs="$defs -D__x86_64__"
4343
defs="$defs -D__STDC_HOSTED__"
4444
defs="$defs -D__CHAR_BIT__=8"
45+
defs="$defs -D__BYTE_ORDER__=1234"
46+
defs="$defs -D_WIN32" # TODO: how to make conditional?
4547
defs="$defs -D__has_builtin(x)=(1)"
4648
defs="$defs -D__has_cpp_attribute(x)=(1)"
4749
defs="$defs -D__has_feature(x)=(1)"
4850
defs="$defs -D__has_include_next(x)=(0)"
4951
defs="$defs -D__has_attribute(x)=(0)"
5052
defs="$defs -D__building_module(x)=(0)"
53+
defs="$defs -D__has_extension(x)=(1)"
5154

5255
inc=
5356
while read line
@@ -72,7 +75,7 @@ elif [ "$cxx_type" = "clang" ]; then
7275
#done <<< "$($CXX -x c++ -stdlib=libc++ -v -c -S - 2>&1 < /dev/null | grep -e'^ [/A-Z]')"
7376
elif [ "$cxx_type" = "Apple" ]; then
7477
defs=
75-
defs="$defs -D__BYTE_ORDER__"
78+
defs="$defs -D__BYTE_ORDER__=1234"
7679
defs="$defs -D__APPLE__"
7780
defs="$defs -D__GNUC__=15"
7881
defs="$defs -D__x86_64__"

0 commit comments

Comments
 (0)