Print this page
Fix compile errors, code review feedback, and add basic libc test suite.
@@ -70,13 +70,13 @@
errno = EINVAL;
return (NULL);
}
if (locname == NULL)
- return (current_locale(__global_locale, category));
+ return (current_locale(___global_locale, category));
- if ((oldloc = duplocale(__global_locale)) == NULL)
+ if ((oldloc = duplocale(___global_locale)) == NULL)
return (NULL);
mask = (category == LC_ALL ? LC_ALL_MASK : (1 << category));
newloc = newlocale(mask, locname, oldloc);
@@ -83,12 +83,12 @@
if (newloc == NULL) {
freelocale(oldloc);
return (NULL);
}
- oldloc = __global_locale;
- __global_locale = newloc;
+ oldloc = ___global_locale;
+ ___global_locale = newloc;
install_legacy(newloc, mask);
freelocale(oldloc);
return (current_locale(newloc, category));