mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
kconfig/nconf: Initialize the default locale at startup
[ Upstream commit 43c2931a95 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9e3a382929
commit
f16b97babd
@@ -7,6 +7,7 @@
|
|||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif
|
#endif
|
||||||
|
#include <locale.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -1478,6 +1479,8 @@ int main(int ac, char **av)
|
|||||||
int lines, columns;
|
int lines, columns;
|
||||||
char *mode;
|
char *mode;
|
||||||
|
|
||||||
|
setlocale(LC_ALL, "");
|
||||||
|
|
||||||
if (ac > 1 && strcmp(av[1], "-s") == 0) {
|
if (ac > 1 && strcmp(av[1], "-s") == 0) {
|
||||||
/* Silence conf_read() until the real callback is set up */
|
/* Silence conf_read() until the real callback is set up */
|
||||||
conf_set_message_callback(NULL);
|
conf_set_message_callback(NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user