]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - Makefile.PL
Introduce I_FORKSAFE
[perl/modules/indirect.git] / Makefile.PL
index 72b22a4514dc33a26ffdf4babe3f2bd25d492de7..2a617fa5377e173bbcf6bb294229fcba5c05e2b5 100644 (file)
@@ -4,6 +4,20 @@ use strict;
 use warnings;
 use ExtUtils::MakeMaker;
 
+my @DEFINES;
+
+# Threads, Windows and 5.8.x don't seem to be best friends
+if ($^O eq 'MSWin32' && $^V lt v5.9.0) {
+ push @DEFINES, '-DI_MULTIPLICITY=0';
+}
+
+# Fork emulation got "fixed" in 5.10.1
+if ($^O eq 'MSWin32' && $^V lt v5.10.1) {
+ push @DEFINES, '-DI_FORKSAFE=0';
+}
+
+@DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
+
 my $dist = 'indirect';
 
 my %META = (
@@ -29,6 +43,7 @@ WriteMakefile(
     VERSION_FROM     => 'lib/indirect.pm',
     ABSTRACT_FROM    => 'lib/indirect.pm',
     PL_FILES         => {},
+    @DEFINES,
     PREREQ_PM        => {
         'XSLoader' => 0,
     },