This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
stdio.h on Cygwin doesn't expose cuserid() with _GNU_SOURCE
authorTony Cook <tony@develop-help.com>
Thu, 29 Nov 2018 03:12:01 +0000 (14:12 +1100)
committerTony Cook <tony@develop-help.com>
Thu, 29 Nov 2018 03:18:44 +0000 (14:18 +1100)
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

ext/POSIX/POSIX.xs
ext/POSIX/lib/POSIX.pm

index 72dcef8..90d7a3d 100644 (file)
@@ -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
index 05eedf7..e02c25c 100644 (file)
@@ -4,7 +4,7 @@ use warnings;
 
 our ($AUTOLOAD, %SIGRT);
 
-our $VERSION = '1.85';
+our $VERSION = '1.86';
 
 require XSLoader;