diff options
author | Pavel Roskin <proski@gnu.org> | 2000-07-17 19:31:54 +0000 |
---|---|---|
committer | Pavel Roskin <proski@gnu.org> | 2000-07-17 19:31:54 +0000 |
commit | 21ddb38fcf0633ced1e047ac090c3fbf7d636ce5 (patch) | |
tree | 24a73f2ff13a058dacb38ce37984f279d1fab322 | |
parent | a1d187a8a8a75cf36a45c8d6e0de86964eb2056f (diff) | |
download | busybox-w32-21ddb38fcf0633ced1e047ac090c3fbf7d636ce5.tar.gz busybox-w32-21ddb38fcf0633ced1e047ac090c3fbf7d636ce5.tar.bz2 busybox-w32-21ddb38fcf0633ced1e047ac090c3fbf7d636ce5.zip |
Now it's possible to compile Busybox with only one app defined
(unless it's lsmod, to be fixed by the next commit)
-rw-r--r-- | internal.h | 5 | ||||
-rw-r--r-- | utility.c | 31 |
2 files changed, 21 insertions, 15 deletions
diff --git a/internal.h b/internal.h index a192679b9..e36c7f396 100644 --- a/internal.h +++ b/internal.h | |||
@@ -334,7 +334,6 @@ int recursiveAction(const char *fileName, int recurse, int followLinks, int dept | |||
334 | int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData), | 334 | int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData), |
335 | int (*dirAction) (const char *fileName, struct stat* statbuf, void* userData), | 335 | int (*dirAction) (const char *fileName, struct stat* statbuf, void* userData), |
336 | void* userData); | 336 | void* userData); |
337 | const char* timeString(time_t timeVal); | ||
338 | 337 | ||
339 | extern int createPath (const char *name, int mode); | 338 | extern int createPath (const char *name, int mode); |
340 | extern int parse_mode( const char* s, mode_t* theMode); | 339 | extern int parse_mode( const char* s, mode_t* theMode); |
@@ -373,10 +372,8 @@ extern void my_getpwuid(char *name, long uid); | |||
373 | extern void my_getgrgid(char *group, long gid); | 372 | extern void my_getgrgid(char *group, long gid); |
374 | extern long my_getpwnamegid(char *name); | 373 | extern long my_getpwnamegid(char *name); |
375 | 374 | ||
376 | |||
377 | #if defined BB_INIT || defined BB_SYSLOGD | ||
378 | extern int device_open(char *device, int mode); | 375 | extern int device_open(char *device, int mode); |
379 | #endif | 376 | |
380 | #if defined BB_FEATURE_MOUNT_LOOP | 377 | #if defined BB_FEATURE_MOUNT_LOOP |
381 | extern int del_loop(const char *device); | 378 | extern int del_loop(const char *device); |
382 | extern int set_loop(const char *device, const char *file, int offset, int *loopro); | 379 | extern int set_loop(const char *device, const char *file, int offset, int *loopro); |
@@ -29,8 +29,10 @@ | |||
29 | #if defined (BB_CHMOD_CHOWN_CHGRP) \ | 29 | #if defined (BB_CHMOD_CHOWN_CHGRP) \ |
30 | || defined (BB_CP_MV) \ | 30 | || defined (BB_CP_MV) \ |
31 | || defined (BB_FIND) \ | 31 | || defined (BB_FIND) \ |
32 | || defined (BB_INSMOD) \ | ||
32 | || defined (BB_LS) \ | 33 | || defined (BB_LS) \ |
33 | || defined (BB_INSMOD) | 34 | || defined (BB_RM) \ |
35 | || defined (BB_TAR) | ||
34 | /* same conditions as recursiveAction */ | 36 | /* same conditions as recursiveAction */ |
35 | #define bb_need_name_too_long | 37 | #define bb_need_name_too_long |
36 | #endif | 38 | #endif |
@@ -223,7 +225,7 @@ void reset_ino_dev_hashtable(void) | |||
223 | 225 | ||
224 | #endif /* BB_CP_MV || BB_DU */ | 226 | #endif /* BB_CP_MV || BB_DU */ |
225 | 227 | ||
226 | #if defined (BB_CP_MV) || defined (BB_DU) || defined (BB_LN) | 228 | #if defined (BB_CP_MV) || defined (BB_DU) || defined (BB_LN) || defined (BB_AR) |
227 | /* | 229 | /* |
228 | * Return TRUE if a fileName is a directory. | 230 | * Return TRUE if a fileName is a directory. |
229 | * Nonexistant files return FALSE. | 231 | * Nonexistant files return FALSE. |
@@ -456,7 +458,7 @@ const char *modeString(int mode) | |||
456 | #endif /* BB_TAR || BB_LS */ | 458 | #endif /* BB_TAR || BB_LS */ |
457 | 459 | ||
458 | 460 | ||
459 | #if defined BB_TAR | 461 | #if defined BB_TAR || defined BB_AR |
460 | /* | 462 | /* |
461 | * Return the standard ls-like time string from a time_t | 463 | * Return the standard ls-like time string from a time_t |
462 | * This is static and so is overwritten on each call. | 464 | * This is static and so is overwritten on each call. |
@@ -483,7 +485,7 @@ const char *timeString(time_t timeVal) | |||
483 | } | 485 | } |
484 | #endif /* BB_TAR */ | 486 | #endif /* BB_TAR */ |
485 | 487 | ||
486 | #if defined BB_TAR || defined BB_CP_MV | 488 | #if defined BB_TAR || defined BB_CP_MV || defined BB_AR |
487 | /* | 489 | /* |
488 | * Write all of the supplied buffer out to a file. | 490 | * Write all of the supplied buffer out to a file. |
489 | * This does multiple writes as necessary. | 491 | * This does multiple writes as necessary. |
@@ -512,7 +514,7 @@ int fullWrite(int fd, const char *buf, int len) | |||
512 | #endif /* BB_TAR || BB_CP_MV */ | 514 | #endif /* BB_TAR || BB_CP_MV */ |
513 | 515 | ||
514 | 516 | ||
515 | #if defined BB_TAR || defined BB_TAIL | 517 | #if defined BB_TAR || defined BB_TAIL || defined BB_AR |
516 | /* | 518 | /* |
517 | * Read all of the supplied buffer from a file. | 519 | * Read all of the supplied buffer from a file. |
518 | * This does multiple reads as necessary. | 520 | * This does multiple reads as necessary. |
@@ -549,6 +551,7 @@ int fullRead(int fd, char *buf, int len) | |||
549 | || defined (BB_CP_MV) \ | 551 | || defined (BB_CP_MV) \ |
550 | || defined (BB_FIND) \ | 552 | || defined (BB_FIND) \ |
551 | || defined (BB_INSMOD) \ | 553 | || defined (BB_INSMOD) \ |
554 | || defined (BB_LS) \ | ||
552 | || defined (BB_RM) \ | 555 | || defined (BB_RM) \ |
553 | || defined (BB_TAR) | 556 | || defined (BB_TAR) |
554 | 557 | ||
@@ -668,7 +671,7 @@ int recursiveAction(const char *fileName, | |||
668 | 671 | ||
669 | 672 | ||
670 | 673 | ||
671 | #if defined (BB_TAR) || defined (BB_MKDIR) | 674 | #if defined (BB_TAR) || defined (BB_MKDIR) || defined (BB_AR) |
672 | /* | 675 | /* |
673 | * Attempt to create the directories along the specified path, except for | 676 | * Attempt to create the directories along the specified path, except for |
674 | * the final component. The mode is given for the final directory only, | 677 | * the final component. The mode is given for the final directory only, |
@@ -702,7 +705,8 @@ extern int createPath(const char *name, int mode) | |||
702 | 705 | ||
703 | 706 | ||
704 | 707 | ||
705 | #if defined (BB_CHMOD_CHOWN_CHGRP) || defined (BB_MKDIR) | 708 | #if defined (BB_CHMOD_CHOWN_CHGRP) || defined (BB_MKDIR) \ |
709 | || defined (BB_MKFIFO) || defined (BB_MKNOD) | ||
706 | /* [ugoa]{+|-|=}[rwxst] */ | 710 | /* [ugoa]{+|-|=}[rwxst] */ |
707 | 711 | ||
708 | 712 | ||
@@ -799,13 +803,16 @@ extern int parse_mode(const char *s, mode_t * theMode) | |||
799 | } | 803 | } |
800 | 804 | ||
801 | 805 | ||
802 | #endif /* BB_CHMOD_CHOWN_CHGRP || BB_MKDIR */ | 806 | #endif |
807 | /* BB_CHMOD_CHOWN_CHGRP || BB_MKDIR || BB_MKFIFO || BB_MKNOD */ | ||
803 | 808 | ||
804 | 809 | ||
805 | 810 | ||
806 | 811 | ||
807 | 812 | ||
808 | #if defined BB_CHMOD_CHOWN_CHGRP || defined BB_PS || defined BB_LS || defined BB_TAR || defined BB_ID | 813 | #if defined BB_CHMOD_CHOWN_CHGRP || defined BB_PS || defined BB_LS \ |
814 | || defined BB_TAR || defined BB_ID || defined BB_LOGGER \ | ||
815 | || defined BB_LOGNAME || defined BB_WHOAMI | ||
809 | 816 | ||
810 | /* This parses entries in /etc/passwd and /etc/group. This is desirable | 817 | /* This parses entries in /etc/passwd and /etc/group. This is desirable |
811 | * for BusyBox, since we want to avoid using the glibc NSS stuff, which | 818 | * for BusyBox, since we want to avoid using the glibc NSS stuff, which |
@@ -912,7 +919,9 @@ long my_getpwnamegid(char *name) | |||
912 | return gid; | 919 | return gid; |
913 | } | 920 | } |
914 | 921 | ||
915 | #endif /* BB_CHMOD_CHOWN_CHGRP || BB_PS || BB_LS || BB_TAR || BB_ID */ | 922 | #endif |
923 | /* BB_CHMOD_CHOWN_CHGRP || BB_PS || BB_LS || BB_TAR \ | ||
924 | || BB_ID || BB_LOGGER || BB_LOGNAME || BB_WHOAMI */ | ||
916 | 925 | ||
917 | 926 | ||
918 | #if (defined BB_CHVT) || (defined BB_DEALLOCVT) || (defined BB_SETKEYCODES) | 927 | #if (defined BB_CHVT) || (defined BB_DEALLOCVT) || (defined BB_SETKEYCODES) |
@@ -1277,7 +1286,7 @@ extern long getNum(const char *cp) | |||
1277 | #endif /* BB_DD || BB_TAIL */ | 1286 | #endif /* BB_DD || BB_TAIL */ |
1278 | 1287 | ||
1279 | 1288 | ||
1280 | #if defined BB_INIT || defined BB_SYSLOGD | 1289 | #if defined BB_INIT || defined BB_SYSLOGD || defined BB_AR |
1281 | /* try to open up the specified device */ | 1290 | /* try to open up the specified device */ |
1282 | extern int device_open(char *device, int mode) | 1291 | extern int device_open(char *device, int mode) |
1283 | { | 1292 | { |