Skip to content

Commit

Permalink
hints/cygwin.sh: don't touch system symbol __STRICT_ANSI__
Browse files Browse the repository at this point in the history
Adding _GNU_SOURCE, which was done much later, should give us the
GNU-ish symbols (though POSIX_C_SOURCE would be more general.)

I couldn't find the reason for this being added, but the C++
headers react badly to it:

In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iostream:38,
                 from source.cpp:1:
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/x86_64-pc-cygwin/bits/c++config.h:573:2: warning: #warning "__STRICT_ANSI__ seems to have been undefined; this is not supported" [-Wcpp]
  573 | #warning "__STRICT_ANSI__ seems to have been undefined; this is not supported"
      |  ^~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/max_size_type.h:37,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/ranges_base.h:38,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/string_view:48,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/basic_string.h:48,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/string:55,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/locale_classes.h:40,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/ios_base.h:41,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ios:42,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/ostream:38,
                 from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/iostream:39,
                 from source.cpp:1:
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/numbers:139:9: error: unable to find numeric literal operator 'operator""Q'
  139 |       = 2.718281828459045235360287471352662498Q;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
  • Loading branch information
tonycoz committed May 8, 2024
1 parent de470c7 commit 82777c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hints/cygwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ man3ext='3pm'
test -z "$use64bitint" && use64bitint='define'
test -z "$useithreads" && useithreads='define'
test -z "$usemymalloc" && usemymalloc='undef'
ccflags="$ccflags -U__STRICT_ANSI__ -D_GNU_SOURCE"
ccflags="$ccflags -D_GNU_SOURCE"
# - otherwise i686-cygwin
archname='cygwin'

Expand Down

0 comments on commit 82777c7

Please sign in to comment.