Skip to content

Replace unsafe setlocale() use with uselocale()

Michael Catanzaro requested to merge mcatanzaro/uselocale into master

setlocale() is not threadsafe except when used only to query the locale without changing it. Let's use uselocale() instead, which changes the locale only on the calling thread. Much better.

P.S. I didn't test this because I didn't want to install new gsettings-desktop-schemas. It should be fine, but wouldn't be a terrible idea to sanitycheck to make sure it still works.

Edited by Michael Catanzaro

Merge request reports