[perl #127751] error building ODBM_File on Windows, perl 5.23.9
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 24 Mar 2016 11:12:51 +0000 (07:12 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 27 Mar 2016 14:51:56 +0000 (10:51 -0400)
No POSIX open in Win32, broken by ed6087adbd9c90b59cf3f08af7c23a947c00bf69

Use the PerlLIO_open3 as suggested by Tony Cook, use the same trick as POSIX.xs

ext/ODBM_File/ODBM_File.xs

index bf5def3..eaa1923 100644 (file)
@@ -3,6 +3,10 @@
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
+#if defined(PERL_IMPLICIT_SYS)
+#  undef open
+#  define open PerlLIO_open3
+#endif
 
 #ifdef I_DBM
 #  include <dbm.h>