Only act on the locale vars we care about

Instead of 7a80ad74f, which adds ifdeffery, we simply drop the
variables we don't care about. This leaves two presumably
glibc-specific variables, but drops 5 variables like LC_MONETARY, so
it's overall a win.

This reverts commit 7a80ad74f4379b5960e723d124069f190fa4e877.
This commit is contained in:
Fabian Homborg 2021-12-13 11:52:17 +01:00
parent e25b719b26
commit f082b6c1bd

View File

@ -60,30 +60,17 @@
#define DEFAULT_TERM2 "dumb"
/// List of all locale environment variable names that might trigger (re)initializing the locale
/// subsystem.
/// subsystem. These are only the variables we're possibly interested in.
static const wcstring locale_variables[] = {L"LANG",
L"LANGUAGE",
L"LC_ALL",
L"LC_COLLATE",
L"LC_CTYPE",
L"LC_MESSAGES",
L"LC_MONETARY",
L"LC_NUMERIC",
L"LC_TIME",
#if defined(_GNU_SOURCE) && defined(__GLIBC__) && defined(__GLIBC_PREREQ)
#if __GLIBC_PREREQ(2,2)
L"LANGUAGE", /* GNU libc extensions start */
L"LC_ADDRESS",
L"LC_IDENTIFICATION",
L"LC_MEASUREMENT",
L"LC_NAME",
L"LC_PAPER",
L"LC_TELEPHONE",
L"LOCPATH", /* GNU libc extensions end */
#endif // __GLIBC_PREREQ(2,2)
#endif // defined(_GNU_SOURCE) && defined(__GLIBC__) && defined(__GLIBC_PREREQ)
L"fish_allow_singlebyte_locale"
};
L"fish_allow_singlebyte_locale",
L"LOCPATH"};
/// List of all curses environment variable names that might trigger (re)initializing the curses
/// subsystem.