aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2021-10-12 01:24:32 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2021-10-12 01:24:32 +0200
commit7c3e96d4b3d419d76f97e17d42a4401ee685b7ec (patch)
treef52e708d297940c0befd7a330e229332f3389ff5
parentf4fcd74a6e3d5cd2ec44cd6ce90be8a0ed108467 (diff)
downloadbusybox-w32-7c3e96d4b3d419d76f97e17d42a4401ee685b7ec.tar.gz
busybox-w32-7c3e96d4b3d419d76f97e17d42a4401ee685b7ec.tar.bz2
busybox-w32-7c3e96d4b3d419d76f97e17d42a4401ee685b7ec.zip
shell: use more compact SHELL_ASH / HUSH config defines. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/libbb.h12
-rw-r--r--shell/hush.c2
2 files changed, 3 insertions, 11 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 2a0b272c6..a48782832 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1502,16 +1502,8 @@ int scripted_main(int argc, char** argv) MAIN_EXTERNALLY_VISIBLE;
1502 1502
1503/* Applets which are useful from another applets */ 1503/* Applets which are useful from another applets */
1504int bb_cat(char** argv) FAST_FUNC; 1504int bb_cat(char** argv) FAST_FUNC;
1505int ash_main(int argc, char** argv) 1505int ash_main(int argc, char** argv) IF_SHELL_ASH(MAIN_EXTERNALLY_VISIBLE);
1506#if ENABLE_ASH || ENABLE_SH_IS_ASH || ENABLE_BASH_IS_ASH 1506int hush_main(int argc, char** argv) IF_SHELL_HUSH(MAIN_EXTERNALLY_VISIBLE);
1507 MAIN_EXTERNALLY_VISIBLE
1508#endif
1509;
1510int hush_main(int argc, char** argv)
1511#if ENABLE_HUSH || ENABLE_SH_IS_HUSH || ENABLE_BASH_IS_HUSH
1512 MAIN_EXTERNALLY_VISIBLE
1513#endif
1514;
1515/* If shell needs them, they exist even if not enabled as applets */ 1507/* If shell needs them, they exist even if not enabled as applets */
1516int echo_main(int argc, char** argv) IF_ECHO(MAIN_EXTERNALLY_VISIBLE); 1508int echo_main(int argc, char** argv) IF_ECHO(MAIN_EXTERNALLY_VISIBLE);
1517int printf_main(int argc, char **argv) IF_PRINTF(MAIN_EXTERNALLY_VISIBLE); 1509int printf_main(int argc, char **argv) IF_PRINTF(MAIN_EXTERNALLY_VISIBLE);
diff --git a/shell/hush.c b/shell/hush.c
index 7156297cf..38d924a3f 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -373,7 +373,7 @@
373# define F_DUPFD_CLOEXEC F_DUPFD 373# define F_DUPFD_CLOEXEC F_DUPFD
374#endif 374#endif
375 375
376#if ENABLE_FEATURE_SH_EMBEDDED_SCRIPTS && !(ENABLE_ASH || ENABLE_SH_IS_ASH || ENABLE_BASH_IS_ASH) 376#if ENABLE_FEATURE_SH_EMBEDDED_SCRIPTS && !ENABLE_SHELL_ASH
377# include "embedded_scripts.h" 377# include "embedded_scripts.h"
378#else 378#else
379# define NUM_SCRIPTS 0 379# define NUM_SCRIPTS 0