push @DEFINES, '-DLT_MULTIPLICITY=0';
}
+# Fork emulation got "fixed" in 5.10.1
+if ($^O eq 'MSWin32' && $^V lt v5.10.1) {
+ push @DEFINES, '-DLT_FORKSAFE=0';
+}
+
@DEFINES = (DEFINE => join ' ', @DEFINES) if @DEFINES;
my $dist = 'Lexical-Types';
/* ... Thread safety and multiplicity ...................................... */
+/* Safe unless stated otherwise in Makefile.PL */
+#ifndef LT_FORKSAFE
+# define LT_FORKSAFE 1
+#endif
+
#ifndef LT_MULTIPLICITY
# if defined(MULTIPLICITY) || defined(PERL_IMPLICIT_CONTEXT)
# define LT_MULTIPLICITY 1
stash = gv_stashpvn(__PACKAGE__, __PACKAGE_LEN__, 1);
newCONSTSUB(stash, "LT_THREADSAFE", newSVuv(LT_THREADSAFE));
+ newCONSTSUB(stash, "LT_FORKSAFE", newSVuv(LT_FORKSAFE));
}
lt_setup();
True iff the module could have been built with thread-safety features enabled.
+=head2 C<LT_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 CAVEATS
The restrictions on the type (being either a defined package name or a constant) apply even if you use the C<'as'> option to redirect to another package, and are unlikely to find a workaround as this happens deep inside the lexer - far from the reach of an extension.