diff options
author | Denis Vlasenko | 2008-04-01 14:47:57 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-04-01 14:47:57 +0000 |
commit | 468aea2d8800cc0496383616d82d7c957ae8bc50 (patch) | |
tree | 8a2f3d80dc2440dd007caed4cfa235b3858c9170 /include | |
parent | 165f5b394fa337e71e08435b51108f4394199b2b (diff) | |
download | busybox-468aea2d8800cc0496383616d82d7c957ae8bc50.zip busybox-468aea2d8800cc0496383616d82d7c957ae8bc50.tar.gz |
shells: do not frocibly enable test, echo and kill _applets_,
just build relevant source and use xxx_main functions.
build system: add a special case when we have exactly one applet enabled
(makes "true", "false", "basename" REALLY tiny).
getopt32: do not use stdio.
function old new delta
getopt32 1385 1412 +27
make_device 1187 1200 +13
basename_main 120 127 +7
tcpudpsvd_main 1922 1926 +4
testcmd 5 - -5
echocmd 5 - -5
fuser_main 1243 1231 -12
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 4/1 up/down: 51/-22) Total: 29 bytes
Diffstat (limited to 'include')
-rw-r--r-- | include/busybox.h | 3 | ||||
-rw-r--r-- | include/libbb.h | 17 |
2 files changed, 7 insertions, 13 deletions
diff --git a/include/busybox.h b/include/busybox.h index cad45ac..0c44d2f 100644 --- a/include/busybox.h +++ b/include/busybox.h @@ -59,9 +59,6 @@ extern const uint8_t applet_install_loc[]; /* Length of these names has effect on size of libbusybox * and "individual" binaries. Keep them short. */ -void lbb_prepare(const char *applet - USE_FEATURE_INDIVIDUAL(, char **argv) - ) MAIN_EXTERNALLY_VISIBLE; #if ENABLE_BUILD_LIBBUSYBOX #if ENABLE_FEATURE_SHARED_BUSYBOX int lbb_main(char **argv) EXTERNALLY_VISIBLE; diff --git a/include/libbb.h b/include/libbb.h index edf27c6..202574a 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -848,23 +848,20 @@ extern void bb_verror_msg(const char *s, va_list p, const char *strerr); /* applets which are useful from another applets */ int bb_cat(char** argv); -int echo_main(int argc, char** argv) MAIN_EXTERNALLY_VISIBLE; -int test_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int kill_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -#if ENABLE_ROUTE -void bb_displayroutes(int noresolve, int netstatfmt); -#endif +/* If shell needs them, these three "exist" even if not enabled as applets */ +int echo_main(int argc, char** argv) USE_ECHO(MAIN_EXTERNALLY_VISIBLE); +int test_main(int argc, char **argv) USE_TEST(MAIN_EXTERNALLY_VISIBLE); +int kill_main(int argc, char **argv) USE_KILL(MAIN_EXTERNALLY_VISIBLE); int chown_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -#if ENABLE_GUNZIP int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -#endif -#if ENABLE_BUNZIP2 int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -#endif int bbunpack(char **argv, char* (*make_new_name)(char *filename), USE_DESKTOP(long long) int (*unpacker)(void) ); +#if ENABLE_ROUTE +void bb_displayroutes(int noresolve, int netstatfmt); +#endif /* Networking */ |