Skip to content

Commit

Permalink
XXX try reverting: locale.c: Lock around querylocale
Browse files Browse the repository at this point in the history
See what passes
  • Loading branch information
khwilliamson committed May 6, 2023
1 parent ad9cab3 commit e73d06a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions locale.c
Expand Up @@ -1362,12 +1362,15 @@ S_querylocale_2008_i(pTHX_ const unsigned int index)
nl_langinfo_l(_NL_LOCALE_NAME(categories[index]),
cur_obj));
# else
/* Sadly, querylocale() on some systems isn't
thread-safe, so have to lock. If someone experimented on a
given platform to determine that it is safe there, there could
be something like '-Accflags=-DTHREAD_SAFE_QUERYLOCALE' set in a
hints file to circumvent this. */
gwLOCALE_LOCK;
retval = mortalized_pv_copy(querylocale(category_masks[index],
cur_obj));
QUERYLOCALE_UNLOCK;

# undef QUERYLOCALE_LOCK
# undef QUERYLOCALE_UNLOCK
gwLOCALE_UNLOCK;
# endif

}
Expand Down

0 comments on commit e73d06a

Please sign in to comment.