diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-17 13:02:41 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-17 13:02:41 +0000 |
commit | 96f67dc69d251168ea1c0adfaf6ff126d5dcbd36 (patch) | |
tree | c9a178cb85eaa3ae1e2386c7ae6e4c3f6c9f6924 | |
parent | d46e6d1a55f1182b8aa2d621a2532bad3bc20ee9 (diff) | |
download | busybox-w32-96f67dc69d251168ea1c0adfaf6ff126d5dcbd36.tar.gz busybox-w32-96f67dc69d251168ea1c0adfaf6ff126d5dcbd36.tar.bz2 busybox-w32-96f67dc69d251168ea1c0adfaf6ff126d5dcbd36.zip |
more compile fixes from randomconfig run
-rw-r--r-- | libbb/vfork_daemon_rexec.c | 2 | ||||
-rw-r--r-- | shell/hush.c | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c index aef74e994..a2572b0a9 100644 --- a/libbb/vfork_daemon_rexec.c +++ b/libbb/vfork_daemon_rexec.c | |||
@@ -100,6 +100,7 @@ int wait_pid(int *wstat, int pid) | |||
100 | return r; | 100 | return r; |
101 | } | 101 | } |
102 | 102 | ||
103 | #if ENABLE_FEATURE_PREFER_APPLETS | ||
103 | void save_nofork_data(struct nofork_save_area *save) | 104 | void save_nofork_data(struct nofork_save_area *save) |
104 | { | 105 | { |
105 | save->current_applet = current_applet; | 106 | save->current_applet = current_applet; |
@@ -162,6 +163,7 @@ int run_nofork_applet(const struct bb_applet *a, char **argv) | |||
162 | save_nofork_data(&old); | 163 | save_nofork_data(&old); |
163 | return run_nofork_applet_prime(&old, a, argv); | 164 | return run_nofork_applet_prime(&old, a, argv); |
164 | } | 165 | } |
166 | #endif /* FEATURE_PREFER_APPLETS */ | ||
165 | 167 | ||
166 | int spawn_and_wait(char **argv) | 168 | int spawn_and_wait(char **argv) |
167 | { | 169 | { |
diff --git a/shell/hush.c b/shell/hush.c index 7a4d7f934..0a035cad4 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -486,6 +486,10 @@ static const struct built_in_command bltins[] = { | |||
486 | { NULL, NULL, NULL } | 486 | { NULL, NULL, NULL } |
487 | }; | 487 | }; |
488 | 488 | ||
489 | #if ENABLE_FEATURE_SH_STANDALONE | ||
490 | struct nofork_save_area nofork_save; | ||
491 | #endif | ||
492 | |||
489 | #if ENABLE_HUSH_JOB | 493 | #if ENABLE_HUSH_JOB |
490 | 494 | ||
491 | /* move to libbb? */ | 495 | /* move to libbb? */ |
@@ -537,10 +541,6 @@ static void set_every_sighandler(void (*handler)(int)) | |||
537 | static struct pipe *toplevel_list; | 541 | static struct pipe *toplevel_list; |
538 | static sigjmp_buf toplevel_jb; | 542 | static sigjmp_buf toplevel_jb; |
539 | smallint ctrl_z_flag; | 543 | smallint ctrl_z_flag; |
540 | #if ENABLE_FEATURE_SH_STANDALONE | ||
541 | struct nofork_save_area nofork_save; | ||
542 | #endif | ||
543 | |||
544 | static void handler_ctrl_c(int sig) | 544 | static void handler_ctrl_c(int sig) |
545 | { | 545 | { |
546 | debug_printf_jobs("got sig %d\n", sig); | 546 | debug_printf_jobs("got sig %d\n", sig); |
@@ -1105,7 +1105,9 @@ static int file_get(struct in_str *i) | |||
1105 | 1105 | ||
1106 | /* If there is data waiting, eat it up */ | 1106 | /* If there is data waiting, eat it up */ |
1107 | if (i->p && *i->p) { | 1107 | if (i->p && *i->p) { |
1108 | #if ENABLE_HUSH_INTERACTIVE | ||
1108 | take_cached: | 1109 | take_cached: |
1110 | #endif | ||
1109 | ch = *i->p++; | 1111 | ch = *i->p++; |
1110 | if (i->eof_flag && !*i->p) | 1112 | if (i->eof_flag && !*i->p) |
1111 | ch = EOF; | 1113 | ch = EOF; |
@@ -1120,11 +1122,9 @@ static int file_get(struct in_str *i) | |||
1120 | i->promptmode = 2; | 1122 | i->promptmode = 2; |
1121 | i->__promptme = 0; | 1123 | i->__promptme = 0; |
1122 | goto take_cached; | 1124 | goto take_cached; |
1123 | } else | ||
1124 | #endif | ||
1125 | { | ||
1126 | ch = fgetc(i->file); | ||
1127 | } | 1125 | } |
1126 | #endif | ||
1127 | ch = fgetc(i->file); | ||
1128 | } | 1128 | } |
1129 | debug_printf("file_get: got a '%c' %d\n", ch, ch); | 1129 | debug_printf("file_get: got a '%c' %d\n", ch, ch); |
1130 | #if ENABLE_HUSH_INTERACTIVE | 1130 | #if ENABLE_HUSH_INTERACTIVE |