diff options
author | Rob Landley <rob@landley.net> | 2006-06-05 17:35:24 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-06-05 17:35:24 +0000 |
commit | 362dc2bf3314b3e01d0445acbabaebedb3a94131 (patch) | |
tree | 7f8847740d40d26316019a033879e1cfcad708d5 | |
parent | 12d87550a3b7b85d2c03e45261e059855db04d1b (diff) | |
download | busybox-w32-362dc2bf3314b3e01d0445acbabaebedb3a94131.tar.gz busybox-w32-362dc2bf3314b3e01d0445acbabaebedb3a94131.tar.bz2 busybox-w32-362dc2bf3314b3e01d0445acbabaebedb3a94131.zip |
Header cleanup on two more networking files (move libbb.h to the top and
remove #includes that libbb.h already does), plus a minor cleanup of
libbb.h to move #includes towards the top of the file where we can see 'em.
-rw-r--r-- | include/libbb.h | 29 | ||||
-rw-r--r-- | networking/fakeidentd.c | 10 | ||||
-rw-r--r-- | networking/nameif.c | 4 |
3 files changed, 17 insertions, 26 deletions
diff --git a/include/libbb.h b/include/libbb.h index 4293d394b..18ad8419f 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -25,8 +25,6 @@ | |||
25 | #include <sys/types.h> | 25 | #include <sys/types.h> |
26 | #include <termios.h> | 26 | #include <termios.h> |
27 | 27 | ||
28 | |||
29 | |||
30 | #ifdef CONFIG_SELINUX | 28 | #ifdef CONFIG_SELINUX |
31 | #include <selinux/selinux.h> | 29 | #include <selinux/selinux.h> |
32 | #endif | 30 | #endif |
@@ -40,6 +38,17 @@ | |||
40 | # include "sha1.h" | 38 | # include "sha1.h" |
41 | #endif | 39 | #endif |
42 | 40 | ||
41 | /* Try to pull in PATH_MAX */ | ||
42 | #include <limits.h> | ||
43 | #include <sys/param.h> | ||
44 | #ifndef PATH_MAX | ||
45 | #define PATH_MAX 256 | ||
46 | #endif | ||
47 | |||
48 | #ifdef DMALLOC | ||
49 | #include <dmalloc.h> | ||
50 | #endif | ||
51 | |||
43 | /* Some useful definitions */ | 52 | /* Some useful definitions */ |
44 | #undef FALSE | 53 | #undef FALSE |
45 | #define FALSE ((int) 0) | 54 | #define FALSE ((int) 0) |
@@ -457,12 +466,11 @@ extern void bb_xread_all(int fd, void *buf, size_t count); | |||
457 | extern unsigned char bb_xread_char(int fd); | 466 | extern unsigned char bb_xread_char(int fd); |
458 | 467 | ||
459 | #ifndef COMM_LEN | 468 | #ifndef COMM_LEN |
460 | /*#include <sched.h> *//* Task command name length */ | ||
461 | #ifdef TASK_COMM_LEN | 469 | #ifdef TASK_COMM_LEN |
462 | #define COMM_LEN TASK_COMM_LEN | 470 | #define COMM_LEN TASK_COMM_LEN |
463 | #else | 471 | #else |
464 | #define COMM_LEN 16 /* synchronize with size of comm in struct task_struct | 472 | /* synchronize with sizeof(task_struct.comm) in /usr/include/linux/sched.h */ |
465 | in /usr/include/linux/sched.h */ | 473 | #define COMM_LEN 16 |
466 | #endif | 474 | #endif |
467 | #endif | 475 | #endif |
468 | typedef struct { | 476 | typedef struct { |
@@ -530,17 +538,6 @@ extern uint32_t *bb_crc32_filltable (int endian); | |||
530 | #define RB_POWER_OFF 0x4321fedc | 538 | #define RB_POWER_OFF 0x4321fedc |
531 | #endif | 539 | #endif |
532 | 540 | ||
533 | /* Try to pull in PATH_MAX */ | ||
534 | #include <limits.h> | ||
535 | #include <sys/param.h> | ||
536 | #ifndef PATH_MAX | ||
537 | #define PATH_MAX 256 | ||
538 | #endif | ||
539 | |||
540 | #ifdef DMALLOC | ||
541 | #include <dmalloc.h> | ||
542 | #endif | ||
543 | |||
544 | extern const char BB_BANNER[]; | 541 | extern const char BB_BANNER[]; |
545 | 542 | ||
546 | #endif /* __LIBBUSYBOX_H__ */ | 543 | #endif /* __LIBBUSYBOX_H__ */ |
diff --git a/networking/fakeidentd.c b/networking/fakeidentd.c index d3aa3ce5d..b097d9980 100644 --- a/networking/fakeidentd.c +++ b/networking/fakeidentd.c | |||
@@ -9,28 +9,22 @@ | |||
9 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "busybox.h" | ||
13 | |||
12 | #include <unistd.h> | 14 | #include <unistd.h> |
13 | #include <stdio.h> | ||
14 | #include <stdlib.h> | ||
15 | #include <stdarg.h> | ||
16 | #include <string.h> | 15 | #include <string.h> |
17 | #include <fcntl.h> | 16 | #include <fcntl.h> |
18 | #include <signal.h> | 17 | #include <signal.h> |
19 | #include <sys/syslog.h> | 18 | #include <sys/syslog.h> |
20 | 19 | ||
21 | #include <pwd.h> | 20 | #include <pwd.h> |
22 | #include <netdb.h> | ||
23 | 21 | ||
24 | #include <sys/syslog.h> | 22 | #include <sys/syslog.h> |
25 | #include <sys/types.h> | ||
26 | #include <time.h> | 23 | #include <time.h> |
27 | #include <sys/socket.h> | 24 | #include <sys/socket.h> |
28 | #include <netinet/in.h> | ||
29 | #include <errno.h> | 25 | #include <errno.h> |
30 | #include <arpa/inet.h> | ||
31 | #include <sys/uio.h> | 26 | #include <sys/uio.h> |
32 | 27 | ||
33 | #include "busybox.h" | ||
34 | 28 | ||
35 | #define IDENT_PORT 113 | 29 | #define IDENT_PORT 113 |
36 | #define MAXCONNS 20 | 30 | #define MAXCONNS 20 |
diff --git a/networking/nameif.c b/networking/nameif.c index 7dc48ec16..3d53d6f15 100644 --- a/networking/nameif.c +++ b/networking/nameif.c | |||
@@ -8,17 +8,17 @@ | |||
8 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | 8 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include "busybox.h" | ||
12 | |||
11 | #include <sys/syslog.h> | 13 | #include <sys/syslog.h> |
12 | #include <sys/socket.h> | 14 | #include <sys/socket.h> |
13 | #include <sys/ioctl.h> | 15 | #include <sys/ioctl.h> |
14 | #include <errno.h> | 16 | #include <errno.h> |
15 | #include <stdlib.h> | ||
16 | #include <string.h> | 17 | #include <string.h> |
17 | #include <unistd.h> | 18 | #include <unistd.h> |
18 | #include <net/if.h> | 19 | #include <net/if.h> |
19 | #include <netinet/ether.h> | 20 | #include <netinet/ether.h> |
20 | 21 | ||
21 | #include "busybox.h" | ||
22 | 22 | ||
23 | /* Older versions of net/if.h do not appear to define IF_NAMESIZE. */ | 23 | /* Older versions of net/if.h do not appear to define IF_NAMESIZE. */ |
24 | #ifndef IF_NAMESIZE | 24 | #ifndef IF_NAMESIZE |