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';
/* ... Thread safety and multiplicity ...................................... */
+/* Safe unless stated otherwise in Makefile.PL */
+#ifndef I_FORKSAFE
+# define I_FORKSAFE 1
+#endif
+
#ifndef I_MULTIPLICITY
# if defined(MULTIPLICITY) || defined(PERL_IMPLICIT_CONTEXT)
# define I_MULTIPLICITY 1
stash = gv_stashpvn(__PACKAGE__, __PACKAGE_LEN__, 1);
newCONSTSUB(stash, "I_THREADSAFE", newSVuv(I_THREADSAFE));
+ newCONSTSUB(stash, "I_FORKSAFE", newSVuv(I_FORKSAFE));
}
indirect_setup();
if ($ENV{PERL_INDIRECT_PM_DISABLE}) {
*_tag = sub ($) { 1 };
*I_THREADSAFE = sub () { 1 };
+ *I_FORKSAFE = sub () { 1 };
} else {
require XSLoader;
XSLoader::load(__PACKAGE__, $VERSION);
True iff the module could have been built with thread-safety features enabled.
+=head2 C<I_FORKSAFE>
+
+True iff this module could have been built with fork-safety features enabled.
+This will always be true except on Windows where it's false for perl 5.10.0 and below .
+
=head1 DIAGNOSTICS
=head2 C<Indirect call of method "%s" on object "%s" at %s line %d.>