summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-22 08:55:42 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-22 08:55:42 +0100
commitbaa29901b9423f9d111bef4a00d4f1c5b364ca15 (patch)
treea73f7f57523d1dfbf7551e4935966ab1b45f8b5a
parentUse nl_langinfo_l instead of setlocale+nl_langinfo (diff)
downloadcore-baa29901b9423f9d111bef4a00d4f1c5b364ca15.tar.gz
core-baa29901b9423f9d111bef4a00d4f1c5b364ca15.zip
Comment clean-up that was inadvertently missing from previous commit
Change-Id: I5eb0758f84495a8410260f61ff645a086efb1ca7
-rw-r--r--sal/osl/unx/nlsupport.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx
index 06c41f56d816..b9cd621b8a6b 100644
--- a/sal/osl/unx/nlsupport.cxx
+++ b/sal/osl/unx/nlsupport.cxx
@@ -227,11 +227,9 @@ static rtl_Locale * parse_locale( const char * locale )
/*
* This implementation of osl_getTextEncodingFromLocale maps
- * from nl_langinfo(CODESET) to rtl_textencoding defines.
+ * from nl_langinfo_l(CODESET) to rtl_textencoding defines.
* nl_langinfo() is supported only on Linux, Solaris,
* >= NetBSD 1.6 and >= FreeBSD 4.4
- *
- * XXX this code has the usual mt problems aligned with nl_langinfo_l() XXX
*/
#ifdef LINUX
@@ -591,6 +589,10 @@ rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
codeset = NULL;
#else
codeset = nl_langinfo_l(CODESET, ctype_locale);
+ // per SUSv4, the return value of nl_langinfo_l can be invalidated by a
+ // subsequent call to nl_langinfo (not nl_langinfo_l) in any thread, but
+ // we cannot guard against that (at least, no code in LO itself should
+ // call nl_langinfo)
#endif
if ( codeset != nullptr )