X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=indirect.xs;h=67eea50401675cbaa32932dde88970c9b99dc725;hp=53cff20b16bddf792a5d0245cd10e7ab317fb807;hb=2635de8af7a889878b35ebed184d2f7b3c9c4ac0;hpb=d237f88f7fb8be8d6836157872d5bf2b9ba02beb diff --git a/indirect.xs b/indirect.xs index 53cff20..67eea50 100644 --- a/indirect.xs +++ b/indirect.xs @@ -95,6 +95,11 @@ /* ... 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 @@ -768,7 +773,6 @@ done: STATIC U32 indirect_initialized = 0; STATIC void indirect_teardown(pTHX_ void *root) { -#define indirect_teardown() indirect_teardown(aTHX) dMY_CXT; if (!indirect_initialized) @@ -858,6 +862,7 @@ BOOT: stash = gv_stashpvn(__PACKAGE__, __PACKAGE_LEN__, 1); newCONSTSUB(stash, "I_THREADSAFE", newSVuv(I_THREADSAFE)); + newCONSTSUB(stash, "I_FORKSAFE", newSVuv(I_FORKSAFE)); } indirect_setup();