diff options
| author | Eric Andersen <andersen@codepoet.org> | 2001-07-22 23:00:15 +0000 |
|---|---|---|
| committer | Eric Andersen <andersen@codepoet.org> | 2001-07-22 23:00:15 +0000 |
| commit | 8d79ce832062873e6328f616ebb0c80db32020e3 (patch) | |
| tree | eab4c5133f1c8d1fd898d13e000aae5c5673211b | |
| parent | 20aab260e2f7011523402464fb079f48e5899890 (diff) | |
| download | busybox-w32-8d79ce832062873e6328f616ebb0c80db32020e3.tar.gz busybox-w32-8d79ce832062873e6328f616ebb0c80db32020e3.tar.bz2 busybox-w32-8d79ce832062873e6328f616ebb0c80db32020e3.zip | |
Some patches to make dietlibc work...
| -rw-r--r-- | Config.h | 3 | ||||
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | applets.h | 3 | ||||
| -rw-r--r-- | applets/usage.h | 7 | ||||
| -rw-r--r-- | cmdedit.c | 2 | ||||
| -rw-r--r-- | coreutils/ls.c | 1 | ||||
| -rw-r--r-- | include/applets.h | 3 | ||||
| -rw-r--r-- | include/libbb.h | 2 | ||||
| -rw-r--r-- | include/usage.h | 7 | ||||
| -rw-r--r-- | init.c | 2 | ||||
| -rw-r--r-- | init/init.c | 2 | ||||
| -rw-r--r-- | libbb/libbb.h | 2 | ||||
| -rw-r--r-- | logger.c | 21 | ||||
| -rw-r--r-- | ls.c | 1 | ||||
| -rw-r--r-- | procps/ps.c | 1 | ||||
| -rw-r--r-- | ps.c | 1 | ||||
| -rw-r--r-- | shell/cmdedit.c | 2 | ||||
| -rw-r--r-- | sysklogd/logger.c | 21 | ||||
| -rw-r--r-- | usage.h | 7 |
19 files changed, 62 insertions, 28 deletions
| @@ -75,11 +75,12 @@ | |||
| 75 | #define BB_MKNOD | 75 | #define BB_MKNOD |
| 76 | #define BB_MKSWAP | 76 | #define BB_MKSWAP |
| 77 | //#define BB_MKTEMP | 77 | //#define BB_MKTEMP |
| 78 | //#define BB_NC | 78 | #define BB_MODPROBE |
| 79 | #define BB_MORE | 79 | #define BB_MORE |
| 80 | #define BB_MOUNT | 80 | #define BB_MOUNT |
| 81 | //#define BB_MT | 81 | //#define BB_MT |
| 82 | #define BB_MV | 82 | #define BB_MV |
| 83 | //#define BB_NC | ||
| 83 | //#define BB_NSLOOKUP | 84 | //#define BB_NSLOOKUP |
| 84 | //#define BB_PING | 85 | //#define BB_PING |
| 85 | //#define BB_PIVOT_ROOT | 86 | //#define BB_PIVOT_ROOT |
| @@ -351,7 +351,7 @@ busybox.links: busybox.mkll Config.h applets.h | |||
| 351 | nfsmount.o cmdedit.o: %.o: %.h | 351 | nfsmount.o cmdedit.o: %.o: %.h |
| 352 | sh.o: cmdedit.h | 352 | sh.o: cmdedit.h |
| 353 | $(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile | 353 | $(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile |
| 354 | $(CC) -I- $(CFLAGS) -I. $(patsubst %,-I%,$(subst :, ,$(BB_SRC_DIR))) -c $< -o $*.o | 354 | $(CC) $(CFLAGS) -I. $(patsubst %,-I%,$(subst :, ,$(BB_SRC_DIR))) -c $< -o $*.o |
| 355 | 355 | ||
| 356 | $(PWD_OBJS): %.o: %.c Config.h busybox.h applets.h Makefile | 356 | $(PWD_OBJS): %.o: %.c Config.h busybox.h applets.h Makefile |
| 357 | - mkdir -p $(PWD_GRP) | 357 | - mkdir -p $(PWD_GRP) |
| @@ -263,6 +263,9 @@ | |||
| 263 | #ifdef BB_MKTEMP | 263 | #ifdef BB_MKTEMP |
| 264 | APPLET(mktemp, mktemp_main, _BB_DIR_BIN) | 264 | APPLET(mktemp, mktemp_main, _BB_DIR_BIN) |
| 265 | #endif | 265 | #endif |
| 266 | #ifdef BB_MODPROBE | ||
| 267 | APPLET(modprobe, modprobe_main, _BB_DIR_SBIN) | ||
| 268 | #endif | ||
| 266 | #ifdef BB_MORE | 269 | #ifdef BB_MORE |
| 267 | APPLET(more, more_main, _BB_DIR_BIN) | 270 | APPLET(more, more_main, _BB_DIR_BIN) |
| 268 | #endif | 271 | #endif |
diff --git a/applets/usage.h b/applets/usage.h index b0b9722ad..2a2042292 100644 --- a/applets/usage.h +++ b/applets/usage.h | |||
| @@ -1084,6 +1084,13 @@ | |||
| 1084 | "$ ls -la /tmp/temp.mWiLjM\n" \ | 1084 | "$ ls -la /tmp/temp.mWiLjM\n" \ |
| 1085 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" | 1085 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" |
| 1086 | 1086 | ||
| 1087 | #define modprobe_trivial_usage \ | ||
| 1088 | "[FILE ...]" | ||
| 1089 | #define modprobe_full_usage \ | ||
| 1090 | "Used for hight level module loading and unloading." | ||
| 1091 | #define modprobe_example_usage \ | ||
| 1092 | "$ modprobe cdrom\n" | ||
| 1093 | |||
| 1087 | #define more_trivial_usage \ | 1094 | #define more_trivial_usage \ |
| 1088 | "[FILE ...]" | 1095 | "[FILE ...]" |
| 1089 | #define more_full_usage \ | 1096 | #define more_full_usage \ |
| @@ -170,7 +170,7 @@ static void cmdedit_setwidth(int w, int redraw_flg); | |||
| 170 | static void win_changed(int nsig) | 170 | static void win_changed(int nsig) |
| 171 | { | 171 | { |
| 172 | struct winsize win = { 0, 0, 0, 0 }; | 172 | struct winsize win = { 0, 0, 0, 0 }; |
| 173 | static __sighandler_t previous_SIGWINCH_handler; /* for reset */ | 173 | static sighandler_t previous_SIGWINCH_handler; /* for reset */ |
| 174 | 174 | ||
| 175 | /* emulate || signal call */ | 175 | /* emulate || signal call */ |
| 176 | if (nsig == -SIGWINCH || nsig == SIGWINCH) { | 176 | if (nsig == -SIGWINCH || nsig == SIGWINCH) { |
diff --git a/coreutils/ls.c b/coreutils/ls.c index 10191476e..794a1d028 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
| @@ -61,6 +61,7 @@ enum { | |||
| 61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
| 62 | #include <fcntl.h> | 62 | #include <fcntl.h> |
| 63 | #include <signal.h> | 63 | #include <signal.h> |
| 64 | #include <termios.h> | ||
| 64 | #include <sys/ioctl.h> | 65 | #include <sys/ioctl.h> |
| 65 | #include "busybox.h" | 66 | #include "busybox.h" |
| 66 | 67 | ||
diff --git a/include/applets.h b/include/applets.h index 12a28d5be..1fb6dcd92 100644 --- a/include/applets.h +++ b/include/applets.h | |||
| @@ -263,6 +263,9 @@ | |||
| 263 | #ifdef BB_MKTEMP | 263 | #ifdef BB_MKTEMP |
| 264 | APPLET(mktemp, mktemp_main, _BB_DIR_BIN) | 264 | APPLET(mktemp, mktemp_main, _BB_DIR_BIN) |
| 265 | #endif | 265 | #endif |
| 266 | #ifdef BB_MODPROBE | ||
| 267 | APPLET(modprobe, modprobe_main, _BB_DIR_SBIN) | ||
| 268 | #endif | ||
| 266 | #ifdef BB_MORE | 269 | #ifdef BB_MORE |
| 267 | APPLET(more, more_main, _BB_DIR_BIN) | 270 | APPLET(more, more_main, _BB_DIR_BIN) |
| 268 | #endif | 271 | #endif |
diff --git a/include/libbb.h b/include/libbb.h index bf5f0c1c5..c167e10bc 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | #include "../busybox.h" | 41 | #include "../busybox.h" |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | #if __GNU_LIBRARY__ < 5 | 44 | #if (__GNU_LIBRARY__ < 5) && (!defined __dietlibc__) |
| 45 | /* libc5 doesn't define socklen_t */ | 45 | /* libc5 doesn't define socklen_t */ |
| 46 | typedef unsigned int socklen_t; | 46 | typedef unsigned int socklen_t; |
| 47 | /* libc5 doesn't implement BSD 4.4 daemon() */ | 47 | /* libc5 doesn't implement BSD 4.4 daemon() */ |
diff --git a/include/usage.h b/include/usage.h index b0b9722ad..2a2042292 100644 --- a/include/usage.h +++ b/include/usage.h | |||
| @@ -1084,6 +1084,13 @@ | |||
| 1084 | "$ ls -la /tmp/temp.mWiLjM\n" \ | 1084 | "$ ls -la /tmp/temp.mWiLjM\n" \ |
| 1085 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" | 1085 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" |
| 1086 | 1086 | ||
| 1087 | #define modprobe_trivial_usage \ | ||
| 1088 | "[FILE ...]" | ||
| 1089 | #define modprobe_full_usage \ | ||
| 1090 | "Used for hight level module loading and unloading." | ||
| 1091 | #define modprobe_example_usage \ | ||
| 1092 | "$ modprobe cdrom\n" | ||
| 1093 | |||
| 1087 | #define more_trivial_usage \ | 1094 | #define more_trivial_usage \ |
| 1088 | "[FILE ...]" | 1095 | "[FILE ...]" |
| 1089 | #define more_full_usage \ | 1096 | #define more_full_usage \ |
| @@ -84,7 +84,7 @@ static const int RB_DISABLE_CAD = 0; | |||
| 84 | static const int RB_AUTOBOOT = 0x01234567; | 84 | static const int RB_AUTOBOOT = 0x01234567; |
| 85 | #endif | 85 | #endif |
| 86 | 86 | ||
| 87 | #if __GNU_LIBRARY__ > 5 | 87 | #if (__GNU_LIBRARY__ > 5) || defined(__dietlibc__) |
| 88 | #include <sys/reboot.h> | 88 | #include <sys/reboot.h> |
| 89 | #define init_reboot(magic) reboot(magic) | 89 | #define init_reboot(magic) reboot(magic) |
| 90 | #else | 90 | #else |
diff --git a/init/init.c b/init/init.c index e057caa7e..ec144ea85 100644 --- a/init/init.c +++ b/init/init.c | |||
| @@ -84,7 +84,7 @@ static const int RB_DISABLE_CAD = 0; | |||
| 84 | static const int RB_AUTOBOOT = 0x01234567; | 84 | static const int RB_AUTOBOOT = 0x01234567; |
| 85 | #endif | 85 | #endif |
| 86 | 86 | ||
| 87 | #if __GNU_LIBRARY__ > 5 | 87 | #if (__GNU_LIBRARY__ > 5) || defined(__dietlibc__) |
| 88 | #include <sys/reboot.h> | 88 | #include <sys/reboot.h> |
| 89 | #define init_reboot(magic) reboot(magic) | 89 | #define init_reboot(magic) reboot(magic) |
| 90 | #else | 90 | #else |
diff --git a/libbb/libbb.h b/libbb/libbb.h index bf5f0c1c5..c167e10bc 100644 --- a/libbb/libbb.h +++ b/libbb/libbb.h | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | #include "../busybox.h" | 41 | #include "../busybox.h" |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | #if __GNU_LIBRARY__ < 5 | 44 | #if (__GNU_LIBRARY__ < 5) && (!defined __dietlibc__) |
| 45 | /* libc5 doesn't define socklen_t */ | 45 | /* libc5 doesn't define socklen_t */ |
| 46 | typedef unsigned int socklen_t; | 46 | typedef unsigned int socklen_t; |
| 47 | /* libc5 doesn't implement BSD 4.4 daemon() */ | 47 | /* libc5 doesn't implement BSD 4.4 daemon() */ |
| @@ -36,17 +36,18 @@ | |||
| 36 | #include <sys/syslog.h> | 36 | #include <sys/syslog.h> |
| 37 | 37 | ||
| 38 | #else | 38 | #else |
| 39 | /* We have to do this since the header file defines static | ||
| 40 | * structures. Argh.... bad libc, bad, bad... | ||
| 41 | */ | ||
| 42 | #include <sys/syslog.h> | 39 | #include <sys/syslog.h> |
| 43 | 40 | # ifndef __dietlibc__ | |
| 44 | typedef struct _code { | 41 | /* We have to do this since the header file defines static |
| 45 | char *c_name; | 42 | * structures. Argh.... bad libc, bad, bad... |
| 46 | int c_val; | 43 | */ |
| 47 | } CODE; | 44 | typedef struct _code { |
| 48 | extern CODE prioritynames[]; | 45 | char *c_name; |
| 49 | extern CODE facilitynames[]; | 46 | int c_val; |
| 47 | } CODE; | ||
| 48 | extern CODE prioritynames[]; | ||
| 49 | extern CODE facilitynames[]; | ||
| 50 | # endif | ||
| 50 | #endif | 51 | #endif |
| 51 | 52 | ||
| 52 | /* Decode a symbolic name to a numeric value | 53 | /* Decode a symbolic name to a numeric value |
| @@ -61,6 +61,7 @@ enum { | |||
| 61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
| 62 | #include <fcntl.h> | 62 | #include <fcntl.h> |
| 63 | #include <signal.h> | 63 | #include <signal.h> |
| 64 | #include <termios.h> | ||
| 64 | #include <sys/ioctl.h> | 65 | #include <sys/ioctl.h> |
| 65 | #include "busybox.h" | 66 | #include "busybox.h" |
| 66 | 67 | ||
diff --git a/procps/ps.c b/procps/ps.c index 7afb0091f..9e96a5402 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <fcntl.h> | 36 | #include <fcntl.h> |
| 37 | #include <ctype.h> | 37 | #include <ctype.h> |
| 38 | #include <string.h> | 38 | #include <string.h> |
| 39 | #include <termios.h> | ||
| 39 | #include <sys/ioctl.h> | 40 | #include <sys/ioctl.h> |
| 40 | #include "busybox.h" | 41 | #include "busybox.h" |
| 41 | 42 | ||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <fcntl.h> | 36 | #include <fcntl.h> |
| 37 | #include <ctype.h> | 37 | #include <ctype.h> |
| 38 | #include <string.h> | 38 | #include <string.h> |
| 39 | #include <termios.h> | ||
| 39 | #include <sys/ioctl.h> | 40 | #include <sys/ioctl.h> |
| 40 | #include "busybox.h" | 41 | #include "busybox.h" |
| 41 | 42 | ||
diff --git a/shell/cmdedit.c b/shell/cmdedit.c index 69f833747..3b4750455 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c | |||
| @@ -170,7 +170,7 @@ static void cmdedit_setwidth(int w, int redraw_flg); | |||
| 170 | static void win_changed(int nsig) | 170 | static void win_changed(int nsig) |
| 171 | { | 171 | { |
| 172 | struct winsize win = { 0, 0, 0, 0 }; | 172 | struct winsize win = { 0, 0, 0, 0 }; |
| 173 | static __sighandler_t previous_SIGWINCH_handler; /* for reset */ | 173 | static sighandler_t previous_SIGWINCH_handler; /* for reset */ |
| 174 | 174 | ||
| 175 | /* emulate || signal call */ | 175 | /* emulate || signal call */ |
| 176 | if (nsig == -SIGWINCH || nsig == SIGWINCH) { | 176 | if (nsig == -SIGWINCH || nsig == SIGWINCH) { |
diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 623a4f9e5..9f730915f 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c | |||
| @@ -36,17 +36,18 @@ | |||
| 36 | #include <sys/syslog.h> | 36 | #include <sys/syslog.h> |
| 37 | 37 | ||
| 38 | #else | 38 | #else |
| 39 | /* We have to do this since the header file defines static | ||
| 40 | * structures. Argh.... bad libc, bad, bad... | ||
| 41 | */ | ||
| 42 | #include <sys/syslog.h> | 39 | #include <sys/syslog.h> |
| 43 | 40 | # ifndef __dietlibc__ | |
| 44 | typedef struct _code { | 41 | /* We have to do this since the header file defines static |
| 45 | char *c_name; | 42 | * structures. Argh.... bad libc, bad, bad... |
| 46 | int c_val; | 43 | */ |
| 47 | } CODE; | 44 | typedef struct _code { |
| 48 | extern CODE prioritynames[]; | 45 | char *c_name; |
| 49 | extern CODE facilitynames[]; | 46 | int c_val; |
| 47 | } CODE; | ||
| 48 | extern CODE prioritynames[]; | ||
| 49 | extern CODE facilitynames[]; | ||
| 50 | # endif | ||
| 50 | #endif | 51 | #endif |
| 51 | 52 | ||
| 52 | /* Decode a symbolic name to a numeric value | 53 | /* Decode a symbolic name to a numeric value |
| @@ -1084,6 +1084,13 @@ | |||
| 1084 | "$ ls -la /tmp/temp.mWiLjM\n" \ | 1084 | "$ ls -la /tmp/temp.mWiLjM\n" \ |
| 1085 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" | 1085 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" |
| 1086 | 1086 | ||
| 1087 | #define modprobe_trivial_usage \ | ||
| 1088 | "[FILE ...]" | ||
| 1089 | #define modprobe_full_usage \ | ||
| 1090 | "Used for hight level module loading and unloading." | ||
| 1091 | #define modprobe_example_usage \ | ||
| 1092 | "$ modprobe cdrom\n" | ||
| 1093 | |||
| 1087 | #define more_trivial_usage \ | 1094 | #define more_trivial_usage \ |
| 1088 | "[FILE ...]" | 1095 | "[FILE ...]" |
| 1089 | #define more_full_usage \ | 1096 | #define more_full_usage \ |
