summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2018-11-29 14:12:01 +1100
committerTony Cook <tony@develop-help.com>2018-11-29 14:18:44 +1100
commit042887faee685e7b2ad2ee466b72d5ab30e2bc54 (patch)
tree2eec9e199f449a8309282e2e0f22498bd7ed0746
parent285aa1f07d8a8489d61c81aa996588eaf8e513c5 (diff)
downloadperl-042887faee685e7b2ad2ee466b72d5ab30e2bc54.tar.gz
stdio.h on Cygwin doesn't expose cuserid() with _GNU_SOURCE
It's probably possible to expose it by setting _XOPEN_SOURCE to some specific value, but this appears to be a bug. https://cygwin.com/ml/cygwin/2018-11/msg00230.html
-rw-r--r--ext/POSIX/POSIX.xs7
-rw-r--r--ext/POSIX/lib/POSIX.pm2
2 files changed, 8 insertions, 1 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 72dcef8dbd..90d7a3de61 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -64,6 +64,13 @@ static int not_here(const char *s);
# include <sys/resource.h>
#endif
+/* Cygwin's stdio.h doesn't make cuserid() visible with -D_GNU_SOURCE,
+ unlike Linux.
+*/
+#ifdef __CYGWIN__
+# undef HAS_CUSERID
+#endif
+
#if defined(USE_QUADMATH) && defined(I_QUADMATH)
# undef M_E
diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm
index 05eedf7b92..e02c25c3c8 100644
--- a/ext/POSIX/lib/POSIX.pm
+++ b/ext/POSIX/lib/POSIX.pm
@@ -4,7 +4,7 @@ use warnings;
our ($AUTOLOAD, %SIGRT);
-our $VERSION = '1.85';
+our $VERSION = '1.86';
require XSLoader;