Systemd/src/locale
Lennart Poettering 0d53667334 tree-wide: use __fsetlocking() instead of fxyz_unlocked()
Let's replace usage of fputc_unlocked() and friends by __fsetlocking(f,
FSETLOCKING_BYCALLER). This turns off locking for the entire FILE*,
instead of doing individual per-call decision whether to use normal
calls or _unlocked() calls.

This has various benefits:

1. It's easier to read and easier not to forget

2. It's more comprehensive, as fprintf() and friends are covered too
   (as these functions have no _unlocked() counterpart)

3. Philosophically, it's a bit more correct, because it's more a
   property of the file handle really whether we ever pass it on to another
   thread, not of the operations we then apply to it.

This patch reworks all pieces of codes that so far used fxyz_unlocked()
calls to use __fsetlocking() instead. It also reworks all places that
use open_memstream(), i.e. use stdio FILE* for string manipulations.

Note that this in some way a revert of 4b61c87511.
2017-12-14 10:42:25 +01:00
..
kbd-model-map kbd-model-map: add more mappings for Slovak, Lithuanian, and Khmer 2015-01-22 01:14:54 -05:00
keymap-util.c tree-wide: use __fsetlocking() instead of fxyz_unlocked() 2017-12-14 10:42:25 +01:00
keymap-util.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
language-fallback-map locale: Language fallbacks for fr_(BE|CA|CH|LU) to fr_FR (#3178) 2016-05-02 19:43:37 -04:00
localectl.c localectl: fix list_vconsole_keymaps() indentation 2017-12-01 14:41:31 -08:00
localed.c tree-wide: generate SD_BUS_ERROR_INVALID_ARGS when we get invalid arguments on bus calls 2017-11-29 12:34:12 +01:00
meson.build Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
org.freedesktop.locale1.conf Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
org.freedesktop.locale1.policy.in Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
org.freedesktop.locale1.service Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
test-keymap-util.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00