summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-03-12 10:49:27 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-03-12 10:49:27 +0000
commit7d4724a48fc64f7514654a326453c9b631d3a294 (patch)
tree4cb7cd310a93e2b4fd73770e767efd23aea1683f /perl.c
parentc727eafaa06ca49aa032ce478f9a6e09bd19fda2 (diff)
downloadperl-7d4724a48fc64f7514654a326453c9b631d3a294.tar.gz
Cygwin doesn't like initing the $0 mutex in perl_construct()
(Too early? If inited there the pthread_mutex_init() returns an integer much too large be an errno), but initing the mutex later, in perl_alloc(), seems to be okay with Cygwin, and also with Linux. p4raw-id: //depot/perl@18950
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/perl.c b/perl.c
index 35368503ae..19289ecc12 100644
--- a/perl.c
+++ b/perl.c
@@ -65,6 +65,7 @@ static I32 read_e_script(pTHX_ int idx, SV *buf_sv, int maxlen);
ALLOC_THREAD_KEY; \
PERL_SET_THX(my_perl); \
OP_REFCNT_INIT; \
+ MUTEX_INIT(&PL_dollarzero_mutex); \
} \
else { \
PERL_SET_THX(my_perl); \
@@ -155,9 +156,6 @@ perl_construct(pTHXx)
/* Init the real globals (and main thread)? */
if (!PL_linestr) {
-#ifdef USE_ITHREADS
- MUTEX_INIT(&PL_dollarzero_mutex); /* for $0 modifying */
-#endif
#ifdef PERL_FLEXIBLE_EXCEPTIONS
PL_protect = MEMBER_TO_FPTR(Perl_default_protect); /* for exceptions */
#endif