Print this page
Thread safety fixes.
*** 71,81 ****
empty /* crncystr */
};
struct locdata __posix_monetary_locdata = {
.l_lname = "C",
- .l_refcnt = (uint32_t)-1,
.l_data = { &lc_monetary_posix }
};
static char
cnv(const char *str)
--- 71,80 ----
*** 103,113 ****
ret = __part_load_locale(name, (char **)&ldata->l_data[1],
"LC_MONETARY", LCMONETARY_SIZE_FULL, LCMONETARY_SIZE_MIN,
(const char **)lmon);
if (ret != _LDP_LOADED) {
! __locdata_release(ldata);
errno = EINVAL;
return (NULL);
}
/* special storage for currency string */
--- 102,112 ----
ret = __part_load_locale(name, (char **)&ldata->l_data[1],
"LC_MONETARY", LCMONETARY_SIZE_FULL, LCMONETARY_SIZE_MIN,
(const char **)lmon);
if (ret != _LDP_LOADED) {
! __locdata_free(ldata);
errno = EINVAL;
return (NULL);
}
/* special storage for currency string */