X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=autovivification.xs;h=b4c76a1cb02c5ee8961394aaf027d290499a2029;hb=18759ee3da54601e0a475d9f99eed11877bdc49b;hp=d078674ce8b6a0901bb9f4489b30d6749f0f503d;hpb=125c37754d5bbb6bdd09036f7fdc48fcd11994e9;p=perl%2Fmodules%2Fautovivification.git diff --git a/autovivification.xs b/autovivification.xs index d078674..b4c76a1 100644 --- a/autovivification.xs +++ b/autovivification.xs @@ -41,6 +41,15 @@ /* ... Thread safety and multiplicity ...................................... */ +/* Always safe when the workaround isn't needed */ +#if !A_WORKAROUND_REQUIRE_PROPAGATION +# undef A_FORKSAFE +# define A_FORKSAFE 1 +/* Otherwise, safe unless Makefile.PL says it's Win32 */ +#elif !defined(A_FORKSAFE) +# define A_FORKSAFE 1 +#endif + #ifndef A_MULTIPLICITY # if defined(MULTIPLICITY) || defined(PERL_IMPLICIT_CONTEXT) # define A_MULTIPLICITY 1 @@ -1026,6 +1035,8 @@ BOOT: newCONSTSUB(stash, "A_HINT_EXISTS", newSVuv(A_HINT_EXISTS)); newCONSTSUB(stash, "A_HINT_DELETE", newSVuv(A_HINT_DELETE)); newCONSTSUB(stash, "A_HINT_MASK", newSVuv(A_HINT_MASK)); + newCONSTSUB(stash, "A_THREADSAFE", newSVuv(A_THREADSAFE)); + newCONSTSUB(stash, "A_FORKSAFE", newSVuv(A_FORKSAFE)); } }