Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig/nconf: Initialize the default locale at startup

Fix bug where make nconfig doesn't initialize the default locale, which
causes ncurses menu borders to be displayed incorrectly (lqqqqk) in
UTF-8 terminals that don't support VT100 ACS by default, such as PuTTY.

Signed-off-by: Jakub Horký <jakub.git@horky.net>
Link: https://patch.msgid.link/20251014144405.3975275-2-jakub.git@horky.net
[nathan: Alphabetize locale.h include]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

authored by

Jakub Horký and committed by
Nathan Chancellor
43c2931a 3927c4a1

+3
+3
scripts/kconfig/nconf.c
··· 7 7 #ifndef _GNU_SOURCE 8 8 #define _GNU_SOURCE 9 9 #endif 10 + #include <locale.h> 10 11 #include <string.h> 11 12 #include <strings.h> 12 13 #include <stdlib.h> ··· 1478 1477 { 1479 1478 int lines, columns; 1480 1479 char *mode; 1480 + 1481 + setlocale(LC_ALL, ""); 1481 1482 1482 1483 if (ac > 1 && strcmp(av[1], "-s") == 0) { 1483 1484 /* Silence conf_read() until the real callback is set up */