Skip to content

Commit cbbec68

Browse files
committed
POSIX.xs: Use new names for lock macros
1 parent 3edeca0 commit cbbec68

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

ext/POSIX/POSIX.xs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,9 +1768,9 @@ my_tzset(pTHX)
17681768
#endif
17691769
fix_win32_tzenv();
17701770
#endif
1771-
TZSET_LOCK;
1771+
PERL_TZSET_LOCK;
17721772
tzset();
1773-
TZSET_UNLOCK;
1773+
PERL_TZSET_UNLOCK;
17741774
/* After the unlock, another thread could change things, but this is a
17751775
* problem with the Posix API generally, not Perl; and the result will be
17761776
* self-consistent */
@@ -3205,9 +3205,9 @@ mblen(s, n = ~0)
32053205
memzero(&PL_mbrlen_ps, sizeof(PL_mbrlen_ps));
32063206
RETVAL = 0;
32073207
#else
3208-
MBLEN_LOCK_;
3208+
PERL_MBLEN_LOCK;
32093209
RETVAL = mblen(NULL, 0);
3210-
MBLEN_UNLOCK_;
3210+
PERL_MBLEN_UNLOCK;
32113211
#endif
32123212
}
32133213
else { /* Not resetting state */
@@ -3221,17 +3221,17 @@ mblen(s, n = ~0)
32213221
char * string = SvPVbyte(byte_s, len);
32223222
if (n < len) len = n;
32233223
#ifdef USE_MBRLEN
3224-
MBRLEN_LOCK_;
3224+
PERL_MBRLEN_LOCK;
32253225
RETVAL = (SSize_t) mbrlen(string, len, &PL_mbrlen_ps);
3226-
MBRLEN_UNLOCK_;
3226+
PERL_MBRLEN_UNLOCK;
32273227
if (RETVAL < 0) RETVAL = -1; /* Use mblen() ret code for
32283228
transparency */
32293229
#else
32303230
/* Locking prevents races, but locales can be switched out
32313231
* without locking, so this isn't a cure all */
3232-
MBLEN_LOCK_;
3232+
PERL_MBLEN_LOCK;
32333233
RETVAL = mblen(string, len);
3234-
MBLEN_UNLOCK_;
3234+
PERL_MBLEN_UNLOCK;
32353235
#endif
32363236
}
32373237
}
@@ -3297,27 +3297,27 @@ wctomb(s, wchar)
32973297
#ifdef USE_WCRTOMB
32983298
/* The man pages khw looked at are in agreement that this works.
32993299
* But probably memzero would too */
3300-
WCRTOMB_LOCK_;
3300+
PERL_WCRTOMB_LOCK;
33013301
RETVAL = wcrtomb(NULL, L'\0', &PL_wcrtomb_ps);
3302-
WCRTOMB_UNLOCK_;
3302+
PERL_WCRTOMB_UNLOCK;
33033303
#else
3304-
WCTOMB_LOCK_;
3304+
PERL_WCTOMB_LOCK;
33053305
RETVAL = wctomb(NULL, L'\0');
3306-
WCTOMB_UNLOCK_;
3306+
PERL_WCTOMB_UNLOCK;
33073307
#endif
33083308
}
33093309
else { /* Not resetting state */
33103310
char buffer[MB_LEN_MAX];
33113311
#ifdef USE_WCRTOMB
3312-
WCRTOMB_LOCK_;
3312+
PERL_WCRTOMB_LOCK;
33133313
RETVAL = wcrtomb(buffer, wchar, &PL_wcrtomb_ps);
3314-
WCRTOMB_UNLOCK_;
3314+
PERL_WCRTOMB_UNLOCK;
33153315
#else
33163316
/* Locking prevents races, but locales can be switched out without
33173317
* locking, so this isn't a cure all */
3318-
WCTOMB_LOCK_;
3318+
PERL_WCTOMB_LOCK;
33193319
RETVAL = wctomb(buffer, wchar);
3320-
WCTOMB_UNLOCK_;
3320+
PERL_WCTOMB_UNLOCK;
33213321
#endif
33223322
if (RETVAL >= 0) {
33233323
sv_setpvn_mg(s, buffer, RETVAL);
@@ -3332,9 +3332,9 @@ strcoll(s1, s2)
33323332
char * s2
33333333
CODE:
33343334
CHECK_AND_WARN_PROBLEMATIC_LOCALE_;
3335-
LC_COLLATE_LOCK;
3335+
PERL_STRCOLL_LOCK;
33363336
RETVAL = strcoll(s1, s2);
3337-
LC_COLLATE_UNLOCK;
3337+
PERL_STRCOLL_UNLOCK;
33383338
OUTPUT:
33393339
RETVAL
33403340

@@ -3546,9 +3546,9 @@ asctime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1)
35463546
mytm.tm_isdst = isdst;
35473547
if (ix) {
35483548
time_t result;
3549-
MKTIME_LOCK;
3549+
PERL_MKTIME_LOCK;
35503550
result = mktime(&mytm);
3551-
MKTIME_UNLOCK;
3551+
PERL_MKTIME_UNLOCK;
35523552
if (result == (time_t)-1)
35533553
SvOK_off(TARG);
35543554
else if (result == 0)
@@ -3558,9 +3558,9 @@ asctime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1)
35583558
else
35593559
sv_setiv(TARG, (IV)result);
35603560
} else {
3561-
ASCTIME_LOCK;
3561+
PERL_ASCTIME_LOCK;
35623562
sv_setpv(TARG, asctime(&mytm));
3563-
ASCTIME_UNLOCK;
3563+
PERL_ASCTIME_UNLOCK;
35643564
}
35653565
ST(0) = TARG;
35663566
XSRETURN(1);
@@ -3642,10 +3642,10 @@ tzname()
36423642
EXTEND(SP,2);
36433643
/* It is undefined behavior if another thread is changing this while
36443644
* its being read */
3645-
ENVr_LOCALEr_LOCK;
3645+
PERL_TZSET_LOCK;
36463646
PUSHs(newSVpvn_flags(tzname[0], strlen(tzname[0]), SVs_TEMP));
36473647
PUSHs(newSVpvn_flags(tzname[1], strlen(tzname[1]), SVs_TEMP));
3648-
ENVr_LOCALEr_UNLOCK;
3648+
PERL_TZSET_UNLOCK;
36493649

36503650
char *
36513651
ctermid(s = 0)

0 commit comments

Comments
 (0)