From: Craig A. Berry Date: Sun, 1 Feb 2009 21:09:25 +0000 (-0600) Subject: For the vmsish pragma, make sure there is a thread context if needed. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a520a2c43dd549df0ebed1f073e13cc4564380db;p=p5sagit%2Fp5-mst-13.2.git For the vmsish pragma, make sure there is a thread context if needed. The hints are interpreter-specific, and we check them in some pretty low-level routines, such as time(), gmtime(), and stat(), where it's possible thread context may not have been initialized yet (or may have already been torn down). --- diff --git a/vms/vmsish.h b/vms/vmsish.h index 48a474a..ac7dc56 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -361,7 +361,11 @@ #define HINT_M_VMSISH_TIME 0x80000000 /* times are local, not UTC */ #define NATIVE_HINTS (PL_hints >> HINT_V_VMSISH) /* used in op.c */ -#define TEST_VMSISH(h) (PL_curcop->op_private & ((h) >> HINT_V_VMSISH)) +#ifdef PERL_IMPLICIT_CONTEXT +# define TEST_VMSISH(h) (my_perl && (PL_curcop->op_private & ((h) >> HINT_V_VMSISH))) +#else +# define TEST_VMSISH(h) (PL_curcop->op_private & ((h) >> HINT_V_VMSISH)) +#endif #define VMSISH_STATUS TEST_VMSISH(HINT_M_VMSISH_STATUS) #define VMSISH_TIME TEST_VMSISH(HINT_M_VMSISH_TIME)