Print this page
Thread safety fixes.
*** 64,74 ****
.lc_ctype_mask = _DefaultRuneLocale.__runetype,
};
struct locdata __posix_ctype_locdata = {
.l_lname = "C",
- .l_refcnt = (uint32_t)-1,
.l_data = { &lc_ctype_posix, &_DefaultRuneLocale }
};
/*
--- 64,73 ----
*** 112,122 ****
(void) snprintf(path, sizeof (path), "%s/%s/LC_CTYPE/LCL_DATA",
_PathLocale, name);
if ((rl = _Read_RuneMagi(path)) == NULL) {
! __locdata_release(ldata);
errno = EINVAL;
return (NULL);
}
ldata->l_data[1] = rl;
--- 111,121 ----
(void) snprintf(path, sizeof (path), "%s/%s/LC_CTYPE/LCL_DATA",
_PathLocale, name);
if ((rl = _Read_RuneMagi(path)) == NULL) {
! __locdata_free(ldata);
errno = EINVAL;
return (NULL);
}
ldata->l_data[1] = rl;
*** 137,147 ****
encodings[i].e_init(lct);
break;
}
}
if (encodings[i].e_name == NULL) {
! __locdata_release(ldata);
errno = EINVAL;
return (NULL);
}
--- 136,146 ----
encodings[i].e_init(lct);
break;
}
}
if (encodings[i].e_name == NULL) {
! __locdata_free(ldata);
errno = EINVAL;
return (NULL);
}