diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-06-02 20:56:16 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-06-02 20:56:16 +0000 |
commit | e15d7573a1263fb364d1678c3a46be47a8b5e5ea (patch) | |
tree | 09e7b482b38ac571a01e936fb91df16dd1eeef42 /debianutils | |
parent | ecae66ac16338d8cddb55e1782ebd8c5f670ff53 (diff) | |
download | busybox-w32-e15d7573a1263fb364d1678c3a46be47a8b5e5ea.tar.gz busybox-w32-e15d7573a1263fb364d1678c3a46be47a8b5e5ea.tar.bz2 busybox-w32-e15d7573a1263fb364d1678c3a46be47a8b5e5ea.zip |
- move #include busybox.h to the very top so we pull in the config
and eventual platform specific includes in early.
Diffstat (limited to 'debianutils')
-rw-r--r-- | debianutils/mktemp.c | 2 | ||||
-rw-r--r-- | debianutils/pipe_progress.c | 29 | ||||
-rw-r--r-- | debianutils/readlink.c | 5 | ||||
-rw-r--r-- | debianutils/run_parts.c | 18 | ||||
-rw-r--r-- | debianutils/start_stop_daemon.c | 3 | ||||
-rw-r--r-- | debianutils/which.c | 2 |
6 files changed, 16 insertions, 43 deletions
diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c index 09c79f504..495a2ea3a 100644 --- a/debianutils/mktemp.c +++ b/debianutils/mktemp.c | |||
@@ -9,12 +9,12 @@ | |||
9 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | 9 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "busybox.h" | ||
12 | #include <stdio.h> | 13 | #include <stdio.h> |
13 | #include <errno.h> | 14 | #include <errno.h> |
14 | #include <string.h> | 15 | #include <string.h> |
15 | #include <unistd.h> | 16 | #include <unistd.h> |
16 | #include <stdlib.h> | 17 | #include <stdlib.h> |
17 | #include "busybox.h" | ||
18 | 18 | ||
19 | int mktemp_main(int argc, char **argv) | 19 | int mktemp_main(int argc, char **argv) |
20 | { | 20 | { |
diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c index 95db16783..75d26e20f 100644 --- a/debianutils/pipe_progress.c +++ b/debianutils/pipe_progress.c | |||
@@ -1,35 +1,22 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
1 | /* | 2 | /* |
2 | * Monitor a pipe with a simple progress display. | 3 | * Monitor a pipe with a simple progress display. |
3 | * | 4 | * |
4 | * Copyright (C) 2003 by Rob Landley <rob@landley.net>, Joey Hess | 5 | * Copyright (C) 2003 by Rob Landley <rob@landley.net>, Joey Hess |
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or modify | 7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | * | ||
20 | */ | 8 | */ |
21 | 9 | ||
10 | #include "busybox.h" | ||
22 | #include <stdio.h> | 11 | #include <stdio.h> |
23 | #include <stdlib.h> | 12 | #include <stdlib.h> |
24 | #include <unistd.h> | 13 | #include <unistd.h> |
25 | #include <time.h> | 14 | #include <time.h> |
26 | 15 | ||
27 | #include "busybox.h" | ||
28 | |||
29 | #define PIPE_PROGRESS_SIZE 4096 | 16 | #define PIPE_PROGRESS_SIZE 4096 |
30 | 17 | ||
31 | /* Read a block of data from stdin, write it to stdout. | 18 | /* Read a block of data from stdin, write it to stdout. |
32 | * Activity is indicated by a '.' to stderr | 19 | * Activity is indicated by a '.' to stderr |
33 | */ | 20 | */ |
34 | int pipe_progress_main(int argc, char **argv) | 21 | int pipe_progress_main(int argc, char **argv) |
35 | { | 22 | { |
@@ -48,8 +35,8 @@ int pipe_progress_main(int argc, char **argv) | |||
48 | 35 | ||
49 | fputc('\n', stderr); | 36 | fputc('\n', stderr); |
50 | 37 | ||
51 | #ifdef CONFIG_FEATURE_CLEAN_UP | 38 | if (ENABLE_FEATURE_CLEAN_UP) |
52 | RELEASE_CONFIG_BUFFER(buf); | 39 | RELEASE_CONFIG_BUFFER(buf); |
53 | #endif | 40 | |
54 | return 0; | 41 | return 0; |
55 | } | 42 | } |
diff --git a/debianutils/readlink.c b/debianutils/readlink.c index 79f0870ec..10fb01ebf 100644 --- a/debianutils/readlink.c +++ b/debianutils/readlink.c | |||
@@ -7,11 +7,11 @@ | |||
7 | * Licensed under GPL v2, see file LICENSE in this tarball for details. | 7 | * Licensed under GPL v2, see file LICENSE in this tarball for details. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "busybox.h" | ||
10 | #include <errno.h> | 11 | #include <errno.h> |
11 | #include <unistd.h> | 12 | #include <unistd.h> |
12 | #include <stdlib.h> | 13 | #include <stdlib.h> |
13 | #include <getopt.h> | 14 | #include <getopt.h> |
14 | #include "busybox.h" | ||
15 | 15 | ||
16 | #define READLINK_FLAG_f (1 << 0) | 16 | #define READLINK_FLAG_f (1 << 0) |
17 | 17 | ||
@@ -33,7 +33,8 @@ int readlink_main(int argc, char **argv) | |||
33 | return EXIT_FAILURE; | 33 | return EXIT_FAILURE; |
34 | puts(buf); | 34 | puts(buf); |
35 | 35 | ||
36 | if (ENABLE_FEATURE_CLEAN_UP && buf != bb_common_bufsiz1) free(buf); | 36 | if (ENABLE_FEATURE_CLEAN_UP && buf != bb_common_bufsiz1) |
37 | free(buf); | ||
37 | 38 | ||
38 | return EXIT_SUCCESS; | 39 | return EXIT_SUCCESS; |
39 | } | 40 | } |
diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index 862db7a05..c54e515fe 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c | |||
@@ -10,21 +10,7 @@ | |||
10 | * Copyright (C) 1996-1999 Guy Maor <maor@debian.org> | 10 | * Copyright (C) 1996-1999 Guy Maor <maor@debian.org> |
11 | * | 11 | * |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or modify | 13 | * Licensed under GPL v2, see file LICENSE in this tarball for details. |
14 | * it under the terms of the GNU General Public License as published by | ||
15 | * the Free Software Foundation; either version 2 of the License, or | ||
16 | * (at your option) any later version. | ||
17 | * | ||
18 | * This program is distributed in the hope that it will be useful, | ||
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | * General Public License for more details. | ||
22 | * | ||
23 | * You should have received a copy of the GNU General Public License | ||
24 | * along with this program; if not, write to the Free Software | ||
25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
26 | * 02111-1307 USA | ||
27 | * | ||
28 | */ | 14 | */ |
29 | 15 | ||
30 | /* This is my first attempt to write a program in C (well, this is my first | 16 | /* This is my first attempt to write a program in C (well, this is my first |
@@ -49,10 +35,10 @@ | |||
49 | * done - declare run_parts_main() as extern and any other function as static? | 35 | * done - declare run_parts_main() as extern and any other function as static? |
50 | */ | 36 | */ |
51 | 37 | ||
38 | #include "busybox.h" | ||
52 | #include <getopt.h> | 39 | #include <getopt.h> |
53 | #include <stdlib.h> | 40 | #include <stdlib.h> |
54 | 41 | ||
55 | #include "busybox.h" | ||
56 | 42 | ||
57 | static const struct option runparts_long_options[] = { | 43 | static const struct option runparts_long_options[] = { |
58 | { "test", 0, NULL, 't' }, | 44 | { "test", 0, NULL, 't' }, |
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index 5c596c40a..b83a75994 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Adapted for busybox David Kimdon <dwhedon@gordian.com> | 7 | * Adapted for busybox David Kimdon <dwhedon@gordian.com> |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "busybox.h" | ||
10 | #include <stdio.h> | 11 | #include <stdio.h> |
11 | #include <stdlib.h> | 12 | #include <stdlib.h> |
12 | #include <string.h> | 13 | #include <string.h> |
@@ -17,8 +18,6 @@ | |||
17 | #include <dirent.h> | 18 | #include <dirent.h> |
18 | #include <unistd.h> | 19 | #include <unistd.h> |
19 | #include <getopt.h> /* struct option */ | 20 | #include <getopt.h> /* struct option */ |
20 | |||
21 | #include "busybox.h" | ||
22 | #include "pwd_.h" | 21 | #include "pwd_.h" |
23 | 22 | ||
24 | static int signal_nr = 15; | 23 | static int signal_nr = 15; |
diff --git a/debianutils/which.c b/debianutils/which.c index 03b3c30f9..62cb1dc6d 100644 --- a/debianutils/which.c +++ b/debianutils/which.c | |||
@@ -9,12 +9,12 @@ | |||
9 | * Based on which from debianutils | 9 | * Based on which from debianutils |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "busybox.h" | ||
12 | #include <string.h> | 13 | #include <string.h> |
13 | #include <stdio.h> | 14 | #include <stdio.h> |
14 | #include <stdlib.h> | 15 | #include <stdlib.h> |
15 | #include <unistd.h> | 16 | #include <unistd.h> |
16 | #include <sys/stat.h> | 17 | #include <sys/stat.h> |
17 | #include "busybox.h" | ||
18 | 18 | ||
19 | int which_main(int argc, char **argv) | 19 | int which_main(int argc, char **argv) |
20 | { | 20 | { |