These patches add a module 'setlocale_null-unlocked', that allows code to do the equivalent of setlocale(_,NULL) — with platform-specific workarounds — when we know that it does not need locking. 2024-02-15 Bruno Haible setlocale_null-unlocked: Add tests. * tests/test-setlocale_null-unlocked.c: New file, based on tests/test-setlocale_null.c. * modules/setlocale-null-unlocked-tests: New file. setlocale_null-unlocked: New module. * lib/setlocale_null.h (setlocale_null_r_unlocked, setlocale_null_unlocked): New declarations. * lib/setlocale_null-unlocked.c: New file, based on lib/setlocale_null.c. * lib/setlocale_null.c: Don't include . (setlocale_null_unlocked, setlocale_null_r_unlocked): Remove functions. * modules/setlocale-null-unlocked: New file. * modules/setlocale-null (Depends-on): Add setlocale-null-unlocked. 2024-02-15 Bruno Haible setlocale-null: Refactor. * lib/setlocale_null.c (setlocale_null_r_with_lock): Renamed from setlocale_null_with_lock. (setlocale_null_r_unlocked): Renamed from setlocale_null_unlocked. (setlocale_null_unlocked): Renamed from setlocale_null_androidfix.