diff options
author | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-06 20:47:33 +0000 |
---|---|---|
committer | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-06 20:47:33 +0000 |
commit | 65d898209f1063e88397d8b1411d3b9df3f797ee (patch) | |
tree | 588d140a71e857cb32c80d1faad6f3073b119aa7 /libbb | |
parent | 2cb5ca3cd6461e4e9632f53b4cece1ade0282580 (diff) | |
download | busybox-w32-65d898209f1063e88397d8b1411d3b9df3f797ee.tar.gz busybox-w32-65d898209f1063e88397d8b1411d3b9df3f797ee.tar.bz2 busybox-w32-65d898209f1063e88397d8b1411d3b9df3f797ee.zip |
Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions. (That should only be on prototypes.)
git-svn-id: svn://busybox.net/trunk/busybox@14457 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
37 files changed, 54 insertions, 54 deletions
diff --git a/libbb/bb_echo.c b/libbb/bb_echo.c index 41e6e4915..9ad73df85 100644 --- a/libbb/bb_echo.c +++ b/libbb/bb_echo.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <string.h> | 28 | #include <string.h> |
29 | #include "busybox.h" | 29 | #include "busybox.h" |
30 | 30 | ||
31 | extern int bb_echo(int ATTRIBUTE_UNUSED argc, char **argv) | 31 | int bb_echo(int ATTRIBUTE_UNUSED argc, char **argv) |
32 | { | 32 | { |
33 | #ifndef CONFIG_FEATURE_FANCY_ECHO | 33 | #ifndef CONFIG_FEATURE_FANCY_ECHO |
34 | #define eflag '\\' | 34 | #define eflag '\\' |
diff --git a/libbb/concat_path_file.c b/libbb/concat_path_file.c index 029c23272..3c5460d47 100644 --- a/libbb/concat_path_file.c +++ b/libbb/concat_path_file.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <string.h> | 28 | #include <string.h> |
29 | #include "libbb.h" | 29 | #include "libbb.h" |
30 | 30 | ||
31 | extern char *concat_path_file(const char *path, const char *filename) | 31 | char *concat_path_file(const char *path, const char *filename) |
32 | { | 32 | { |
33 | char *lc; | 33 | char *lc; |
34 | 34 | ||
diff --git a/libbb/concat_subpath_file.c b/libbb/concat_subpath_file.c index 6d86f5e8c..e72441999 100644 --- a/libbb/concat_subpath_file.c +++ b/libbb/concat_subpath_file.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #include "libbb.h" | 29 | #include "libbb.h" |
30 | 30 | ||
31 | extern char *concat_subpath_file(const char *path, const char *f) | 31 | char *concat_subpath_file(const char *path, const char *f) |
32 | { | 32 | { |
33 | if(f && *f == '.' && (!f[1] || (f[1] == '.' && !f[2]))) | 33 | if(f && *f == '.' && (!f[1] || (f[1] == '.' && !f[2]))) |
34 | return NULL; | 34 | return NULL; |
diff --git a/libbb/copyfd.c b/libbb/copyfd.c index 515253148..d138f3e59 100644 --- a/libbb/copyfd.c +++ b/libbb/copyfd.c | |||
@@ -62,7 +62,7 @@ out: | |||
62 | } | 62 | } |
63 | 63 | ||
64 | 64 | ||
65 | extern int bb_copyfd_size(int fd1, int fd2, const off_t size) | 65 | int bb_copyfd_size(int fd1, int fd2, const off_t size) |
66 | { | 66 | { |
67 | if (size) { | 67 | if (size) { |
68 | return(bb_full_fd_action(fd1, fd2, size)); | 68 | return(bb_full_fd_action(fd1, fd2, size)); |
@@ -70,7 +70,7 @@ extern int bb_copyfd_size(int fd1, int fd2, const off_t size) | |||
70 | return(0); | 70 | return(0); |
71 | } | 71 | } |
72 | 72 | ||
73 | extern int bb_copyfd_eof(int fd1, int fd2) | 73 | int bb_copyfd_eof(int fd1, int fd2) |
74 | { | 74 | { |
75 | return(bb_full_fd_action(fd1, fd2, 0)); | 75 | return(bb_full_fd_action(fd1, fd2, 0)); |
76 | } | 76 | } |
diff --git a/libbb/device_open.c b/libbb/device_open.c index 61f954f46..df5eae9e4 100644 --- a/libbb/device_open.c +++ b/libbb/device_open.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | 26 | ||
27 | /* try to open up the specified device */ | 27 | /* try to open up the specified device */ |
28 | extern int device_open(const char *device, int mode) | 28 | int device_open(const char *device, int mode) |
29 | { | 29 | { |
30 | int m, f, fd = -1; | 30 | int m, f, fd = -1; |
31 | 31 | ||
diff --git a/libbb/error_msg.c b/libbb/error_msg.c index 18811b8d1..2a90ba438 100644 --- a/libbb/error_msg.c +++ b/libbb/error_msg.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include "libbb.h" | 26 | #include "libbb.h" |
27 | 27 | ||
28 | extern void bb_error_msg(const char *s, ...) | 28 | void bb_error_msg(const char *s, ...) |
29 | { | 29 | { |
30 | va_list p; | 30 | va_list p; |
31 | 31 | ||
diff --git a/libbb/error_msg_and_die.c b/libbb/error_msg_and_die.c index 0937658a3..92043a535 100644 --- a/libbb/error_msg_and_die.c +++ b/libbb/error_msg_and_die.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include "libbb.h" | 26 | #include "libbb.h" |
27 | 27 | ||
28 | extern void bb_error_msg_and_die(const char *s, ...) | 28 | void bb_error_msg_and_die(const char *s, ...) |
29 | { | 29 | { |
30 | va_list p; | 30 | va_list p; |
31 | 31 | ||
diff --git a/libbb/find_mount_point.c b/libbb/find_mount_point.c index 4d27b4809..83527a8c8 100644 --- a/libbb/find_mount_point.c +++ b/libbb/find_mount_point.c | |||
@@ -32,7 +32,7 @@ | |||
32 | * Given any other file (or directory), find the mount table entry for its | 32 | * Given any other file (or directory), find the mount table entry for its |
33 | * filesystem. | 33 | * filesystem. |
34 | */ | 34 | */ |
35 | extern struct mntent *find_mount_point(const char *name, const char *table) | 35 | struct mntent *find_mount_point(const char *name, const char *table) |
36 | { | 36 | { |
37 | struct stat s; | 37 | struct stat s; |
38 | dev_t mountDevice; | 38 | dev_t mountDevice; |
diff --git a/libbb/find_pid_by_name.c b/libbb/find_pid_by_name.c index 24084a34f..833c96f51 100644 --- a/libbb/find_pid_by_name.c +++ b/libbb/find_pid_by_name.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * Returns a list of all matching PIDs | 23 | * Returns a list of all matching PIDs |
24 | * It is the caller's duty to free the returned pidlist. | 24 | * It is the caller's duty to free the returned pidlist. |
25 | */ | 25 | */ |
26 | extern long* find_pid_by_name( const char* pidName) | 26 | long* find_pid_by_name( const char* pidName) |
27 | { | 27 | { |
28 | long* pidList; | 28 | long* pidList; |
29 | int i=0; | 29 | int i=0; |
@@ -42,7 +42,7 @@ extern long* find_pid_by_name( const char* pidName) | |||
42 | return pidList; | 42 | return pidList; |
43 | } | 43 | } |
44 | 44 | ||
45 | extern long *pidlist_reverse(long *pidList) | 45 | long *pidlist_reverse(long *pidList) |
46 | { | 46 | { |
47 | int i=0; | 47 | int i=0; |
48 | while (pidList[i] > 0 && ++i); | 48 | while (pidList[i] > 0 && ++i); |
diff --git a/libbb/find_root_device.c b/libbb/find_root_device.c index dfe0cfa7b..d1ffc87f5 100644 --- a/libbb/find_root_device.c +++ b/libbb/find_root_device.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <stdlib.h> | 26 | #include <stdlib.h> |
27 | #include "libbb.h" | 27 | #include "libbb.h" |
28 | 28 | ||
29 | extern char *find_block_device(char *path) | 29 | char *find_block_device(char *path) |
30 | { | 30 | { |
31 | DIR *dir; | 31 | DIR *dir; |
32 | struct dirent *entry; | 32 | struct dirent *entry; |
diff --git a/libbb/get_line_from_file.c b/libbb/get_line_from_file.c index 5ad497ffa..44cf44869 100644 --- a/libbb/get_line_from_file.c +++ b/libbb/get_line_from_file.c | |||
@@ -45,14 +45,14 @@ char *bb_get_chunk_from_file(FILE *file, int *end) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | /* Get line, including trailing /n if any */ | 47 | /* Get line, including trailing /n if any */ |
48 | extern char *bb_get_line_from_file(FILE *file) | 48 | char *bb_get_line_from_file(FILE *file) |
49 | { | 49 | { |
50 | int i; | 50 | int i; |
51 | return bb_get_chunk_from_file(file, &i); | 51 | return bb_get_chunk_from_file(file, &i); |
52 | } | 52 | } |
53 | 53 | ||
54 | /* Get line. Remove trailing /n */ | 54 | /* Get line. Remove trailing /n */ |
55 | extern char *bb_get_chomped_line_from_file(FILE *file) | 55 | char *bb_get_chomped_line_from_file(FILE *file) |
56 | { | 56 | { |
57 | int i; | 57 | int i; |
58 | char *c=bb_get_chunk_from_file(file, &i); | 58 | char *c=bb_get_chunk_from_file(file, &i); |
diff --git a/libbb/herror_msg.c b/libbb/herror_msg.c index 87ec15acc..d0d0a15d2 100644 --- a/libbb/herror_msg.c +++ b/libbb/herror_msg.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #include "libbb.h" | 25 | #include "libbb.h" |
26 | 26 | ||
27 | extern void bb_herror_msg(const char *s, ...) | 27 | void bb_herror_msg(const char *s, ...) |
28 | { | 28 | { |
29 | va_list p; | 29 | va_list p; |
30 | 30 | ||
diff --git a/libbb/herror_msg_and_die.c b/libbb/herror_msg_and_die.c index 5c765f1be..9a76ef7e1 100644 --- a/libbb/herror_msg_and_die.c +++ b/libbb/herror_msg_and_die.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | #include "libbb.h" | 25 | #include "libbb.h" |
26 | 26 | ||
27 | extern void bb_herror_msg_and_die(const char *s, ...) | 27 | void bb_herror_msg_and_die(const char *s, ...) |
28 | { | 28 | { |
29 | va_list p; | 29 | va_list p; |
30 | 30 | ||
diff --git a/libbb/kernel_version.c b/libbb/kernel_version.c index e01aafa25..5f5d36df2 100644 --- a/libbb/kernel_version.c +++ b/libbb/kernel_version.c | |||
@@ -30,7 +30,7 @@ | |||
30 | * so, for example, to check if the kernel is greater than 2.2.11: | 30 | * so, for example, to check if the kernel is greater than 2.2.11: |
31 | * if (get_kernel_revision() <= 2*65536+2*256+11) { <stuff> } | 31 | * if (get_kernel_revision() <= 2*65536+2*256+11) { <stuff> } |
32 | */ | 32 | */ |
33 | extern int get_kernel_revision(void) | 33 | int get_kernel_revision(void) |
34 | { | 34 | { |
35 | struct utsname name; | 35 | struct utsname name; |
36 | char *s; | 36 | char *s; |
diff --git a/libbb/llist.c b/libbb/llist.c index ce7daddee..af0a9948c 100644 --- a/libbb/llist.c +++ b/libbb/llist.c | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #ifdef L_llist_add_to | 14 | #ifdef L_llist_add_to |
15 | /* Add data to the start of the linked list. */ | 15 | /* Add data to the start of the linked list. */ |
16 | extern llist_t *llist_add_to(llist_t *old_head, char *new_item) | 16 | llist_t *llist_add_to(llist_t *old_head, char *new_item) |
17 | { | 17 | { |
18 | llist_t *new_head; | 18 | llist_t *new_head; |
19 | 19 | ||
@@ -27,7 +27,7 @@ extern llist_t *llist_add_to(llist_t *old_head, char *new_item) | |||
27 | 27 | ||
28 | #ifdef L_llist_add_to_end | 28 | #ifdef L_llist_add_to_end |
29 | /* Add data to the end of the linked list. */ | 29 | /* Add data to the end of the linked list. */ |
30 | extern llist_t *llist_add_to_end(llist_t *list_head, char *data) | 30 | llist_t *llist_add_to_end(llist_t *list_head, char *data) |
31 | { | 31 | { |
32 | llist_t *new_item; | 32 | llist_t *new_item; |
33 | 33 | ||
@@ -50,7 +50,7 @@ extern llist_t *llist_add_to_end(llist_t *list_head, char *data) | |||
50 | #ifdef L_llist_free_one | 50 | #ifdef L_llist_free_one |
51 | /* Free the current list element and advance to the next entry in the list. | 51 | /* Free the current list element and advance to the next entry in the list. |
52 | * Returns a pointer to the next element. */ | 52 | * Returns a pointer to the next element. */ |
53 | extern llist_t *llist_free_one(llist_t *elm) | 53 | llist_t *llist_free_one(llist_t *elm) |
54 | { | 54 | { |
55 | llist_t *next = elm ? elm->link : NULL; | 55 | llist_t *next = elm ? elm->link : NULL; |
56 | #if ENABLE_DMALLOC /* avoid warnings from dmalloc's error-free-null option */ | 56 | #if ENABLE_DMALLOC /* avoid warnings from dmalloc's error-free-null option */ |
@@ -64,7 +64,7 @@ extern llist_t *llist_free_one(llist_t *elm) | |||
64 | 64 | ||
65 | #ifdef L_llist_free | 65 | #ifdef L_llist_free |
66 | /* Recursively free all elements in the linked list. */ | 66 | /* Recursively free all elements in the linked list. */ |
67 | extern void llist_free(llist_t *elm) | 67 | void llist_free(llist_t *elm) |
68 | { | 68 | { |
69 | while ((elm = llist_free_one(elm))); | 69 | while ((elm = llist_free_one(elm))); |
70 | } | 70 | } |
diff --git a/libbb/obscure.c b/libbb/obscure.c index 4d159a771..6244970de 100644 --- a/libbb/obscure.c +++ b/libbb/obscure.c | |||
@@ -244,7 +244,7 @@ obscure_msg(const char *old, const char *newval, const struct passwd *pwdp) | |||
244 | * check passwords. | 244 | * check passwords. |
245 | */ | 245 | */ |
246 | 246 | ||
247 | extern int obscure(const char *old, const char *newval, const struct passwd *pwdp) | 247 | int obscure(const char *old, const char *newval, const struct passwd *pwdp) |
248 | { | 248 | { |
249 | const char *msg = obscure_msg(old, newval, pwdp); | 249 | const char *msg = obscure_msg(old, newval, pwdp); |
250 | 250 | ||
diff --git a/libbb/parse_mode.c b/libbb/parse_mode.c index 185957bc3..ffbf4e1d4 100644 --- a/libbb/parse_mode.c +++ b/libbb/parse_mode.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | #define FILEMODEBITS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) | 30 | #define FILEMODEBITS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) |
31 | 31 | ||
32 | extern int bb_parse_mode(const char *s, mode_t *current_mode) | 32 | int bb_parse_mode(const char *s, mode_t *current_mode) |
33 | { | 33 | { |
34 | static const mode_t who_mask[] = { | 34 | static const mode_t who_mask[] = { |
35 | S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO, /* a */ | 35 | S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO, /* a */ |
diff --git a/libbb/perror_msg.c b/libbb/perror_msg.c index 8ba053188..a0fdabc1d 100644 --- a/libbb/perror_msg.c +++ b/libbb/perror_msg.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include "libbb.h" | 26 | #include "libbb.h" |
27 | 27 | ||
28 | extern void bb_perror_msg(const char *s, ...) | 28 | void bb_perror_msg(const char *s, ...) |
29 | { | 29 | { |
30 | va_list p; | 30 | va_list p; |
31 | 31 | ||
diff --git a/libbb/perror_msg_and_die.c b/libbb/perror_msg_and_die.c index 15bf0421e..4a26dcce8 100644 --- a/libbb/perror_msg_and_die.c +++ b/libbb/perror_msg_and_die.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include "libbb.h" | 26 | #include "libbb.h" |
27 | 27 | ||
28 | extern void bb_perror_msg_and_die(const char *s, ...) | 28 | void bb_perror_msg_and_die(const char *s, ...) |
29 | { | 29 | { |
30 | va_list p; | 30 | va_list p; |
31 | 31 | ||
diff --git a/libbb/perror_nomsg.c b/libbb/perror_nomsg.c index 464cb86c4..479b2ba93 100644 --- a/libbb/perror_nomsg.c +++ b/libbb/perror_nomsg.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <stddef.h> | 23 | #include <stddef.h> |
24 | #include <libbb.h> | 24 | #include <libbb.h> |
25 | 25 | ||
26 | extern void bb_perror_nomsg(void) | 26 | void bb_perror_nomsg(void) |
27 | { | 27 | { |
28 | /* Ignore the gcc warning about a null format string. */ | 28 | /* Ignore the gcc warning about a null format string. */ |
29 | bb_perror_msg(NULL); | 29 | bb_perror_msg(NULL); |
diff --git a/libbb/perror_nomsg_and_die.c b/libbb/perror_nomsg_and_die.c index bab228455..7cbe35e3a 100644 --- a/libbb/perror_nomsg_and_die.c +++ b/libbb/perror_nomsg_and_die.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <stddef.h> | 23 | #include <stddef.h> |
24 | #include "libbb.h" | 24 | #include "libbb.h" |
25 | 25 | ||
26 | extern void bb_perror_nomsg_and_die(void) | 26 | void bb_perror_nomsg_and_die(void) |
27 | { | 27 | { |
28 | /* Ignore the gcc warning about a null format string. */ | 28 | /* Ignore the gcc warning about a null format string. */ |
29 | bb_perror_msg_and_die(NULL); | 29 | bb_perror_msg_and_die(NULL); |
diff --git a/libbb/print_file.c b/libbb/print_file.c index 963db1416..26bd0d458 100644 --- a/libbb/print_file.c +++ b/libbb/print_file.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <unistd.h> | 24 | #include <unistd.h> |
25 | #include "libbb.h" | 25 | #include "libbb.h" |
26 | 26 | ||
27 | extern void bb_xprint_and_close_file(FILE *file) | 27 | void bb_xprint_and_close_file(FILE *file) |
28 | { | 28 | { |
29 | bb_xfflush_stdout(); | 29 | bb_xfflush_stdout(); |
30 | /* Note: Do not use STDOUT_FILENO here, as this is a lib routine | 30 | /* Note: Do not use STDOUT_FILENO here, as this is a lib routine |
@@ -45,7 +45,7 @@ extern void bb_xprint_and_close_file(FILE *file) | |||
45 | * exits with default error code if an error occurs | 45 | * exits with default error code if an error occurs |
46 | */ | 46 | */ |
47 | 47 | ||
48 | extern int bb_xprint_file_by_name(const char *filename) | 48 | int bb_xprint_file_by_name(const char *filename) |
49 | { | 49 | { |
50 | FILE *f; | 50 | FILE *f; |
51 | 51 | ||
diff --git a/libbb/printf.c b/libbb/printf.c index 2cba31792..e61723242 100644 --- a/libbb/printf.c +++ b/libbb/printf.c | |||
@@ -145,7 +145,7 @@ extern int bb_vfprintf(FILE * __restrict stream, | |||
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | #ifdef L_bb_vprintf | 147 | #ifdef L_bb_vprintf |
148 | extern int bb_vprintf(const char * __restrict format, va_list arg) | 148 | int bb_vprintf(const char * __restrict format, va_list arg) |
149 | { | 149 | { |
150 | return bb_vfprintf(stdout, format, arg); | 150 | return bb_vfprintf(stdout, format, arg); |
151 | } | 151 | } |
@@ -167,7 +167,7 @@ extern int bb_fprintf(FILE * __restrict stream, | |||
167 | #endif | 167 | #endif |
168 | 168 | ||
169 | #ifdef L_bb_printf | 169 | #ifdef L_bb_printf |
170 | extern int bb_printf(const char * __restrict format, ...) | 170 | int bb_printf(const char * __restrict format, ...) |
171 | { | 171 | { |
172 | va_list arg; | 172 | va_list arg; |
173 | int rv; | 173 | int rv; |
diff --git a/libbb/procps.c b/libbb/procps.c index 2ebe66e9d..e73c0dc64 100644 --- a/libbb/procps.c +++ b/libbb/procps.c | |||
@@ -34,7 +34,7 @@ static int read_to_buf(const char *filename, void *buf) | |||
34 | } | 34 | } |
35 | 35 | ||
36 | 36 | ||
37 | extern procps_status_t * procps_scan(int save_user_arg0) | 37 | procps_status_t * procps_scan(int save_user_arg0) |
38 | { | 38 | { |
39 | static DIR *dir; | 39 | static DIR *dir; |
40 | struct dirent *entry; | 40 | struct dirent *entry; |
diff --git a/libbb/pw_encrypt.c b/libbb/pw_encrypt.c index 727149d0c..a15339974 100644 --- a/libbb/pw_encrypt.c +++ b/libbb/pw_encrypt.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "libbb.h" | 25 | #include "libbb.h" |
26 | 26 | ||
27 | 27 | ||
28 | extern char *pw_encrypt(const char *clear, const char *salt) | 28 | char *pw_encrypt(const char *clear, const char *salt) |
29 | { | 29 | { |
30 | static char cipher[128]; | 30 | static char cipher[128]; |
31 | char *cp; | 31 | char *cp; |
diff --git a/libbb/remove_file.c b/libbb/remove_file.c index 8b45c58b8..ee1aaa5cd 100644 --- a/libbb/remove_file.c +++ b/libbb/remove_file.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <getopt.h> | 30 | #include <getopt.h> |
31 | #include "libbb.h" | 31 | #include "libbb.h" |
32 | 32 | ||
33 | extern int remove_file(const char *path, int flags) | 33 | int remove_file(const char *path, int flags) |
34 | { | 34 | { |
35 | struct stat path_stat; | 35 | struct stat path_stat; |
36 | int path_exists = 1; | 36 | int path_exists = 1; |
diff --git a/libbb/run_parts.c b/libbb/run_parts.c index 4c8841fe5..7f5fe459b 100644 --- a/libbb/run_parts.c +++ b/libbb/run_parts.c | |||
@@ -47,7 +47,7 @@ static int valid_name(const struct dirent *d) | |||
47 | * test_mode = 2 means to fail silently on missing directories | 47 | * test_mode = 2 means to fail silently on missing directories |
48 | */ | 48 | */ |
49 | 49 | ||
50 | extern int run_parts(char **args, const unsigned char test_mode, char **env) | 50 | int run_parts(char **args, const unsigned char test_mode, char **env) |
51 | { | 51 | { |
52 | struct dirent **namelist = 0; | 52 | struct dirent **namelist = 0; |
53 | struct stat st; | 53 | struct stat st; |
diff --git a/libbb/safe_strncpy.c b/libbb/safe_strncpy.c index 2016e6b52..d4275698c 100644 --- a/libbb/safe_strncpy.c +++ b/libbb/safe_strncpy.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | 26 | ||
27 | /* Like strncpy but make sure the resulting string is always 0 terminated. */ | 27 | /* Like strncpy but make sure the resulting string is always 0 terminated. */ |
28 | extern char * safe_strncpy(char *dst, const char *src, size_t size) | 28 | char * safe_strncpy(char *dst, const char *src, size_t size) |
29 | { | 29 | { |
30 | dst[size-1] = '\0'; | 30 | dst[size-1] = '\0'; |
31 | return strncpy(dst, src, size-1); | 31 | return strncpy(dst, src, size-1); |
diff --git a/libbb/skip_whitespace.c b/libbb/skip_whitespace.c index bf049a2d2..fd5d72540 100644 --- a/libbb/skip_whitespace.c +++ b/libbb/skip_whitespace.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <ctype.h> | 23 | #include <ctype.h> |
24 | #include "libbb.h" | 24 | #include "libbb.h" |
25 | 25 | ||
26 | extern const char *bb_skip_whitespace(const char *s) | 26 | const char *bb_skip_whitespace(const char *s) |
27 | { | 27 | { |
28 | while (isspace(*s)) { | 28 | while (isspace(*s)) { |
29 | ++s; | 29 | ++s; |
diff --git a/libbb/vdprintf.c b/libbb/vdprintf.c index 53fdbd37a..96c71ea63 100644 --- a/libbb/vdprintf.c +++ b/libbb/vdprintf.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | 27 | ||
28 | #if (__GLIBC__ < 2) | 28 | #if (__GLIBC__ < 2) |
29 | extern int vdprintf(int d, const char *format, va_list ap) | 29 | int vdprintf(int d, const char *format, va_list ap) |
30 | { | 30 | { |
31 | char buf[BUF_SIZE]; | 31 | char buf[BUF_SIZE]; |
32 | int len; | 32 | int len; |
diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c index 07b37e4ad..d0fbb05c6 100644 --- a/libbb/verror_msg.c +++ b/libbb/verror_msg.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include "libbb.h" | 26 | #include "libbb.h" |
27 | 27 | ||
28 | extern void bb_verror_msg(const char *s, va_list p) | 28 | void bb_verror_msg(const char *s, va_list p) |
29 | { | 29 | { |
30 | fflush(stdout); | 30 | fflush(stdout); |
31 | fprintf(stderr, "%s: ", bb_applet_name); | 31 | fprintf(stderr, "%s: ", bb_applet_name); |
diff --git a/libbb/vherror_msg.c b/libbb/vherror_msg.c index 1560eb595..a5b1a7030 100644 --- a/libbb/vherror_msg.c +++ b/libbb/vherror_msg.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "libbb.h" | 26 | #include "libbb.h" |
27 | 27 | ||
28 | 28 | ||
29 | extern void bb_vherror_msg(const char *s, va_list p) | 29 | void bb_vherror_msg(const char *s, va_list p) |
30 | { | 30 | { |
31 | if(s == 0) | 31 | if(s == 0) |
32 | s = ""; | 32 | s = ""; |
diff --git a/libbb/vperror_msg.c b/libbb/vperror_msg.c index 5c446967a..ed4ac83cd 100644 --- a/libbb/vperror_msg.c +++ b/libbb/vperror_msg.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include "libbb.h" | 26 | #include "libbb.h" |
27 | 27 | ||
28 | extern void bb_vperror_msg(const char *s, va_list p) | 28 | void bb_vperror_msg(const char *s, va_list p) |
29 | { | 29 | { |
30 | int err=errno; | 30 | int err=errno; |
31 | if(s == 0) s = ""; | 31 | if(s == 0) s = ""; |
diff --git a/libbb/warn_ignoring_args.c b/libbb/warn_ignoring_args.c index a1fa528f4..cc35fe26a 100644 --- a/libbb/warn_ignoring_args.c +++ b/libbb/warn_ignoring_args.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #include <libbb.h> | 23 | #include <libbb.h> |
24 | 24 | ||
25 | extern void bb_warn_ignoring_args(int n) | 25 | void bb_warn_ignoring_args(int n) |
26 | { | 26 | { |
27 | if (n) { | 27 | if (n) { |
28 | bb_perror_msg("ignoring all arguments"); | 28 | bb_perror_msg("ignoring all arguments"); |
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 6d54c1a79..4114090de 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #ifndef DMALLOC | 27 | #ifndef DMALLOC |
28 | #ifdef L_xmalloc | 28 | #ifdef L_xmalloc |
29 | extern void *xmalloc(size_t size) | 29 | void *xmalloc(size_t size) |
30 | { | 30 | { |
31 | void *ptr = malloc(size); | 31 | void *ptr = malloc(size); |
32 | if (ptr == NULL && size != 0) | 32 | if (ptr == NULL && size != 0) |
@@ -36,7 +36,7 @@ extern void *xmalloc(size_t size) | |||
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #ifdef L_xrealloc | 38 | #ifdef L_xrealloc |
39 | extern void *xrealloc(void *ptr, size_t size) | 39 | void *xrealloc(void *ptr, size_t size) |
40 | { | 40 | { |
41 | ptr = realloc(ptr, size); | 41 | ptr = realloc(ptr, size); |
42 | if (ptr == NULL && size != 0) | 42 | if (ptr == NULL && size != 0) |
@@ -46,7 +46,7 @@ extern void *xrealloc(void *ptr, size_t size) | |||
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #ifdef L_xcalloc | 48 | #ifdef L_xcalloc |
49 | extern void *xcalloc(size_t nmemb, size_t size) | 49 | void *xcalloc(size_t nmemb, size_t size) |
50 | { | 50 | { |
51 | void *ptr = calloc(nmemb, size); | 51 | void *ptr = calloc(nmemb, size); |
52 | if (ptr == NULL && nmemb != 0 && size != 0) | 52 | if (ptr == NULL && nmemb != 0 && size != 0) |
@@ -96,7 +96,7 @@ FILE *bb_xfopen(const char *path, const char *mode) | |||
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | #ifdef L_xopen | 98 | #ifdef L_xopen |
99 | extern int bb_xopen(const char *pathname, int flags) | 99 | int bb_xopen(const char *pathname, int flags) |
100 | { | 100 | { |
101 | int ret; | 101 | int ret; |
102 | 102 | ||
@@ -109,7 +109,7 @@ extern int bb_xopen(const char *pathname, int flags) | |||
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | #ifdef L_xread | 111 | #ifdef L_xread |
112 | extern ssize_t bb_xread(int fd, void *buf, size_t count) | 112 | ssize_t bb_xread(int fd, void *buf, size_t count) |
113 | { | 113 | { |
114 | ssize_t size; | 114 | ssize_t size; |
115 | 115 | ||
@@ -122,7 +122,7 @@ extern ssize_t bb_xread(int fd, void *buf, size_t count) | |||
122 | #endif | 122 | #endif |
123 | 123 | ||
124 | #ifdef L_xread_all | 124 | #ifdef L_xread_all |
125 | extern void bb_xread_all(int fd, void *buf, size_t count) | 125 | void bb_xread_all(int fd, void *buf, size_t count) |
126 | { | 126 | { |
127 | ssize_t size; | 127 | ssize_t size; |
128 | 128 | ||
@@ -138,7 +138,7 @@ extern void bb_xread_all(int fd, void *buf, size_t count) | |||
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | #ifdef L_xread_char | 140 | #ifdef L_xread_char |
141 | extern unsigned char bb_xread_char(int fd) | 141 | unsigned char bb_xread_char(int fd) |
142 | { | 142 | { |
143 | char tmp; | 143 | char tmp; |
144 | 144 | ||
@@ -149,7 +149,7 @@ extern unsigned char bb_xread_char(int fd) | |||
149 | #endif | 149 | #endif |
150 | 150 | ||
151 | #ifdef L_xferror | 151 | #ifdef L_xferror |
152 | extern void bb_xferror(FILE *fp, const char *fn) | 152 | void bb_xferror(FILE *fp, const char *fn) |
153 | { | 153 | { |
154 | if (ferror(fp)) { | 154 | if (ferror(fp)) { |
155 | bb_error_msg_and_die("%s", fn); | 155 | bb_error_msg_and_die("%s", fn); |
@@ -158,14 +158,14 @@ extern void bb_xferror(FILE *fp, const char *fn) | |||
158 | #endif | 158 | #endif |
159 | 159 | ||
160 | #ifdef L_xferror_stdout | 160 | #ifdef L_xferror_stdout |
161 | extern void bb_xferror_stdout(void) | 161 | void bb_xferror_stdout(void) |
162 | { | 162 | { |
163 | bb_xferror(stdout, bb_msg_standard_output); | 163 | bb_xferror(stdout, bb_msg_standard_output); |
164 | } | 164 | } |
165 | #endif | 165 | #endif |
166 | 166 | ||
167 | #ifdef L_xfflush_stdout | 167 | #ifdef L_xfflush_stdout |
168 | extern void bb_xfflush_stdout(void) | 168 | void bb_xfflush_stdout(void) |
169 | { | 169 | { |
170 | if (fflush(stdout)) { | 170 | if (fflush(stdout)) { |
171 | bb_perror_msg_and_die(bb_msg_standard_output); | 171 | bb_perror_msg_and_die(bb_msg_standard_output); |
diff --git a/libbb/xgetlarg.c b/libbb/xgetlarg.c index f332bb37e..6d3c4d1db 100644 --- a/libbb/xgetlarg.c +++ b/libbb/xgetlarg.c | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #include "busybox.h" | 14 | #include "busybox.h" |
15 | 15 | ||
16 | extern long bb_xgetlarg(const char *arg, int base, long lower, long upper) | 16 | long bb_xgetlarg(const char *arg, int base, long lower, long upper) |
17 | { | 17 | { |
18 | long result; | 18 | long result; |
19 | char *endptr; | 19 | char *endptr; |
diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c index b3e3eda2b..1bc166bbc 100644 --- a/libbb/xreadlink.c +++ b/libbb/xreadlink.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <unistd.h> | 13 | #include <unistd.h> |
14 | #include "libbb.h" | 14 | #include "libbb.h" |
15 | 15 | ||
16 | extern char *xreadlink(const char *path) | 16 | char *xreadlink(const char *path) |
17 | { | 17 | { |
18 | static const int GROWBY = 80; /* how large we will grow strings by */ | 18 | static const int GROWBY = 80; /* how large we will grow strings by */ |
19 | 19 | ||