aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/basename.c2
-rw-r--r--coreutils/cat.c2
-rw-r--r--coreutils/chroot.c2
-rw-r--r--coreutils/cmp.c2
-rw-r--r--coreutils/date.c10
-rw-r--r--coreutils/dd.c4
-rw-r--r--coreutils/df.c2
-rw-r--r--coreutils/dirname.c3
-rw-r--r--coreutils/dos2unix.c2
-rw-r--r--coreutils/du.c12
-rw-r--r--coreutils/echo.c2
-rw-r--r--coreutils/expr.c2
-rw-r--r--coreutils/head.c2
-rw-r--r--coreutils/hostid.c2
-rw-r--r--coreutils/length.c2
-rw-r--r--coreutils/ln.c10
-rw-r--r--coreutils/logname.c2
-rw-r--r--coreutils/ls.c2
-rw-r--r--coreutils/md5sum.c2
-rw-r--r--coreutils/mkdir.c8
-rw-r--r--coreutils/mkfifo.c2
-rw-r--r--coreutils/mknod.c4
-rw-r--r--coreutils/printf.c2
-rw-r--r--coreutils/pwd.c2
-rw-r--r--coreutils/rm.c2
-rw-r--r--coreutils/rmdir.c2
-rw-r--r--coreutils/sleep.c2
-rw-r--r--coreutils/sort.c2
-rw-r--r--coreutils/stty.c2
-rw-r--r--coreutils/sync.c2
-rw-r--r--coreutils/tail.c2
-rw-r--r--coreutils/test.c2
-rw-r--r--coreutils/touch.c2
-rw-r--r--coreutils/tr.c2
-rw-r--r--coreutils/tty.c2
-rw-r--r--coreutils/uname.c2
-rw-r--r--coreutils/uniq.c2
-rw-r--r--coreutils/usleep.c2
-rw-r--r--coreutils/uudecode.c2
-rw-r--r--coreutils/uuencode.c2
-rw-r--r--coreutils/wc.c2
-rw-r--r--coreutils/whoami.c2
-rw-r--r--coreutils/yes.c2
43 files changed, 62 insertions, 61 deletions
diff --git a/coreutils/basename.c b/coreutils/basename.c
index da59a8672..da0b7ecc3 100644
--- a/coreutils/basename.c
+++ b/coreutils/basename.c
@@ -21,8 +21,8 @@
*
*/
-#include "busybox.h"
#include <stdlib.h>
+#include "busybox.h"
#include <string.h>
extern int basename_main(int argc, char **argv)
diff --git a/coreutils/cat.c b/coreutils/cat.c
index 134245cdc..3554008f8 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -21,8 +21,8 @@
*
*/
-#include "busybox.h"
#include <stdlib.h>
+#include "busybox.h"
extern int cat_main(int argc, char **argv)
{
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index e721e1ffa..bae9cd757 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -22,11 +22,11 @@
*
*/
-#include "busybox.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
+#include "busybox.h"
int chroot_main(int argc, char **argv)
{
diff --git a/coreutils/cmp.c b/coreutils/cmp.c
index c04b6e1c9..24b6c3f92 100644
--- a/coreutils/cmp.c
+++ b/coreutils/cmp.c
@@ -22,11 +22,11 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
+#include "busybox.h"
int cmp_main(int argc, char **argv)
{
diff --git a/coreutils/date.c b/coreutils/date.c
index 21d31bb25..878331f71 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -20,11 +20,6 @@
*
*/
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_invalid_date
-#define bb_need_memory_exhausted
-#include "messages.c"
#include <stdlib.h>
#include <errno.h>
#include <sys/time.h>
@@ -33,6 +28,11 @@
#include <stdio.h>
#include <string.h>
#include <getopt.h>
+#include "busybox.h"
+#define BB_DECLARE_EXTERN
+#define bb_need_invalid_date
+#define bb_need_memory_exhausted
+#include "messages.c"
/* This 'date' command supports only 2 time setting formats,
diff --git a/coreutils/dd.c b/coreutils/dd.c
index e445e0435..1618dd102 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -21,14 +21,14 @@
*
*/
-#include "busybox.h"
-
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
+#include "busybox.h"
+
static const struct suffix_mult dd_suffixes[] = {
{ "c", 1 },
diff --git a/coreutils/df.c b/coreutils/df.c
index 692205a0e..ebee4d607 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -22,12 +22,12 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <stdlib.h>
#include <mntent.h>
#include <sys/vfs.h>
#include <getopt.h>
+#include "busybox.h"
extern const char mtab_file[]; /* Defined in utility.c */
#ifdef BB_FEATURE_HUMAN_READABLE
diff --git a/coreutils/dirname.c b/coreutils/dirname.c
index e34ecf8a9..7f191c1b9 100644
--- a/coreutils/dirname.c
+++ b/coreutils/dirname.c
@@ -20,10 +20,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-#include "busybox.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "busybox.h"
extern int dirname_main(int argc, char **argv)
{
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index 32423611c..222c8f6a4 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -22,9 +22,9 @@
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "busybox.h"
#include <stdio.h>
#include <stdlib.h>
+#include "busybox.h"
int dos2unix_main( int argc, char **argv ) {
int c;
diff --git a/coreutils/du.c b/coreutils/du.c
index 516f4c92b..6197b0bc1 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -22,11 +22,6 @@
*
*/
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_name_too_long
-#include "messages.c"
-
#include <sys/types.h>
#include <fcntl.h>
#include <dirent.h>
@@ -34,6 +29,11 @@
#include <stdlib.h>
#include <getopt.h>
#include <errno.h>
+#include "busybox.h"
+#define BB_DECLARE_EXTERN
+#define bb_need_name_too_long
+#include "messages.c"
+
#ifdef BB_FEATURE_HUMAN_READABLE
unsigned long du_disp_hr = KILOBYTE;
@@ -187,7 +187,7 @@ int du_main(int argc, char **argv)
return status;
}
-/* $Id: du.c,v 1.37 2001/02/14 21:23:05 andersen Exp $ */
+/* $Id: du.c,v 1.38 2001/02/20 06:14:07 andersen Exp $ */
/*
Local Variables:
c-file-style: "linux"
diff --git a/coreutils/echo.c b/coreutils/echo.c
index b3e01afec..e9bc50a15 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -22,10 +22,10 @@
* Original copyright notice is retained at the end of this file.
*/
-#include "busybox.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include "busybox.h"
extern int
echo_main(int argc, char** argv)
diff --git a/coreutils/expr.c b/coreutils/expr.c
index 8ef5293c1..3b454bd3a 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -33,12 +33,12 @@
* One function can handle multiple operators all of equal precedence,
* provided they all associate ((x op x) op x). */
-#include "busybox.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <regex.h>
#include <sys/types.h>
+#include "busybox.h"
/* The kinds of value we can have. */
diff --git a/coreutils/head.c b/coreutils/head.c
index a2d774437..c683ec78a 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -22,11 +22,11 @@
*
*/
-#include "busybox.h"
#include <errno.h>
#include <stdio.h>
#include <getopt.h>
#include <stdlib.h>
+#include "busybox.h"
int head(int len, FILE *fp)
{
diff --git a/coreutils/hostid.c b/coreutils/hostid.c
index eed1a50ec..68a2cc659 100644
--- a/coreutils/hostid.c
+++ b/coreutils/hostid.c
@@ -20,10 +20,10 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include "busybox.h"
extern int hostid_main(int argc, char **argv)
{
diff --git a/coreutils/length.c b/coreutils/length.c
index 9119adca8..73becd28a 100644
--- a/coreutils/length.c
+++ b/coreutils/length.c
@@ -1,8 +1,8 @@
/* vi: set sw=4 ts=4: */
-#include "busybox.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include "busybox.h"
extern int length_main(int argc, char **argv)
{
diff --git a/coreutils/ln.c b/coreutils/ln.c
index e35bf7a03..6d41cce62 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -21,17 +21,17 @@
*
*/
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_not_a_directory
-#include "messages.c"
-
#include <stdio.h>
#include <dirent.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
+#include "busybox.h"
+#define BB_DECLARE_EXTERN
+#define bb_need_not_a_directory
+#include "messages.c"
+
static const int LN_SYMLINK = 1;
static const int LN_FORCE = 2;
diff --git a/coreutils/logname.c b/coreutils/logname.c
index a1887aaf9..0924b2471 100644
--- a/coreutils/logname.c
+++ b/coreutils/logname.c
@@ -20,10 +20,10 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include "busybox.h"
extern int logname_main(int argc, char **argv)
{
diff --git a/coreutils/ls.c b/coreutils/ls.c
index dd38dd5f3..a619bb8b2 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -50,7 +50,6 @@ enum {
/************************************************************************/
-#include "busybox.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
@@ -67,6 +66,7 @@ enum {
#include <fcntl.h>
#include <signal.h>
#include <sys/ioctl.h>
+#include "busybox.h"
#ifndef MAJOR
#define MAJOR(dev) (((dev)>>8)&0xff)
diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c
index 3decafdf4..fa11ee61d 100644
--- a/coreutils/md5sum.c
+++ b/coreutils/md5sum.c
@@ -20,11 +20,11 @@
/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu> */
/* Hacked to work with BusyBox by Alfred M. Szmidt <ams@trillian.itslinux.org> */
-#include "busybox.h"
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <getopt.h>
+#include "busybox.h"
/* For some silly reason, this file uses backwards TRUE and FALSE conventions */
#undef TRUE
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index 285d34f12..902da7c99 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -21,15 +21,15 @@
*
*/
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
#include "busybox.h"
#define bb_need_name_too_long
#define BB_DECLARE_EXTERN
#include "messages.c"
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
static int parentFlag = FALSE;
static mode_t mode = 0777;
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c
index 56a04f772..ca217fa23 100644
--- a/coreutils/mkfifo.c
+++ b/coreutils/mkfifo.c
@@ -20,11 +20,11 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <sys/types.h>
#include <errno.h>
#include <stdlib.h>
+#include "busybox.h"
extern int mkfifo_main(int argc, char **argv)
{
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index 73f6e06f1..b4d4b82a1 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -20,14 +20,14 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <errno.h>
-#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
+#include <sys/types.h>
+#include "busybox.h"
int mknod_main(int argc, char **argv)
{
diff --git a/coreutils/printf.c b/coreutils/printf.c
index 26a200e85..003423d56 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -47,7 +47,6 @@
// 19990508 Busy Boxed! Dave Cinege
-#include "busybox.h"
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
@@ -56,6 +55,7 @@
#include <stdlib.h>
#include <fcntl.h>
#include <ctype.h>
+#include "busybox.h"
#ifndef S_IFMT
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index a9acbc721..a7a5f78a1 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -21,12 +21,12 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <dirent.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
+#include "busybox.h"
extern int pwd_main(int argc, char **argv)
{
diff --git a/coreutils/rm.c b/coreutils/rm.c
index 566076707..a84163272 100644
--- a/coreutils/rm.c
+++ b/coreutils/rm.c
@@ -22,7 +22,6 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <time.h>
#include <utime.h>
@@ -30,6 +29,7 @@
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
+#include "busybox.h"
static int recursiveFlag = FALSE;
static int forceFlag = FALSE;
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c
index 6266ce1ef..2c280376f 100644
--- a/coreutils/rmdir.c
+++ b/coreutils/rmdir.c
@@ -22,11 +22,11 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
+#include "busybox.h"
extern int rmdir_main(int argc, char **argv)
{
diff --git a/coreutils/sleep.c b/coreutils/sleep.c
index d21af19b3..3bcab88ee 100644
--- a/coreutils/sleep.c
+++ b/coreutils/sleep.c
@@ -21,10 +21,10 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
+#include "busybox.h"
extern int sleep_main(int argc, char **argv)
{
diff --git a/coreutils/sort.c b/coreutils/sort.c
index 4984f5dfe..ed6872218 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -21,9 +21,9 @@
*
*/
-#include "busybox.h"
#include <getopt.h>
#include <stdlib.h>
+#include "busybox.h"
int compare_ascii(const void *x, const void *y)
{
diff --git a/coreutils/stty.c b/coreutils/stty.c
index 4a5aecf1d..10e28254d 100644
--- a/coreutils/stty.c
+++ b/coreutils/stty.c
@@ -28,7 +28,6 @@
*/
-#include "busybox.h"
#include <termios.h>
#include <sys/ioctl.h>
@@ -53,6 +52,7 @@
#include <limits.h>
#include <memory.h>
#include <fcntl.h>
+#include "busybox.h"
#define STREQ(a, b) (strcmp ((a), (b)) == 0)
diff --git a/coreutils/sync.c b/coreutils/sync.c
index 3d4686efa..ee22ae109 100644
--- a/coreutils/sync.c
+++ b/coreutils/sync.c
@@ -21,10 +21,10 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include "busybox.h"
extern int sync_main(int argc, char **argv)
{
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 778c2d18b..a85256c80 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -21,7 +21,6 @@
*
*/
-#include "busybox.h"
#include <fcntl.h>
#include <getopt.h>
@@ -29,6 +28,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
+#include "busybox.h"
static const struct suffix_mult tail_suffixes[] = {
{ "b", 512 },
diff --git a/coreutils/test.c b/coreutils/test.c
index 6439e3a8a..ab9c23e4b 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -31,13 +31,13 @@
* "This program is in the Public Domain."
*/
-#include "busybox.h"
#include <sys/types.h>
#include <unistd.h>
#include <ctype.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include "busybox.h"
#define BB_DECLARE_EXTERN
#define bb_need_help
#include "messages.c"
diff --git a/coreutils/touch.c b/coreutils/touch.c
index a3256d559..1718da71e 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -22,7 +22,6 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
@@ -30,6 +29,7 @@
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
+#include "busybox.h"
extern int touch_main(int argc, char **argv)
{
diff --git a/coreutils/tr.c b/coreutils/tr.c
index 92f399e14..b7a6009c8 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -24,12 +24,12 @@
* Original copyright notice is retained at the end of this file.
*/
-#include "busybox.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
+#include "busybox.h"
#define BB_DECLARE_EXTERN
#define bb_need_write_error
#include "messages.c"
diff --git a/coreutils/tty.c b/coreutils/tty.c
index d71d8dedb..4510c2996 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -20,11 +20,11 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
+#include "busybox.h"
extern int tty_main(int argc, char **argv)
{
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 899da7792..4931ff1d8 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -31,7 +31,6 @@
/* Busyboxed by Erik Andersen */
-#include "busybox.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -40,6 +39,7 @@
#if defined (HAVE_SYSINFO) && defined (HAVE_SYS_SYSTEMINFO_H)
# include <sys/systeminfo.h>
#endif
+#include "busybox.h"
static void print_element(unsigned int mask, char *element);
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index 84f1ed231..53e3c64f2 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -23,12 +23,12 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include <errno.h>
#include <stdlib.h>
+#include "busybox.h"
static int print_count;
static int print_uniq = 1;
diff --git a/coreutils/usleep.c b/coreutils/usleep.c
index c67c365b8..92e4437c5 100644
--- a/coreutils/usleep.c
+++ b/coreutils/usleep.c
@@ -21,9 +21,9 @@
*
*/
-#include "busybox.h"
#include <stdlib.h>
#include <unistd.h>
+#include "busybox.h"
extern int usleep_main(int argc, char **argv)
{
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index c0e8cea8c..6a3f78a42 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -22,13 +22,13 @@
*/
-#include "busybox.h"
#include <stdio.h>
#include <errno.h>
#include <getopt.h>
#include <string.h>
#include <stdlib.h>
+#include "busybox.h"
#include "pwd_grp/pwd.h"
#include "pwd_grp/grp.h"
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index 8d5af4a8a..41541defb 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -22,12 +22,12 @@
/* Hacked to work with BusyBox by Alfred M. Szmidt */
-#include "busybox.h"
#include <stdio.h>
#include <errno.h>
#include <getopt.h>
#include <stdlib.h>
+#include "busybox.h"
#define RW (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
diff --git a/coreutils/wc.c b/coreutils/wc.c
index f41687422..f2d33d6f3 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -20,10 +20,10 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <getopt.h>
#include <stdlib.h>
+#include "busybox.h"
static int total_lines, total_words, total_chars, max_length;
static int print_lines, print_words, print_chars, print_length;
diff --git a/coreutils/whoami.c b/coreutils/whoami.c
index 54df0bf12..0bbb54b7b 100644
--- a/coreutils/whoami.c
+++ b/coreutils/whoami.c
@@ -20,10 +20,10 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include "busybox.h"
extern int whoami_main(int argc, char **argv)
{
diff --git a/coreutils/yes.c b/coreutils/yes.c
index 0a8ad83a7..ad7b98f84 100644
--- a/coreutils/yes.c
+++ b/coreutils/yes.c
@@ -20,9 +20,9 @@
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <stdlib.h>
+#include "busybox.h"
extern int yes_main(int argc, char **argv)
{