Skip to content

Commit fe51b79

Browse files
committed
fixups
1 parent 8a7ef04 commit fe51b79

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

locale.c

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,8 +2198,8 @@ S_querylocale_2008_i(pTHX_ const locale_category_index index,
21982198
# define QUERYLOCALE_LOCK
21992199
# define QUERYLOCALE_UNLOCK
22002200
# else
2201-
# define QUERYLOCALE_LOCK GENxLCr_LOCK
2202-
# define QUERYLOCALE_UNLOCK GENxLCr_UNLOCK
2201+
# define QUERYLOCALE_LOCK PERL_GENx_LCr_LOCK(0)
2202+
# define QUERYLOCALE_UNLOCK PERL_GENx_LCr_UNLOCK(0)
22032203
# endif
22042204

22052205
/* Finally, everything is ready, so here is the 'else' clause to implement
@@ -5163,9 +5163,9 @@ Perl_mbtowc_(pTHX_ const wchar_t * pwc, const char * s, const Size_t len)
51635163
# else
51645164

51655165
SETERRNO(0, 0);
5166-
MBTOWC_LOCK;
5166+
PERL_MBTOWC_LOCK;
51675167
retval = mbtowc(NULL, NULL, 0);
5168-
MBTOWC_UNLOCK;
5168+
PERL_MBTOWC_UNLOCK;
51695169
return retval;
51705170

51715171
# endif
@@ -5916,10 +5916,10 @@ S_populate_hash_from_localeconv(pTHX_ HV * hv,
59165916
# define LOCALECONV_UNLOCK
59175917
# else
59185918

5919-
GENxLCr_LOCK;
5919+
PERL_GENx_LCr_LOCK(0);
59205920

59215921
# undef LOCALECONV_UNLOCK
5922-
# define LOCALECONV_UNLOCK GENxLCr_UNLOCK
5922+
# define LOCALECONV_UNLOCK PERL_GENx_LCr_UNLOCK(0)
59235923
# endif
59245924
# if ! defined(TS_W32_BROKEN_LOCALECONV) || ! defined(USE_THREAD_SAFE_LOCALE)
59255925
# define WIN32_TEARDOWN
@@ -6541,9 +6541,9 @@ S_langinfo_sv_i(pTHX_
65416541
{
65426542
/* An ugly API; only the first byte of the returned char* address means
65436543
* anything */
6544-
NL_LANGINFO_LOCK;
6544+
PERL_NL_LANGINFO_LOCK;
65456545
char char_value = nl_langinfo(item)[0];
6546-
NL_LANGINFO_UNLOCK;
6546+
PERL_NL_LANGINFO_UNLOCK;
65476547

65486548
sv_setuv(sv, char_value);
65496549
}
@@ -6574,9 +6574,9 @@ S_langinfo_sv_i(pTHX_
65746574

65756575
{ /* A slightly less ugly API; the int portion of the returned char*
65766576
* address is an integer. */
6577-
NL_LANGINFO_LOCK;
6577+
PERL_NL_LANGINFO_LOCK;
65786578
int int_value = (int) PTR2UV(nl_langinfo(item));
6579-
NL_LANGINFO_UNLOCK;
6579+
PERL_NL_LANGINFO_UNLOCK;
65806580

65816581
sv_setuv(sv, int_value);
65826582
}
@@ -6605,7 +6605,7 @@ S_langinfo_sv_i(pTHX_
66056605

66066606
/* The rest of the possibilities deliver a true char* pointer to a
66076607
* string (or sequence of strings in the case of ALT_DIGITS) */
6608-
NL_LANGINFO_LOCK;
6608+
PERL_NL_LANGINFO_LOCK;
66096609

66106610
retval = nl_langinfo(item);
66116611
Size_t total_len = strlen(retval);
@@ -6633,7 +6633,7 @@ S_langinfo_sv_i(pTHX_
66336633
* workaround for finding if the codeset is UTF-8. In many cases,
66346634
* the function works properly; but otherwise you are at the mercy
66356635
* of this bug */
6636-
case CODESET:
6636+
case CODESET: ;
66376637
# endif
66386638
const char * msg = form(
66396639
"nl_langinfo returned empty for %ld"
@@ -6651,7 +6651,7 @@ S_langinfo_sv_i(pTHX_
66516651
strtod("1,5", NULL),
66526652
strtod("1.5", NULL)
66536653
);
6654-
NL_LANGINFO_UNLOCK;
6654+
PERL_NL_LANGINFO_UNLOCK;
66556655
locale_panic_(msg);
66566656
}
66576657

@@ -6719,7 +6719,7 @@ S_langinfo_sv_i(pTHX_
67196719
byte_dump_string_((U8 *) retval,
67206720
total_len, 0),
67216721
locale);
6722-
NL_LANGINFO_UNLOCK;
6722+
PERL_NL_LANGINFO_UNLOCK;
67236723
locale_panic_(msg);
67246724
}
67256725
else {
@@ -6748,7 +6748,7 @@ S_langinfo_sv_i(pTHX_
67486748

67496749
sv_setpvn(sv, retval, total_len);
67506750

6751-
NL_LANGINFO_UNLOCK;
6751+
PERL_NL_LANGINFO_UNLOCK;
67526752

67536753
/* Convert the ALT_DIGITS separator to a semi-colon if not already */
67546754
if (UNLIKELY(item == ALT_DIGITS) && total_len > 0 && separator != ';') {
@@ -8509,7 +8509,7 @@ S_ints_to_tm(pTHX_ struct tm * mytm,
85098509
/* Unlike mini_mktime(), it does consider the locale, so have to switch
85108510
* to the correct one. */
85118511
const char * orig_TIME_locale = toggle_locale_c(LC_TIME, locale);
8512-
MKTIME_LOCK;
8512+
PERL_MKTIME_LOCK;
85138513

85148514
/* 'which_tm' points to an auxiliary copy if we ran mini_mktime().
85158515
* Otherwise it points to the passed-in one which now gets populated
@@ -8619,16 +8619,16 @@ S_strftime_tm(pTHX_ const char *fmt,
86198619
}
86208620

86218621
RESTORE_ERRNO;
8622-
STRFTIME_UNLOCK;
8622+
PERL_STRFTIME_UNLOCK;
86238623

86248624
if (strftime_failed) {
86258625
goto strftime_failed;
86268626
}
86278627

86288628
#else
8629-
STRFTIME_LOCK;
8629+
PERL_STRFTIME_LOCK;
86308630
Size_t len = strftime(buf, bufsize, fmt, mytm);
8631-
STRFTIME_UNLOCK;
8631+
PERL_STRFTIME_UNLOCK;
86328632
#endif
86338633

86348634
GCC_DIAG_RESTORE_STMT;
@@ -9092,7 +9092,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
90929092
# endif
90939093
# if ! defined(PERL_LC_ALL_USES_NAME_VALUE_PAIRS) && defined(LC_ALL)
90949094

9095-
GENxLCr_LOCK;
9095+
PERL_GENx_LCr_LOCK(0);
90969096

90979097
/* If we haven't done so already, translate the LC_ALL positions of
90989098
* categories into our internal indices. */
@@ -9128,25 +9128,25 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
91289128

91299129
}
91309130

9131-
GENxLCr_UNLOCK;
9131+
PERL_GENx_LCr_UNLOCK(0);
91329132

91339133
# endif
91349134
# ifdef USE_POSIX_2008_LOCALE
91359135

91369136
/* This is a global, so be sure to keep another instance from zapping it */
9137-
GENxLCr_LOCK;
9137+
PERL_GENx_LCr_LOCK(0);
91389138
if (PL_C_locale_obj) {
9139-
GENxLCr_UNLOCK;
9139+
PERL_GENx_LCr_UNLOCK(0);
91409140
}
91419141
else {
91429142
PERL_NEWLOCALE_LOCK;
91439143
PL_C_locale_obj = newlocale(LC_ALL_MASK, "C", (locale_t) 0);
91449144
PERL_NEWLOCALE_UNLOCK;
91459145
if (! PL_C_locale_obj) {
9146-
GENxLCr_UNLOCK;
9146+
PERL_GENx_LCr_UNLOCK(0);
91479147
locale_panic_("Cannot create POSIX 2008 C locale object");
91489148
}
9149-
GENxLCr_UNLOCK;
9149+
PERL_GENx_LCr_UNLOCK(0);
91509150

91519151
DEBUG_Lv(PerlIO_printf(Perl_debug_log, "created C object %p\n",
91529152
PL_C_locale_obj));
@@ -10565,12 +10565,12 @@ Perl_strxfrm(pTHX_ SV * src)
1056510565
* qualifies), these yield the correct one */
1056610566
#if defined(USE_LOCALE_CTYPE)
1056710567
# define WHICH_LC_INDEX LC_CTYPE_INDEX_
10568-
# define WHICH_LOCK LCr_LOCK_(LC_CTYPE)
10569-
# define WHICH_UNLOCK LCr_UNLOCK_(LC_CTYPE)
10568+
# define WHICH_LOCK PERL_LCr_LOCK_(LC_CTYPE)
10569+
# define WHICH_UNLOCK PERL_LCr_UNLOCK_(LC_CTYPE)
1057010570
#elif defined(USE_LOCALE_MESSAGES)
1057110571
# define WHICH_LC_INDEX LC_MESSAGES_INDEX_
10572-
# define WHICH_LOCK LCr_LOCK_(LC_MESSAGES)
10573-
# define WHICH_UNLOCK LCr_UNLOCK_(LC_MESSAGES)
10572+
# define WHICH_LOCK PERL_LCr_LOCK_(LC_MESSAGES)
10573+
# define WHICH_UNLOCK PERL_LCr_UNLOCK_(LC_MESSAGES)
1057410574
#endif
1057510575

1057610576
/*===========================================================================*/

0 commit comments

Comments
 (0)