From baa29901b9423f9d111bef4a00d4f1c5b364ca15 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Wed, 22 Mar 2017 08:55:42 +0100
Subject: Comment clean-up that was inadvertently missing from previous commit

Change-Id: I5eb0758f84495a8410260f61ff645a086efb1ca7
---
 sal/osl/unx/nlsupport.cxx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'sal/osl')

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 )
-- 
cgit