From e15d7573a1263fb364d1678c3a46be47a8b5e5ea Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 2 Jun 2006 20:56:16 +0000 Subject: [PATCH] - move #include busybox.h to the very top so we pull in the config and eventual platform specific includes in early. --- applets/applets.c | 2 +- applets/busybox.c | 4 +++- applets/version.c | 7 +++++++ debianutils/mktemp.c | 2 +- debianutils/pipe_progress.c | 29 ++++++++--------------------- debianutils/readlink.c | 5 +++-- debianutils/run_parts.c | 18 ++---------------- debianutils/start_stop_daemon.c | 3 +-- debianutils/which.c | 2 +- docs/new-applet-HOWTO.txt | 4 +++- findutils/find.c | 17 ++--------------- findutils/grep.c | 2 +- findutils/xargs.c | 17 +++-------------- init/halt.c | 5 ++--- init/init_shared.c | 2 +- init/init_shared.h | 6 ++++++ init/mesg.c | 21 +++++---------------- procps/free.c | 17 ++--------------- procps/fuser.c | 3 ++- procps/kill.c | 18 ++---------------- procps/pidof.c | 3 +-- procps/ps.c | 2 +- procps/renice.c | 17 ++--------------- procps/sysctl.c | 4 ++-- procps/top.c | 2 +- procps/uptime.c | 18 ++---------------- shell/ash.c | 7 +++---- shell/cmdedit.c | 3 +-- shell/hush.c | 3 ++- shell/lash.c | 2 +- shell/msh.c | 2 +- sysklogd/klogd.c | 3 +-- sysklogd/logger.c | 17 ++--------------- sysklogd/syslogd.c | 3 +-- 34 files changed, 77 insertions(+), 193 deletions(-) diff --git a/applets/applets.c b/applets/applets.c index 1913676dc..aea116add 100644 --- a/applets/applets.c +++ b/applets/applets.c @@ -12,12 +12,12 @@ * Licensed under GPLv2 or later, see file License in this tarball for details. */ +#include "busybox.h" #include #include #include #include #include -#include "busybox.h" #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE static const char usage_messages[] = diff --git a/applets/busybox.c b/applets/busybox.c index 25bb36d9c..a92ddbd0e 100644 --- a/applets/busybox.c +++ b/applets/busybox.c @@ -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 #include #include #include #include -#include "busybox.h" #if ENABLE_LOCALE_SUPPORT #include #else diff --git a/applets/version.c b/applets/version.c index 6f6ec24ff..ce75f1ff9 100644 --- a/applets/version.c +++ b/applets/version.c @@ -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 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 @@ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ +#include "busybox.h" #include #include #include #include #include -#include "busybox.h" int mktemp_main(int argc, char **argv) { 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 @@ +/* vi: set sw=4 ts=4: */ /* * Monitor a pipe with a simple progress display. * * Copyright (C) 2003 by Rob Landley , 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 #include #include #include -#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; } 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 @@ * Licensed under GPL v2, see file LICENSE in this tarball for details. */ +#include "busybox.h" #include #include #include #include -#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; } 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 @@ * Copyright (C) 1996-1999 Guy Maor * * - * 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 @@ -49,10 +35,10 @@ * done - declare run_parts_main() as extern and any other function as static? */ +#include "busybox.h" #include #include -#include "busybox.h" static const struct option runparts_long_options[] = { { "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 @@ * Adapted for busybox David Kimdon */ +#include "busybox.h" #include #include #include @@ -17,8 +18,6 @@ #include #include #include /* struct option */ - -#include "busybox.h" #include "pwd_.h" 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 @@ * Based on which from debianutils */ +#include "busybox.h" #include #include #include #include #include -#include "busybox.h" int which_main(int argc, char **argv) { diff --git a/docs/new-applet-HOWTO.txt b/docs/new-applet-HOWTO.txt index 2f5702bd6..7acc80bb2 100644 --- a/docs/new-applet-HOWTO.txt +++ b/docs/new-applet-HOWTO.txt @@ -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 _main instead of main. And be sure to put it in .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] * * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ #include "busybox.h" +#include int mu_main(int argc, char **argv) { diff --git a/findutils/find.c b/findutils/find.c index 17a1a5656..f8bcccaf5 100644 --- a/findutils/find.c +++ b/findutils/find.c @@ -7,22 +7,10 @@ * Reworked by David Douthitt and * Matt Kraai . * - * 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 #include #include @@ -31,7 +19,6 @@ #include #include #include -#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"; diff --git a/findutils/grep.c b/findutils/grep.c index fac296941..a24be248b 100644 --- a/findutils/grep.c +++ b/findutils/grep.c @@ -16,12 +16,12 @@ * precompiled regex */ +#include "busybox.h" #include #include #include #include #include -#include "busybox.h" #include "xregex.h" diff --git a/findutils/xargs.c b/findutils/xargs.c index ec6d99cac..c3a892695 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c @@ -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]" @@ -9,25 +10,14 @@ * - Mike Rendell * and David MacKenzie . * - * 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 #include #include @@ -37,7 +27,6 @@ #include #include #include -#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. */ diff --git a/init/halt.c b/init/halt.c index f3627f206..d1f561b63 100644 --- a/init/halt.c +++ b/init/halt.c @@ -7,10 +7,9 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ +#include "busybox.h" #include #include -#include "busybox.h" - #include 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) { diff --git a/init/init_shared.c b/init/init_shared.c index 722d57c6f..0abe72fdf 100644 --- a/init/init_shared.c +++ b/init/init_shared.c @@ -7,6 +7,7 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ +#include "busybox.h" #include #include #include @@ -14,7 +15,6 @@ #include #include #include -#include "busybox.h" #include "init_shared.h" const char * const init_sending_format = "Sending SIG%s to all processes."; diff --git a/init/init_shared.h b/init/init_shared.h index 0f3fe5b48..6df8de484 100644 --- a/init/init_shared.h +++ b/init/init_shared.h @@ -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; diff --git a/init/mesg.c b/init/mesg.c index 874c22089..7e47644c3 100644 --- a/init/mesg.c +++ b/init/mesg.c @@ -1,26 +1,15 @@ +/* vi: set sw=4 ts=4: */ /* - * mesg implementation for busybox + * mesg implementation for busybox * - * Copyright (c) 2002 Manuel Novoa III + * Copyright (c) 2002 Manuel Novoa III * - * 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 #include -#include "busybox.h" #ifdef USE_TTY_GROUP #define S_IWGRP_OR_S_IWOTH S_IWGRP diff --git a/procps/free.c b/procps/free.c index b4163f108..7d8ffa893 100644 --- a/procps/free.c +++ b/procps/free.c @@ -4,28 +4,15 @@ * * Copyright (C) 1999-2004 by Erik Andersen * - * 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 #include #include -#include "busybox.h" int free_main(int argc, char **argv) { diff --git a/procps/fuser.c b/procps/fuser.c index 35d77ed1c..1a4f612f1 100644 --- a/procps/fuser.c +++ b/procps/fuser.c @@ -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 #include #include @@ -19,7 +21,6 @@ #include #include #include -#include "busybox.h" #define FUSER_PROC_DIR "/proc" #define FUSER_MAX_LINE 255 diff --git a/procps/kill.c b/procps/kill.c index 90114a493..ca6f4203a 100644 --- a/procps/kill.c +++ b/procps/kill.c @@ -5,23 +5,10 @@ * Copyright (C) 1995, 1996 by Bruce Perens . * Copyright (C) 1999-2004 by Erik Andersen * - * 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 #include #include @@ -30,7 +17,6 @@ #include #include #include -#include "busybox.h" #define KILL 0 #define KILLALL 1 diff --git a/procps/pidof.c b/procps/pidof.c index 4ad6b1567..d9c8dca42 100644 --- a/procps/pidof.c +++ b/procps/pidof.c @@ -7,7 +7,7 @@ * Licensed under the GPL v2, see the file LICENSE in this tarball. */ - +#include "busybox.h" #include #include #include @@ -17,7 +17,6 @@ #include #include #include -#include "busybox.h" #if ENABLE_FEATURE_PIDOF_SINGLE #define _SINGLE_COMPL(a) a diff --git a/procps/ps.c b/procps/ps.c index b6242d208..9dc68395a 100644 --- a/procps/ps.c +++ b/procps/ps.c @@ -7,6 +7,7 @@ * Licensed under the GPL v2, see the file LICENSE in this tarball. */ +#include "busybox.h" #include #include #include @@ -17,7 +18,6 @@ #include #include #include -#include "busybox.h" #if ENABLE_SELINUX #include /* for is_selinux_enabled() */ #endif diff --git a/procps/renice.c b/procps/renice.c index 711ed164e..53dc57855 100644 --- a/procps/renice.c +++ b/procps/renice.c @@ -4,20 +4,7 @@ * * Copyright (C) 2005 Manuel Novoa III * - * 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 #include #include @@ -39,7 +27,6 @@ #include #include #include -#include "busybox.h" #if (PRIO_PROCESS < CHAR_MIN) || (PRIO_PROCESS > CHAR_MAX) #error Assumption violated : PRIO_PROCESS value diff --git a/procps/sysctl.c b/procps/sysctl.c index 125f13207..5673d293f 100644 --- a/procps/sysctl.c +++ b/procps/sysctl.c @@ -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 #include #include @@ -23,7 +24,6 @@ #include #include #include -#include "busybox.h" /* * Function Prototypes diff --git a/procps/top.c b/procps/top.c index c0d16b658..a97e557aa 100644 --- a/procps/top.c +++ b/procps/top.c @@ -28,13 +28,13 @@ * GNU Library General Public License */ +#include "busybox.h" #include #include #include #include #include #include -#include "busybox.h" //#define CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE /* + 2k */ diff --git a/procps/uptime.c b/procps/uptime.c index 7784850ae..c1e7af3a5 100644 --- a/procps/uptime.c +++ b/procps/uptime.c @@ -4,20 +4,7 @@ * * Copyright (C) 1999-2004 by Erik Andersen * - * 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, @@ -28,12 +15,11 @@ /* getopt not needed */ - +#include "busybox.h" #include #include #include #include -#include "busybox.h" #ifndef FSHIFT # define FSHIFT 16 /* nr of bits of precision */ diff --git a/shell/ash.c b/shell/ash.c index c8ccf19b5..5cdd7f006 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -44,11 +44,12 @@ */ - #define IFS_BROKEN #define PROFILE 0 +#include "busybox.h" + #ifdef DEBUG #define _GNU_SOURCE #endif @@ -76,12 +77,10 @@ #include #include #include -#include +/*#include */ #include #include - -#include "busybox.h" #include "pwd_.h" #ifdef CONFIG_ASH_JOB_CONTROL diff --git a/shell/cmdedit.c b/shell/cmdedit.c index d0e642250..8b5b2b942 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c @@ -31,6 +31,7 @@ */ +#include "busybox.h" #include #include #include @@ -41,8 +42,6 @@ #include #include -#include "busybox.h" - #include "../shell/cmdedit.h" diff --git a/shell/hush.c b/shell/hush.c index 0a46d125a..e3707380d 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -77,6 +77,8 @@ * * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ + +#include "busybox.h" #include /* isalpha, isdigit */ #include /* getpid */ #include /* getenv, atoi */ @@ -97,7 +99,6 @@ /* #define DEBUG_SHELL */ #if 1 -#include "busybox.h" #include "cmdedit.h" #else #define bb_applet_name "hush" diff --git a/shell/lash.c b/shell/lash.c index 8e8d45ae9..54408c97e 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -21,6 +21,7 @@ //#define DEBUG_SHELL +#include "busybox.h" #include #include #include @@ -33,7 +34,6 @@ #include #include #include -#include "busybox.h" #include "cmdedit.h" #ifdef CONFIG_LOCALE_SUPPORT diff --git a/shell/msh.c b/shell/msh.c index e47af795e..8bc769b6e 100644 --- a/shell/msh.c +++ b/shell/msh.c @@ -27,6 +27,7 @@ * Original copyright notice is retained at the end of this file. */ +#include "busybox.h" #include #include #include @@ -46,7 +47,6 @@ #include #include "cmdedit.h" -#include "busybox.h" /* Conditional use of "register" keyword */ diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index 404e2275d..92590d209 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -17,6 +17,7 @@ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ +#include "busybox.h" #include #include #include /* for our signal() handlers */ @@ -27,8 +28,6 @@ #include #include -#include "busybox.h" - static void klogd_signal(int sig ATTRIBUTE_UNUSED) { klogctl(7, NULL, 0); diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 0c6fb0845..ea093ed52 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c @@ -4,22 +4,10 @@ * * Copyright (C) 1999-2004 by Erik Andersen * - * 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 #include #include @@ -28,7 +16,6 @@ #include #include -#include "busybox.h" #if !defined CONFIG_SYSLOGD #define SYSLOG_NAMES diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 2e2681b67..dfff75728 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -13,6 +13,7 @@ * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. */ +#include "busybox.h" #include #include #include @@ -32,8 +33,6 @@ #include #include -#include "busybox.h" - /* SYSLOG_NAMES defined to pull some extra junk from syslog.h */ #define SYSLOG_NAMES #include -- 2.25.1