From f082b6c1bddb7805f2aed6a9192c5abce79a83e0 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 13 Dec 2021 11:52:17 +0100 Subject: [PATCH] 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. --- src/env_dispatch.cpp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/env_dispatch.cpp b/src/env_dispatch.cpp index 896803cf9..4181743e4 100644 --- a/src/env_dispatch.cpp +++ b/src/env_dispatch.cpp @@ -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.