summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-04-18 09:01:22 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-04-18 10:51:25 +0200
commit56bc0b1a376f62570a7287e9bb4193e00360c978 (patch)
tree8108a603a8d548c524965541a1d3f47cade5ffc1 /sal
parent777232d03b75ef80ab7f3c57f04dee2ce4953633 (diff)
Don't set locale env vars on macOS
macosx_getLocale (via getProcessLocale, both sal/osl/unx/osxlocale.cxx) obtains from the system a locale string like "en-DE". (Whether that is even a sane and recommended way to obtain the system locale on macOS I don't know; but lets leave it at that for now.) However, setting a locale env var (LANG, LC_ALL) to such a value causes a constructor call std::locale("") to throw a std::runtime_error "collate_byname<char>::collate_byname failed to construct for ", at least on macOS 10.14.4. And libdivvun (which might be bundled with a LO extension) is known to be hit by that, see <https://github.com/divvun/libdivvun/issues/28> "locale("") gives 'collate_byname<char>::collate_byname failed to construct for ' on LO on mac". The code setting LC_ALL/LC_CTYPE/LANG was there ever since 8737d1831b48acd8a4793c4728ad8563f77b5bf8 "INTEGRATION: CWS geordi2q14: #111934#: merge CWS ooo111fix2", but for unclear reasons. Lets assume that it had no purpose (any longer). Change-Id: I0b519ad567a713d61f662aa984791db1a91c708c Reviewed-on: https://gerrit.libreoffice.org/70918 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/nlsupport.cxx6
1 files changed, 0 insertions, 6 deletions
diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx
index 03a7c1c550ca..616447ecafe3 100644
--- a/sal/osl/unx/nlsupport.cxx
+++ b/sal/osl/unx/nlsupport.cxx
@@ -835,12 +835,6 @@ void imp_getProcessLocale( rtl_Locale ** ppLocale )
/* return the locale */
*ppLocale = parse_locale( locale.getStr() );
-
-#ifndef IOS
- setenv( "LC_ALL", locale.getStr(), 1);
- setenv("LC_CTYPE", locale.getStr(), 1 );
- setenv("LANG", locale.getStr(), 1 );
-#endif
}
#else
/*****************************************************************************