summaryrefslogtreecommitdiff
path: root/hints/cygwin.sh
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2017-07-28 15:19:46 +1000
committerTony Cook <tony@develop-help.com>2017-07-28 15:19:46 +1000
commitfd998cbffc88a8e50fa34259c36a8db338168383 (patch)
treeeb97ee35cf1bed82cdb38798c349d39ffc26c596 /hints/cygwin.sh
parenta8cb1947aad7d9fcd7bb6fdc7fe8bf92f699d59d (diff)
downloadperl-fd998cbffc88a8e50fa34259c36a8db338168383.tar.gz
make _GNU-ish function declarations visible on cygwin
The lack of this caused several test failures on cygwin64, the one case I tracked down involved memmem() which is a GNU extension that cygwin supports. Since the compiler couldn't see the memmem() prototype it treated it's return value as int, which was then cast to (char *) preventing any type-mismatch warning, but since int is 32-bits and (char *) on cygwin64, the upper 32-bits of the pointer was cleared, resulting in a crash. After adding this a test cygwin64 build went from 30 or so test failures to one.
Diffstat (limited to 'hints/cygwin.sh')
-rw-r--r--hints/cygwin.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/hints/cygwin.sh b/hints/cygwin.sh
index 21997dba74..20e0e58821 100644
--- a/hints/cygwin.sh
+++ b/hints/cygwin.sh
@@ -31,7 +31,7 @@ test -z "$optimize" && optimize='-O3'
man3ext='3pm'
test -z "$use64bitint" && use64bitint='define'
test -z "$useithreads" && useithreads='define'
-ccflags="$ccflags -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__"
+ccflags="$ccflags -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE"
# - otherwise i686-cygwin
archname='cygwin'