about summary refs log tree commit diff
path: root/src/linux/syncfs.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2017-07-31 23:08:27 -0400
committerRich Felker <dalias@aerifal.cx>2017-07-31 23:08:27 -0400
commit947d330f68c49680dcc54439f56da2a297228962 (patch)
treedb501c0de78202bee078e418c5b9a9a47ece0712 /src/linux/syncfs.c
parenta08910fc2cc739f631b75b2d09b8d72a0d64d285 (diff)
downloadmusl-947d330f68c49680dcc54439f56da2a297228962.tar.gz
musl-947d330f68c49680dcc54439f56da2a297228962.tar.xz
musl-947d330f68c49680dcc54439f56da2a297228962.zip
add _NL_LOCALE_NAME extension to nl_langinfo
since setlocale(cat, NULL) is required to return the setting for the
global locale, there is no standard mechanism to obtain the name of
the currently active thread-local locale set by uselocale. this makes
it impossible for application/library software to load appropriate
translations, etc. unless using the gettext implementation provided by
libc, which has privileged access to libc internals.

to fill this gap, glibc introduced the _NL_LOCALE_NAME macro which can
be used with nl_langinfo to obtain the name. GNU gettext/gnulib code
already use this functionality on glibc, and can easily be adapted to
make use of it on non-glibc systems if it's available; for other
systems they poke at locale implementation internals, which we want to
avoid. this patch provides a compatible interface to the one glibc
introduced.
Diffstat (limited to 'src/linux/syncfs.c')
0 files changed, 0 insertions, 0 deletions