Hide some ifdefs to make it more readible
No binary (build failed)
—
$ git checkout -f fedce06b7fa53989df8a7994dcd2b24ed5ccf51a
HEAD is now at fedce06b7 Hide some ifdefs to make it more readible
$ git clean -fdx
Removing .menuconfig.log
Removing MCmenu0
Removing MCmenu1
Removing MCmenu2
Removing MCmenu3
Removing MCmenu4
Removing include/config/
Removing scripts/lxdialog/checklist.o
Removing scripts/lxdialog/inputbox.o
Removing scripts/lxdialog/lxdialog
Removing scripts/lxdialog/lxdialog.o
Removing scripts/lxdialog/menubox.o
Removing scripts/lxdialog/msgbox.o
Removing scripts/lxdialog/textbox.o
Removing scripts/lxdialog/util.o
Removing scripts/lxdialog/yesno.o
$ make SHELL=/bin/bash CC=/root/asi_db/compat/cc-wrapper.sh HOSTCC=/root/asi_db/compat/cc-wrapper.sh defconfig
make: *** No rule to make target 'defconfig'. Stop.
$ make SHELL=/bin/bash CC=/root/asi_db/compat/cc-wrapper.sh HOSTCC=/root/asi_db/compat/cc-wrapper.sh allnoconfig
make: *** No rule to make target 'allnoconfig'. Stop.
$ make SHELL=/bin/bash CC=/root/asi_db/compat/cc-wrapper.sh HOSTCC=/root/asi_db/compat/cc-wrapper.sh include/bb_config.h
make: *** No rule to make target 'include/bb_config.h'. Stop.
$ make SHELL=/bin/bash CC=/root/asi_db/compat/cc-wrapper.sh HOSTCC=/root/asi_db/compat/cc-wrapper.sh -j3 V=1
mkdir -p /root/asi_db/builds/busybox/_worktrees/w0/include/config
make -C scripts/lxdialog all
make[1]: Entering directory '/root/asi_db/builds/busybox/_worktrees/w0/scripts/lxdialog'
/root/asi_db/compat/cc-wrapper.sh -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o checklist.o checklist.c
/root/asi_db/compat/cc-wrapper.sh -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o menubox.o menubox.c
/root/asi_db/compat/cc-wrapper.sh -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o textbox.o textbox.c
/root/asi_db/compat/cc-wrapper.sh -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o yesno.o yesno.c
/root/asi_db/compat/cc-wrapper.sh -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o inputbox.o inputbox.c
/root/asi_db/compat/cc-wrapper.sh -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o util.o util.c
/root/asi_db/compat/cc-wrapper.sh -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o lxdialog.o lxdialog.c
/root/asi_db/compat/cc-wrapper.sh -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -DLOCALE -DCURSES_LOC="<ncurses.h>" -c -o msgbox.o msgbox.c
/root/asi_db/compat/cc-wrapper.sh -o lxdialog checklist.o menubox.o textbox.o yesno.o inputbox.o util.o lxdialog.o msgbox.o -lncurses
make[1]: Leaving directory '/root/asi_db/builds/busybox/_worktrees/w0/scripts/lxdialog'
/bin/bash scripts/Menuconfig sysdeps/linux/config.in
Using defaults found in sysdeps/linux/defconfig
Preparing scripts: functions, parsingAwk died with error code 137. Giving up.
.....done.
Your BusyBox configuration changes were NOT saved.
lxtemp.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1 | main() {}
| ^~~~
textbox.c: In function ‘dialog_textbox’:
textbox.c:42:10: warning: variable ‘search_term’ set but not used [-Wunused-but-set-variable]
42 | char search_term[MAX_LEN + 1];
| ^~~~~~~~~~~
textbox.c: In function ‘print_line’:
textbox.c:462:12: warning: variable ‘x’ set but not used [-Wunused-but-set-variable]
462 | int y, x;
| ^
textbox.c:462:9: warning: variable ‘y’ set but not used [-Wunused-but-set-variable]
462 | int y, x;
| ^
inputbox.c: In function ‘dialog_inputbox’:
inputbox.c:107:17: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign]
107 | strcpy (instr, init);
| ^~~~~
| |
| unsigned char *
In file included from /usr/include/features.h:486,
from /usr/include/x86_64-linux-gnu/sys/sysmacros.h:22,
from /root/asi_db/compat/compat_stime.h:9,
from <command-line>:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:77:1: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’
77 | __NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
| ^~~~~
inputbox.c:109:23: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
109 | input_x = strlen (instr);
| ^~~~~
| |
| unsigned char *
In file included from dialog.h:27,
from inputbox.c:22:
/usr/include/string.h:407:35: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
In file included from dialog.h:29,
from inputbox.c:22:
inputbox.c:117:26: warning: pointer targets in passing argument 2 of ‘waddnstr’ differ in signedness [-Wpointer-sign]
117 | waddstr (dialog, instr);
| ^~~~~
| |
| unsigned char *
/usr/include/curses.h:830:47: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
830 | extern NCURSES_EXPORT(int) waddnstr (WINDOW *,const char *,int); /* implemented */
| ^~~~~~~~~~~~
inputbox.c:147:43: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
147 | input_x = strlen (instr) - scroll;
| ^~~~~
| |
| unsigned char *
In file included from dialog.h:27,
from inputbox.c:22:
/usr/include/string.h:407:35: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
lxdialog.c: In function ‘j_inputbox’:
lxdialog.c:211:25: warning: pointer targets in passing argument 2 of ‘fprintf’ differ in signedness [-Wpointer-sign]
211 | fprintf(stderr, dialog_input_result);
| ^~~~~~~~~~~~~~~~~~~
| |
| unsigned char *
In file included from /usr/include/stdio.h:894,
from /usr/include/curses.h:232,
from dialog.h:29,
from lxdialog.c:22:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:103:60: note: expected ‘const char * restrict’ but argument is of type ‘unsigned char *’
103 | fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
lxdialog.c:211:25: warning: format not a string literal and no format arguments [-Wformat-security]
211 | fprintf(stderr, dialog_input_result);
| ^~~~~~~~~~~~~~~~~~~
scripts/Menuconfig: line 559: 3047829 Killed awk "$1"
Error opening terminal: unknown.
| @@ -127,6 +127,12 @@ static const int RB_AUTOBOOT = 0x01234567; | |
| //static const int MAXENV = 16; /* Number of env. vars */ | |
| static const int LOG = 0x1; | |
| static const int CONSOLE = 0x2; | |
| + | #if defined BB_FEATURE_EXTRA_QUIET |
| + | static const int MAYBE_CONSOLE = 0x0; |
| + | #else |
| + | #define MAYBE_CONSOLE CONSOLE |
| + | #endif |
| + | |
| /* Allowed init action types */ | |
| typedef enum { | |
| @@ -186,6 +192,11 @@ static void loop_forever(void) | |
| /* Print a message to the specified device. | |
| * Device may be bitwise-or'd from LOG | CONSOLE */ | |
| + | #ifdef DEBUG_INIT |
| + | static inline messageND(int device, char *fmt, ...) { } |
| + | #else |
| + | #define messageND message |
| + | #endif |
| static void message(int device, char *fmt, ...) | |
| __attribute__ ((format (printf, 2, 3))); | |
| static void message(int device, char *fmt, ...) | |
| @@ -539,19 +550,15 @@ static pid_t run(char *command, char *terminal, int get_enter) | |
| * be allowed to start a shell or whatever an init script | |
| * specifies. | |
| */ | |
| - | #ifdef DEBUG_INIT |
| - | message(LOG, "Waiting for enter to start '%s' (pid %d, console %s)\n", |
| + | messageND(LOG, "Waiting for enter to start '%s' (pid %d, console %s)\n", |
| cmd[0], getpid(), terminal); | |
| - | #endif |
| write(fileno(stdout), press_enter, sizeof(press_enter) - 1); | |
| getc(stdin); | |
| } | |
| - | #ifdef DEBUG_INIT |
| /* Log the process name and args */ | |
| - | message(LOG, "Starting pid %d, console %s: '%s'\n", |
| + | messageND(LOG, "Starting pid %d, console %s: '%s'\n", |
| getpid(), terminal, command); | |
| - | #endif |
| #if defined CONFIG_FEATURE_INIT_COREDUMPS | |
| if (stat (CORE_ENABLE_FLAG_FILE, &sb) == 0) { | |
| @@ -937,22 +944,7 @@ extern int init_main(int argc, char **argv) | |
| putenv("PATH="_PATH_STDPATH); | |
| /* Hello world */ | |
| - | #ifndef DEBUG_INIT |
| - | message( |
| - | #if ! defined CONFIG_FEATURE_EXTRA_QUIET |
| - | CONSOLE| |
| - | #endif |
| - | LOG, |
| - | "init started: %s\n", full_version); |
| - | #else |
| - | message( |
| - | #if ! defined CONFIG_FEATURE_EXTRA_QUIET |
| - | CONSOLE| |
| - | #endif |
| - | LOG, |
| - | "init(%d) started: %s\n", getpid(), full_version); |
| - | #endif |
| - | |
| + | message(MAYBE_CONSOLE|LOG, "init started: %s\n", full_version); |
| /* Make sure there is enough memory to do something useful. */ | |
| check_memory(); | |
| @@ -1032,8 +1024,7 @@ extern int init_main(int argc, char **argv) | |
| for (a = initActionList; a; a = a->nextPtr) { | |
| if (a->pid == wpid) { | |
| a->pid = 0; | |
| - | message(LOG, |
| - | "Process '%s' (pid %d) exited. Scheduling it for restart.\n", |
| + | message(LOG, "Process '%s' (pid %d) exited. Scheduling it for restart.\n", |
| a->process, wpid); | |
| } | |
| } | |