- move #include busybox.h to the very top so we pull in the config
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 2 Jun 2006 20:56:16 +0000 (20:56 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 2 Jun 2006 20:56:16 +0000 (20:56 -0000)
  and eventual platform specific includes in early.

34 files changed:
applets/applets.c
applets/busybox.c
applets/version.c
debianutils/mktemp.c
debianutils/pipe_progress.c
debianutils/readlink.c
debianutils/run_parts.c
debianutils/start_stop_daemon.c
debianutils/which.c
docs/new-applet-HOWTO.txt
findutils/find.c
findutils/grep.c
findutils/xargs.c
init/halt.c
init/init_shared.c
init/init_shared.h
init/mesg.c
procps/free.c
procps/fuser.c
procps/kill.c
procps/pidof.c
procps/ps.c
procps/renice.c
procps/sysctl.c
procps/top.c
procps/uptime.c
shell/ash.c
shell/cmdedit.c
shell/hush.c
shell/lash.c
shell/msh.c
sysklogd/klogd.c
sysklogd/logger.c
sysklogd/syslogd.c

index 1913676dcfd0ac6b8abf884bb376b4e1fedef1a3..aea116add254897338d32ae204b699528d00eeda 100644 (file)
  * Licensed under GPLv2 or later, see file License in this tarball for details.
  */
 
+#include "busybox.h"
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
-#include "busybox.h"
 
 #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE
 static const char usage_messages[] =
index 25bb36d9c007b0e2724bb4ab77db0631df30a515..a92ddbd0ea00e393feac1c9932d473b770c45291 100644 (file)
@@ -1,13 +1,15 @@
 /* vi: set sw=4 ts=4: */
 /*
+ * BusyBox' main applet dispatcher.
+ *
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
+#include "busybox.h"
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
 #include <stdlib.h>
-#include "busybox.h"
 #if ENABLE_LOCALE_SUPPORT
 #include <locale.h>
 #else
index 6f6ec24ffdcba3d5a54ce7cb9577b268343de282..ce75f1ff938820995c4ac50007f6be4fea8ee12a 100644 (file)
@@ -1,3 +1,10 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Version stuff.
+ *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ */
+
 #include "busybox.h"
 
 #ifndef BB_EXTRA_VERSION
index 09c79f504d8717b5ccac129aad0c6d6b337ca9da..495a2ea3af44b5ca17151a1b66af2e80b0cbd3e1 100644 (file)
@@ -9,12 +9,12 @@
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
 #include <unistd.h>
 #include <stdlib.h>
-#include "busybox.h"
 
 int mktemp_main(int argc, char **argv)
 {
index 95db16783ca906d53829e6e2fa2f0d5881691d10..75d26e20ffd40b3ddfacf820e63014629397c146 100644 (file)
@@ -1,35 +1,22 @@
+/* vi: set sw=4 ts=4: */
 /*
  * Monitor a pipe with a simple progress display.
  *
  * Copyright (C) 2003 by Rob Landley <rob@landley.net>, Joey Hess
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <time.h>
 
-#include "busybox.h"
-
 #define PIPE_PROGRESS_SIZE 4096
 
-/*     Read a block of data from stdin, write it to stdout.
- *  Activity is indicated by a '.' to stderr
+/* Read a block of data from stdin, write it to stdout.
+ * Activity is indicated by a '.' to stderr
  */
 int pipe_progress_main(int argc, char **argv)
 {
@@ -48,8 +35,8 @@ int pipe_progress_main(int argc, char **argv)
 
        fputc('\n', stderr);
 
-#ifdef CONFIG_FEATURE_CLEAN_UP
-       RELEASE_CONFIG_BUFFER(buf);
-#endif
+       if (ENABLE_FEATURE_CLEAN_UP)
+               RELEASE_CONFIG_BUFFER(buf);
+
        return 0;
 }
index 79f0870ec034bf110a3764b047eae9ccb7d248fa..10fb01ebf9840bcf73f557d7379611f84def0f5c 100644 (file)
@@ -7,11 +7,11 @@
  * Licensed under GPL v2, see file LICENSE in this tarball for details.
  */
 
+#include "busybox.h"
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <getopt.h>
-#include "busybox.h"
 
 #define READLINK_FLAG_f        (1 << 0)
 
@@ -33,7 +33,8 @@ int readlink_main(int argc, char **argv)
                return EXIT_FAILURE;
        puts(buf);
 
-       if (ENABLE_FEATURE_CLEAN_UP && buf != bb_common_bufsiz1) free(buf);
+       if (ENABLE_FEATURE_CLEAN_UP && buf != bb_common_bufsiz1)
+               free(buf);
 
        return EXIT_SUCCESS;
 }
index 862db7a0595d7aefe881c5a4134d9d8285863bec..c54e515feba1c3c1c4be540c360643c790988877 100644 (file)
  *   Copyright (C) 1996-1999 Guy Maor <maor@debian.org>
  *
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307 USA
- *
+ * Licensed under GPL v2, see file LICENSE in this tarball for details.
  */
 
 /* This is my first attempt to write a program in C (well, this is my first
  * done - declare run_parts_main() as extern and any other function as static?
  */
 
+#include "busybox.h"
 #include <getopt.h>
 #include <stdlib.h>
 
-#include "busybox.h"
 
 static const struct option runparts_long_options[] = {
        { "test",               0,              NULL,           't' },
index 5c596c40a003062f712285b2276911051b1da309..b83a75994932d3df1d4aecd6ed67800b567fb5ad 100644 (file)
@@ -7,6 +7,7 @@
  * Adapted for busybox David Kimdon <dwhedon@gordian.com>
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -17,8 +18,6 @@
 #include <dirent.h>
 #include <unistd.h>
 #include <getopt.h> /* struct option */
-
-#include "busybox.h"
 #include "pwd_.h"
 
 static int signal_nr = 15;
index 03b3c30f97c615edee2da6b8e016de3334b14358..62cb1dc6dc2a058c7cbd62972d154a77bbb0decc 100644 (file)
@@ -9,12 +9,12 @@
  * Based on which from debianutils
  */
 
+#include "busybox.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/stat.h>
-#include "busybox.h"
 
 int which_main(int argc, char **argv)
 {
index 2f5702bd62382fe3137069723929a2eabbe58ad3..7acc80bb2076dccd923d0854a742b5613a58d566 100644 (file)
@@ -16,6 +16,8 @@ such as who you stole the code from and so forth. Also include the mini-GPL
 boilerplate. Be sure to name the main function <applet>_main instead of main.
 And be sure to put it in <applet>.c. Usage does not have to be taken care of by
 your applet.
+Make sure to #include "busybox.h" as the first include file in your applet so
+the bb_config.h and appropriate platform specific files are included properly.
 
 For a new applet mu, here is the code that would go in mu.c:
 
@@ -25,13 +27,13 @@ For a new applet mu, here is the code that would go in mu.c:
 /*
  * Mini mu implementation for busybox
  *
- *
  * Copyright (C) [YEAR] by [YOUR NAME] <YOUR EMAIL>
  *
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
 #include "busybox.h"
+#include <other.h>
 
 int mu_main(int argc, char **argv)
 {
index 17a1a565661bc3c5cc76aa503f81175f30554588..f8bcccaf50f9ef034be47593c2631bf90f987dd6 100644 (file)
@@ -7,22 +7,10 @@
  * Reworked by David Douthitt <n9ubh@callsign.net> and
  *  Matt Kraai <kraai@alumni.carnegiemellon.edu>.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <dirent.h>
@@ -31,7 +19,6 @@
 #include <fnmatch.h>
 #include <time.h>
 #include <ctype.h>
-#include "busybox.h"
 
 //XXX just found out about libbb/messages.c . maybe move stuff there ? - ghoz
 static const char msg_req_arg[] = "option `%s' requires an argument";
index fac2969410a51e5121080a309aa96dd386e14382..a24be248bf816dcd7be8801f4f765e89ac91a923 100644 (file)
  * precompiled regex
 */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <getopt.h>
 #include <string.h>
 #include <errno.h>
-#include "busybox.h"
 #include "xregex.h"
 
 
index ec6d99cac1cccef81a38d64a87d5f68bc26c9fba..c3a892695fd801393e75bcffdc3999b7a442f376 100644 (file)
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
 /*
  * Mini xargs implementation for busybox
  * Options are supported: "-prtx -n max_arg -s max_chars -e[ouf_str]"
  * - Mike Rendell <michael@cs.mun.ca>
  * and David MacKenzie <djm@gnu.ai.mit.edu>.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  *
  * xargs is described in the Single Unix Specification v3 at
  * http://www.opengroup.org/onlinepubs/007904975/utilities/xargs.html
  *
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -37,7 +27,6 @@
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include "busybox.h"
 
 /* COMPAT:  SYSV version defaults size (and has a max value of) to 470.
    We try to make it as large as possible. */
index f3627f206bfae8a69b47ca734b03bdae68df66db..d1f561b639e5184a0759214dd85de5312a621844 100644 (file)
@@ -7,10 +7,9 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
+#include "busybox.h"
 #include <signal.h>
 #include <sys/reboot.h>
-#include "busybox.h"
-
 #include <unistd.h>
 
 int halt_main(int argc, char *argv[])
@@ -40,7 +39,7 @@ RB_AUTOBOOT
        flags = bb_getopt_ulflags(argc, argv, "d:nf", &delay);
        if (flags&1) sleep(atoi(delay));
        if (!(flags&2)) sync();
-       
+
        /* Perform action. */
        if (ENABLE_INIT && !(flags & 4)) {
                if (ENABLE_FEATURE_INITRD) {
index 722d57c6f20fb38f9082e9b1686e2c765640922c..0abe72fdf65a677815b310c02027955753048b74 100644 (file)
@@ -7,6 +7,7 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
+#include "busybox.h"
 #include <signal.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -14,7 +15,6 @@
 #include <getopt.h>
 #include <sys/reboot.h>
 #include <sys/syslog.h>
-#include "busybox.h"
 #include "init_shared.h"
 
 const char * const init_sending_format = "Sending SIG%s to all processes.";
index 0f3fe5b483c487d98c2fe5ac62091d7cc745b20b..6df8de4846615891263dfcb05a87832a4bf9f68e 100644 (file)
@@ -1,3 +1,9 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Helper functions shared by init et al.
+ *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ */
 extern int kill_init(int sig);
 extern int bb_shutdown_system(unsigned long magic);
 extern const char * const init_sending_format;
index 874c220892a1babe4a1f3721e21f412f34a63037..7e47644c3e0c24dbaa8e1aba80c7760c040a9be8 100644 (file)
@@ -1,26 +1,15 @@
+/* vi: set sw=4 ts=4: */
 /*
- *  mesg implementation for busybox
+ * mesg implementation for busybox
  *
- *  Copyright (c) 2002 Manuel Novoa III  <mjn3@codepoet.org>
+ * Copyright (c) 2002 Manuel Novoa III  <mjn3@codepoet.org>
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
+#include "busybox.h"
 #include <unistd.h>
 #include <stdlib.h>
-#include "busybox.h"
 
 #ifdef USE_TTY_GROUP
 #define S_IWGRP_OR_S_IWOTH     S_IWGRP
index b4163f108489926b8f9ce84f17223afa759344bb..7d8ffa893319a16b1904f1e138772a9b7cac1de0 100644 (file)
@@ -4,28 +4,15 @@
  *
  * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
 /* getopt not needed */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
-#include "busybox.h"
 
 int free_main(int argc, char **argv)
 {
index 35d77ed1c9a67c076135e8114fd3272c0de060cf..1a4f612f1134315d7da701ab51a932042b8ffc2c 100644 (file)
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
 /*
  * tiny fuser implementation
  *
@@ -7,6 +8,7 @@
  * GNU Library General Public License
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -19,7 +21,6 @@
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <sys/sysmacros.h>
-#include "busybox.h"
 
 #define FUSER_PROC_DIR "/proc"
 #define FUSER_MAX_LINE 255
index 90114a493659b7cb5da19e36805f20dfbdb4a501..ca6f4203ad71aba3e0357daab3c87d64d7d15a78 100644 (file)
@@ -5,23 +5,10 @@
  * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>.
  * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
-
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -30,7 +17,6 @@
 #include <ctype.h>
 #include <string.h>
 #include <unistd.h>
-#include "busybox.h"
 
 #define KILL 0
 #define KILLALL 1
index 4ad6b1567b9480d92793aaf49f7517d2a6f9fcd2..d9c8dca420a720c543b350be467e0f44f9163aa6 100644 (file)
@@ -7,7 +7,7 @@
  * Licensed under the GPL v2, see the file LICENSE in this tarball.
  */
 
-
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -17,7 +17,6 @@
 #include <string.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include "busybox.h"
 
 #if ENABLE_FEATURE_PIDOF_SINGLE
 #define _SINGLE_COMPL(a) a
index b6242d208989318c477761261fdb2b8d0ec7f901..9dc68395ae1996117251e8d06f4431cc884a4074 100644 (file)
@@ -7,6 +7,7 @@
  * Licensed under the GPL v2, see the file LICENSE in this tarball.
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -17,7 +18,6 @@
 #include <string.h>
 #include <termios.h>
 #include <sys/ioctl.h>
-#include "busybox.h"
 #if ENABLE_SELINUX
 #include <selinux/selinux.h>  /* for is_selinux_enabled()  */
 #endif
index 711ed164ec9bc90d97d4893d89404643e7b8e6c6..53dc5785536ef647557c2639d631c99c3c43d06f 100644 (file)
@@ -4,20 +4,7 @@
  *
  * Copyright (C) 2005  Manuel Novoa III  <mjn3@codepoet.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
 /* Notes:
@@ -32,6 +19,7 @@
  *   following IDs (if any).  Multiple switches are allowed.
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -39,7 +27,6 @@
 #include <errno.h>
 #include <unistd.h>
 #include <sys/resource.h>
-#include "busybox.h"
 
 #if (PRIO_PROCESS < CHAR_MIN) || (PRIO_PROCESS > CHAR_MAX)
 #error Assumption violated : PRIO_PROCESS value
index 125f1320769204432d87b2c6931d4ccd393890a7..5673d293fc65a93f4e2bdab51b8f84320aaf56a7 100644 (file)
@@ -1,4 +1,4 @@
-
+/* vi: set sw=4 ts=4: */
 /*
  * Sysctl 1.01 - A utility to read and manipulate the sysctl parameters
  *
@@ -14,6 +14,7 @@
  *
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -23,7 +24,6 @@
 #include <string.h>
 #include <errno.h>
 #include <fcntl.h>
-#include "busybox.h"
 
 /*
  *    Function Prototypes
index c0d16b658f1cd5c4289fca7f0228745088171285..a97e557aa830e35549ce999e1ca87c758aa15480 100644 (file)
  * GNU Library General Public License
  */
 
+#include "busybox.h"
 #include <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
 #include <sys/ioctl.h>
-#include "busybox.h"
 
 //#define CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE  /* + 2k */
 
index 7784850ae73c0221b89195ee8963eb60b112931b..c1e7af3a5ed8318034b0774d87ac190f8c39eb1f 100644 (file)
@@ -4,20 +4,7 @@
  *
  * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
 /* This version of uptime doesn't display the number of users on the system,
 
 /* getopt not needed */
 
-
+#include "busybox.h"
 #include <stdio.h>
 #include <time.h>
 #include <errno.h>
 #include <stdlib.h>
-#include "busybox.h"
 
 #ifndef FSHIFT
 # define FSHIFT 16              /* nr of bits of precision */
index c8ccf19b5c31abd4d5b166bb29f861aa5b78ec0c..5cdd7f006e9e16708774c7d041377a3899226451 100644 (file)
  */
 
 
-
 #define IFS_BROKEN
 
 #define PROFILE 0
 
+#include "busybox.h"
+
 #ifdef DEBUG
 #define _GNU_SOURCE
 #endif
 #include <paths.h>
 #include <setjmp.h>
 #include <signal.h>
-#include <stdint.h>
+/*#include <stdint.h>*/
 #include <time.h>
 #include <fnmatch.h>
 
-
-#include "busybox.h"
 #include "pwd_.h"
 
 #ifdef CONFIG_ASH_JOB_CONTROL
index d0e6422502ab23c98f0d293e013ee9cd7d970960..8b5b2b94254929681c9f65ccd182eacacc70829d 100644 (file)
@@ -31,6 +31,7 @@
  */
 
 
+#include "busybox.h"
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
@@ -41,8 +42,6 @@
 #include <signal.h>
 #include <limits.h>
 
-#include "busybox.h"
-
 #include "../shell/cmdedit.h"
 
 
index 0a46d125aa8080e67d18cc56c226e2147004bc28..e3707380da6363c1eaa812e70a46a0f0718576c9 100644 (file)
@@ -77,6 +77,8 @@
  *
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
+
+#include "busybox.h"
 #include <ctype.h>     /* isalpha, isdigit */
 #include <unistd.h>    /* getpid */
 #include <stdlib.h>    /* getenv, atoi */
@@ -97,7 +99,6 @@
 /* #define DEBUG_SHELL */
 
 #if 1
-#include "busybox.h"
 #include "cmdedit.h"
 #else
 #define bb_applet_name "hush"
index 8e8d45ae9718cd5a969a3867b170f07658ac2b40..54408c97e0a7bd073b600889551b731ab55cb129 100644 (file)
@@ -21,6 +21,7 @@
 //#define DEBUG_SHELL
 
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
@@ -33,7 +34,6 @@
 #include <unistd.h>
 #include <getopt.h>
 #include <termios.h>
-#include "busybox.h"
 #include "cmdedit.h"
 
 #ifdef CONFIG_LOCALE_SUPPORT
index e47af795ee3f498ed9f5f3e1bef8bdd1deb086d9..8bc769b6eded91488f6529711f668d618a53124e 100644 (file)
@@ -27,6 +27,7 @@
  * Original copyright notice is retained at the end of this file.
  */
 
+#include "busybox.h"
 #include <ctype.h>
 #include <dirent.h>
 #include <errno.h>
@@ -46,7 +47,6 @@
 #include <sys/wait.h>
 
 #include "cmdedit.h"
-#include "busybox.h"
 
 
 /* Conditional use of "register" keyword */
index 404e2275dbb3427d462fc17b0bc624909f0407c3..92590d209810c673a8cc974ca0645a3afcd220e0 100644 (file)
@@ -17,6 +17,7 @@
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <signal.h>            /* for our signal() handlers */
@@ -27,8 +28,6 @@
 #include <sys/syslog.h>
 #include <sys/klog.h>
 
-#include "busybox.h"
-
 static void klogd_signal(int sig ATTRIBUTE_UNUSED)
 {
        klogctl(7, NULL, 0);
index 0c6fb084563f5d540d0c4c7e04d3f5de487b3e50..ea093ed5204994aae1de692b11256d07de0d0da6 100644 (file)
@@ -4,22 +4,10 @@
  *
  * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -28,7 +16,6 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include "busybox.h"
 #if !defined CONFIG_SYSLOGD
 
 #define SYSLOG_NAMES
index 2e2681b6708c08ae93c58b40b6865a313c36599b..dfff7572842d575c54fb7166dd3cc03dea69a4a6 100644 (file)
@@ -13,6 +13,7 @@
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
+#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
@@ -32,8 +33,6 @@
 #include <sys/un.h>
 #include <sys/param.h>
 
-#include "busybox.h"
-
 /* SYSLOG_NAMES defined to pull some extra junk from syslog.h */
 #define SYSLOG_NAMES
 #include <sys/syslog.h>