diff options
author | Bryan Hundven <bryanhundven@gmail.com> | 2018-01-31 16:39:45 -0800 |
---|---|---|
committer | Bryan Hundven <bryanhundven@gmail.com> | 2018-01-31 16:39:45 -0800 |
commit | 59b08f8d06700770cf1105269acb2ec2460e2a34 (patch) | |
tree | 7e26466ff1bdcb344d223d27c24a2014ff54a38f /kconfig/nconf.c | |
parent | ba165ed4c0bfa8a83e61a2efd1ad205777978486 (diff) | |
download | crosstool-ng-59b08f8d06700770cf1105269acb2ec2460e2a34.tar.gz crosstool-ng-59b08f8d06700770cf1105269acb2ec2460e2a34.tar.bz2 crosstool-ng-59b08f8d06700770cf1105269acb2ec2460e2a34.zip |
Sync kconfig files with upstream 4.15
Last updated with 4.9-rc7.
This commit introduces the following upstream changes:
9059a3493efe kconfig: fix relational operators for bool and tristate symbols
88127dae6ed9 kconfig/symbol.c: use correct pointer type argument for sizeof
b24413180f56 License cleanup: add SPDX GPL-2.0 license identifier to files with no license
bb3290d91695 Remove gperf usage from toolchain
ad8181060788 kconfig: fix sparse warnings in nconfig
ff85a1a80e00 kconfig: Check for libncurses before menuconfig
9be3213b14d4 gconfig: remove misleading parentheses around a condition
83c3a1bad224 xconfig: fix missing suboption and help panels on first run
e039303ff71a xconfig: fix 'Show Debug' functionality
79e51b5c2dee kconfig/nconf: Fix hang when editing symbol with a long prompt
0eb47346968f Scripts: kconfig: nconf: fix _GNU_SOURCE redefined warning
237e3ad0f195 Kconfig: Introduce the "imply" keyword
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
Diffstat (limited to 'kconfig/nconf.c')
-rw-r--r-- | kconfig/nconf.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kconfig/nconf.c b/kconfig/nconf.c index 4db74c92..be761201 100644 --- a/kconfig/nconf.c +++ b/kconfig/nconf.c @@ -5,7 +5,9 @@ * Derived from menuconfig. * */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE +#endif #include <string.h> #include <stdlib.h> @@ -272,7 +274,7 @@ static struct mitem k_menu_items[MAX_MENU_ITEMS]; static int items_num; static int global_exit; /* the currently selected button */ -const char *current_instructions = menu_instructions; +static const char *current_instructions = menu_instructions; static char *dialog_input_result; static int dialog_input_result_len; @@ -306,7 +308,7 @@ struct function_keys { }; static const int function_keys_num = 9; -struct function_keys function_keys[] = { +static struct function_keys function_keys[] = { { .key_str = "F1", .func = "Help", @@ -509,7 +511,7 @@ static int get_mext_match(const char *match_str, match_f flag) index = (index + items_num) % items_num; while (true) { char *str = k_menu_items[index].str; - if (strcasestr(str, match_str) != 0) + if (strcasestr(str, match_str) != NULL) return index; if (flag == FIND_NEXT_MATCH_UP || flag == MATCH_TINKER_PATTERN_UP) @@ -1068,7 +1070,7 @@ static int do_match(int key, struct match_state *state, int *ans) static void conf(struct menu *menu) { - struct menu *submenu = 0; + struct menu *submenu = NULL; const char *prompt = menu_get_prompt(menu); struct symbol *sym; int res; @@ -1235,7 +1237,7 @@ static void show_help(struct menu *menu) static void conf_choice(struct menu *menu) { const char *prompt = _(menu_get_prompt(menu)); - struct menu *child = 0; + struct menu *child = NULL; struct symbol *active; int selected_index = 0; int last_top_row = 0; @@ -1457,7 +1459,7 @@ static void conf_save(void) } } -void setup_windows(void) +static void setup_windows(void) { int lines, columns; |