svn commit: trunk/busybox: archival console-tools coreutils debianu etc...

vda at busybox.net vda at busybox.net
Sun Mar 23 22:55:26 UTC 2008


Author: vda
Date: 2008-03-23 15:55:25 -0700 (Sun, 23 Mar 2008)
New Revision: 21460

Log:
patch: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com> (-80 bytes)
*: removal of #include <getopt.h>



Modified:
   trunk/busybox/archival/tar.c
   trunk/busybox/console-tools/kbd_mode.c
   trunk/busybox/console-tools/setconsole.c
   trunk/busybox/coreutils/env.c
   trunk/busybox/coreutils/install.c
   trunk/busybox/coreutils/ls.c
   trunk/busybox/coreutils/mkdir.c
   trunk/busybox/coreutils/mv.c
   trunk/busybox/coreutils/od.c
   trunk/busybox/coreutils/od_bloaty.c
   trunk/busybox/coreutils/readlink.c
   trunk/busybox/debianutils/run_parts.c
   trunk/busybox/debianutils/start_stop_daemon.c
   trunk/busybox/editors/patch.c
   trunk/busybox/loginutils/chpasswd.c
   trunk/busybox/miscutils/chrt.c
   trunk/busybox/miscutils/strings.c
   trunk/busybox/miscutils/taskset.c
   trunk/busybox/networking/ftpgetput.c
   trunk/busybox/networking/ifupdown.c
   trunk/busybox/networking/ipcalc.c
   trunk/busybox/networking/route.c
   trunk/busybox/networking/udhcp/dhcpc.c
   trunk/busybox/networking/udhcp/dumpleases.c
   trunk/busybox/networking/wget.c
   trunk/busybox/procps/pgrep.c
   trunk/busybox/shell/hush.c
   trunk/busybox/util-linux/hexdump.c
   trunk/busybox/util-linux/hwclock.c
   trunk/busybox/util-linux/losetup.c
   trunk/busybox/util-linux/umount.c


Changeset:
Modified: trunk/busybox/archival/tar.c
===================================================================
--- trunk/busybox/archival/tar.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/archival/tar.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -24,7 +24,6 @@
  */
 
 #include <fnmatch.h>
-#include <getopt.h>
 #include "libbb.h"
 #include "unarchive.h"
 

Modified: trunk/busybox/console-tools/kbd_mode.c
===================================================================
--- trunk/busybox/console-tools/kbd_mode.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/console-tools/kbd_mode.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -10,7 +10,6 @@
  *
  */
 
-#include <getopt.h>
 #include "libbb.h"
 #include <linux/kd.h>
 

Modified: trunk/busybox/console-tools/setconsole.c
===================================================================
--- trunk/busybox/console-tools/setconsole.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/console-tools/setconsole.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -7,7 +7,6 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <getopt.h>
 #include "libbb.h"
 
 #if ENABLE_FEATURE_SETCONSOLE_LONG_OPTIONS

Modified: trunk/busybox/coreutils/env.c
===================================================================
--- trunk/busybox/coreutils/env.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/coreutils/env.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -29,7 +29,6 @@
  * - use xfunc_error_retval
  */
 
-#include <getopt.h> /* struct option */
 #include "libbb.h"
 
 #if ENABLE_FEATURE_ENV_LONG_OPTIONS

Modified: trunk/busybox/coreutils/install.c
===================================================================
--- trunk/busybox/coreutils/install.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/coreutils/install.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -9,9 +9,6 @@
  *           owner/group, will probably modify bb_make_directory(...)
  */
 
-#include <libgen.h>
-#include <getopt.h> /* struct option */
-
 #include "libbb.h"
 #include "libcoreutils/coreutils.h"
 

Modified: trunk/busybox/coreutils/ls.c
===================================================================
--- trunk/busybox/coreutils/ls.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/coreutils/ls.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -29,7 +29,6 @@
  * 1. requires lstat (BSD) - how do you do it without?
  */
 
-#include <getopt.h>
 #include "libbb.h"
 
 /* This is a NOEXEC applet. Be very careful! */

Modified: trunk/busybox/coreutils/mkdir.c
===================================================================
--- trunk/busybox/coreutils/mkdir.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/coreutils/mkdir.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -19,7 +19,6 @@
 /* Nov 28, 2006      Yoshinori Sato <ysato at users.sourceforge.jp>: Add SELinux Support.
  */
 
-#include <getopt.h> /* struct option */
 #include "libbb.h"
 
 /* This is a NOFORK applet. Be very careful! */

Modified: trunk/busybox/coreutils/mv.c
===================================================================
--- trunk/busybox/coreutils/mv.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/coreutils/mv.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -13,10 +13,6 @@
  * Size reduction and improved error checking.
  */
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <getopt.h> /* struct option */
 #include "libbb.h"
 #include "libcoreutils/coreutils.h"
 

Modified: trunk/busybox/coreutils/od.c
===================================================================
--- trunk/busybox/coreutils/od.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/coreutils/od.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -17,7 +17,6 @@
 /* This one provides -t (busybox's own build script needs it) */
 #include "od_bloaty.c"
 #else
-#include <getopt.h>
 
 #include "dump.h"
 

Modified: trunk/busybox/coreutils/od_bloaty.c
===================================================================
--- trunk/busybox/coreutils/od_bloaty.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/coreutils/od_bloaty.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -50,7 +50,6 @@
 */
 
 #include "libbb.h"
-#include <getopt.h>
 
 #define assert(a) ((void)0)
 

Modified: trunk/busybox/coreutils/readlink.c
===================================================================
--- trunk/busybox/coreutils/readlink.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/coreutils/readlink.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -7,7 +7,6 @@
  * Licensed under GPL v2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <getopt.h>
 #include "libbb.h"
 
 int readlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;

Modified: trunk/busybox/debianutils/run_parts.c
===================================================================
--- trunk/busybox/debianutils/run_parts.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/debianutils/run_parts.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -30,8 +30,6 @@
  * -u MASK      umask. Set the umask of the program executed to MASK.
  */
 
-#include <getopt.h>
-
 #include "libbb.h"
 
 struct globals {

Modified: trunk/busybox/debianutils/start_stop_daemon.c
===================================================================
--- trunk/busybox/debianutils/start_stop_daemon.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/debianutils/start_stop_daemon.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -11,7 +11,6 @@
 /* NB: we have a problem here with /proc/NN/exe usage, similar to
  * one fixed in killall/pidof */
 
-#include <getopt.h>
 #include <sys/resource.h>
 
 /* Override ENABLE_FEATURE_PIDFILE */

Modified: trunk/busybox/editors/patch.c
===================================================================
--- trunk/busybox/editors/patch.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/editors/patch.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -19,15 +19,11 @@
  *   - Reject file isnt saved
  */
 
-#include <getopt.h>
-
 #include "libbb.h"
 
-static unsigned int copy_lines(FILE *src_stream, FILE *dest_stream, const unsigned int lines_count)
+static unsigned copy_lines(FILE *src_stream, FILE *dest_stream, unsigned lines_count)
 {
-	unsigned int i = 0;
-
-	while (src_stream && (i < lines_count)) {
+	while (src_stream && lines_count) {
 		char *line;
 		line = xmalloc_fgets(src_stream);
 		if (line == NULL) {
@@ -37,60 +33,54 @@
 			bb_perror_msg_and_die("error writing to new file");
 		}
 		free(line);
-
-		i++;
+		lines_count--;
 	}
-	return i;
+	return lines_count;
 }
 
 /* If patch_level is -1 it will remove all directory names
  * char *line must be greater than 4 chars
  * returns NULL if the file doesnt exist or error
  * returns malloc'ed filename
+ * NB: frees 1st argument!
  */
-
-static char *extract_filename(char *line, int patch_level)
+static char *extract_filename_and_free_line(char *line, int patch_level)
 {
 	char *temp, *filename_start_ptr = line + 4;
-	int i;
 
 	/* Terminate string at end of source filename */
 	temp = strchrnul(filename_start_ptr, '\t');
 	*temp = '\0';
 
 	/* Skip over (patch_level) number of leading directories */
-	if (patch_level == -1)
-		patch_level = INT_MAX;
-	for (i = 0; i < patch_level; i++) {
+	while (patch_level--) {
 		temp = strchr(filename_start_ptr, '/');
 		if (!temp)
 			break;
 		filename_start_ptr = temp + 1;
 	}
 
-	return xstrdup(filename_start_ptr);
+	temp = xstrdup(filename_start_ptr);
+	free(line);
+	return temp;
 }
 
 int patch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int patch_main(int argc ATTRIBUTE_UNUSED, char **argv)
 {
-	int patch_level = -1;
-	char *patch_line;
-	int ret;
-	FILE *patch_file = NULL;
 	struct stat saved_stat;
-	
+	char *patch_line;
+	FILE *patch_file;
+	int patch_level;
+	int ret = 0;
+
+	xfunc_error_retval = 2;	
 	{
-		char *p, *i;
-		ret = getopt32(argv, "p:i:", &p, &i);
-		if (ret & 1)
-			patch_level = xatol_range(p, -1, USHRT_MAX);
-		if (ret & 2) {
-			patch_file = xfopen(i, "r");
-		} else {
-			patch_file = stdin;
-		}
-		ret = 0;
+		const char *p = "-1";
+		const char *i = "-"; /* compat */
+		getopt32(argv, "p:i:", &p, &i);
+		patch_level = xatoi(p); /* can be negative! */
+		patch_file = xfopen_stdin(i);
 	}
 
 	patch_line = xmalloc_getline(patch_file);
@@ -100,38 +90,33 @@
 		char *original_filename;
 		char *new_filename;
 		char *backup_filename;
-		unsigned int src_cur_line = 1;
-		unsigned int dest_cur_line = 0;
-		unsigned int dest_beg_line;
-		unsigned int bad_hunk_count = 0;
-		unsigned int hunk_count = 0;
-		char copy_trailing_lines_flag = 0;
+		unsigned src_cur_line = 1;
+		unsigned dest_cur_line = 0;
+		unsigned dest_beg_line;
+		unsigned bad_hunk_count = 0;
+		unsigned hunk_count = 0;
+		smallint copy_trailing_lines_flag = 0;
 
 		/* Skip everything upto the "---" marker
 		 * No need to parse the lines "Only in <dir>", and "diff <args>"
 		 */
-		while (patch_line && strncmp(patch_line, "--- ", 4) != 0) {
+		while (strncmp(patch_line, "--- ", 4) != 0) {
 			free(patch_line);
 			patch_line = xmalloc_getline(patch_file);
+			if (!patch_line)
+				bb_error_msg_and_die("invalid patch");
 		}
-		/* FIXME: patch_line NULL check?? */
 
 		/* Extract the filename used before the patch was generated */
-		original_filename = extract_filename(patch_line, patch_level);
-		free(patch_line);
+		original_filename = extract_filename_and_free_line(patch_line, patch_level);
 
 		patch_line = xmalloc_getline(patch_file);
-		/* FIXME: NULL check?? */
-		if (strncmp(patch_line, "+++ ", 4) != 0) {
-			ret = 2;
-			bb_error_msg("invalid patch");
-			continue;
-		}
-		new_filename = extract_filename(patch_line, patch_level);
-		free(patch_line);
+		if (!patch_line || strncmp(patch_line, "+++ ", 4) != 0)
+			bb_error_msg_and_die("invalid patch");
+		new_filename = extract_filename_and_free_line(patch_line, patch_level);
 		
 		/* Get access rights from the file to be patched, -1 file does not exist */
-		if (stat(new_filename, &saved_stat)) {
+		if (stat(new_filename, &saved_stat) != 0) {
 			char *line_ptr;
 			/* Create leading directories */
 			line_ptr = strrchr(new_filename, '/');
@@ -140,53 +125,47 @@
 				bb_make_directory(new_filename, -1, FILEUTILS_RECUR);
 				*line_ptr = '/';
 			}
-			dst_stream = xfopen(new_filename, "w+");
 			backup_filename = NULL;
+			saved_stat.st_mode = 0644;
 		} else {
-			backup_filename = xmalloc(strlen(new_filename) + 6);
-			strcpy(backup_filename, new_filename);
-			strcat(backup_filename, ".orig");
+			backup_filename = xasprintf("%s.orig", new_filename);
 			xrename(new_filename, backup_filename);
-			dst_stream = xfopen(new_filename, "w");
-			fchmod(fileno(dst_stream), saved_stat.st_mode);
 		}
+		dst_stream = xfopen(new_filename, "w");
+		fchmod(fileno(dst_stream), saved_stat.st_mode);
+		src_stream = NULL;
 
-		if ((backup_filename == NULL) || stat(original_filename, &saved_stat)) {
-			src_stream = NULL;
-		} else {
-			if (strcmp(original_filename, new_filename) == 0) {
-				src_stream = xfopen(backup_filename, "r");
-			} else {
-				src_stream = xfopen(original_filename, "r");
-			}
+		if (backup_filename && !stat(original_filename, &saved_stat)) {
+			src_stream = xfopen((strcmp(original_filename, new_filename)) ? 
+							    original_filename : backup_filename, "r");
 		}
 
 		printf("patching file %s\n", new_filename);
 
-		/* Handle each hunk */
+		/* Handle all hunks for this file */
 		patch_line = xmalloc_fgets(patch_file);
 		while (patch_line) {
-			unsigned int count;
-			unsigned int src_beg_line;
-			unsigned int unused;
-			unsigned int hunk_offset_start = 0;
-			int hunk_error = 0;
+			unsigned count;
+			unsigned src_beg_line;
+			unsigned unused;
+			unsigned hunk_offset_start = 0;
+			smallint hunk_error = 0;
 
 			/* This bit should be improved */
-			if ((sscanf(patch_line, "@@ -%d,%d +%d,%d @@", &src_beg_line, &unused, &dest_beg_line, &unused) != 4) &&
-				(sscanf(patch_line, "@@ -%d,%d +%d @@", &src_beg_line, &unused, &dest_beg_line) != 3) &&
-				(sscanf(patch_line, "@@ -%d +%d,%d @@", &src_beg_line, &dest_beg_line, &unused) != 3)) {
+			if ((sscanf(patch_line, "@@ -%d,%d +%d,%d @@", &src_beg_line, &unused, &dest_beg_line, &unused) != 4)
+			 && (sscanf(patch_line, "@@ -%d,%d +%d @@", &src_beg_line, &unused, &dest_beg_line) != 3)
+			 && (sscanf(patch_line, "@@ -%d +%d,%d @@", &src_beg_line, &dest_beg_line, &unused) != 3)
+			) {
 				/* No more hunks for this file */
 				break;
 			}
-			free(patch_line);
 			hunk_count++;
 
 			if (src_beg_line && dest_beg_line) {
 				/* Copy unmodified lines upto start of hunk */
-				/* src_beg_line will be 0 if its a new file */
+				/* src_beg_line will be 0 if it's a new file */
 				count = src_beg_line - src_cur_line;
-				if (copy_lines(src_stream, dst_stream, count) != count) {
+				if (copy_lines(src_stream, dst_stream, count)) {
 					bb_error_msg_and_die("bad src file");
 				}
 				src_cur_line += count;
@@ -195,27 +174,25 @@
 			}
 			hunk_offset_start = src_cur_line;
 
-			while ((patch_line = xmalloc_fgets(patch_file)) != NULL) {
+			while (1) {
+				free(patch_line);
+			        patch_line = xmalloc_fgets(patch_file);
+				if (patch_line == NULL) break;
 				if ((*patch_line == '-') || (*patch_line == ' ')) {
 					char *src_line = NULL;
 					if (src_stream) {
 						src_line = xmalloc_fgets(src_stream);
-						if (!src_line) {
-							hunk_error++;
-							break;
-						} else {
+						if (src_line) {
+							int diff = strcmp(src_line, patch_line + 1);
 							src_cur_line++;
+							free(src_line);
+							if (diff) src_line = NULL;
 						}
-						if (strcmp(src_line, patch_line + 1) != 0) {
+						if (!src_line) {
 							bb_error_msg("hunk #%d FAILED at %d", hunk_count, hunk_offset_start);
-							hunk_error++;
-							free(patch_line);
-							/* Probably need to find next hunk, etc... */
-							/* but for now we just bail out */
-							patch_line = NULL;
+							hunk_error = 1;
 							break;
 						}
-						free(src_line);
 					}
 					if (*patch_line == ' ') {
 						fputs(patch_line + 1, dst_stream);
@@ -227,16 +204,15 @@
 				} else {
 					break;
 				}
-				free(patch_line);
-			}
+			} /* end of while loop handling one hunk */
 			if (hunk_error) {
 				bad_hunk_count++;
 			}
-		}
+		} /* end of while loop handling one file */
 
 		/* Cleanup last patched file */
 		if (copy_trailing_lines_flag) {
-			copy_lines(src_stream, dst_stream, -1);
+			copy_lines(src_stream, dst_stream, (unsigned)(-1));
 		}
 		if (src_stream) {
 			fclose(src_stream);
@@ -245,14 +221,13 @@
 			fclose(dst_stream);
 		}
 		if (bad_hunk_count) {
-			if (!ret) {
-				ret = 1;
-			}
-			bb_error_msg("%d out of %d hunk FAILED", bad_hunk_count, hunk_count);
+			ret = 1;
+			bb_error_msg("%u out of %u hunk FAILED", bad_hunk_count, hunk_count);
 		} else {
 			/* It worked, we can remove the backup */
 			if (backup_filename) {
 				unlink(backup_filename);
+				free(backup_filename);
 			}
 			if ((dest_cur_line == 0) || (dest_beg_line == 0)) {
 				/* The new patched file is empty, remove it */
@@ -261,11 +236,11 @@
 					xunlink(original_filename);
 			}
 		}
-	}
+	} /* end of "while there are patch lines" */
 
 	/* 0 = SUCCESS
 	 * 1 = Some hunks failed
-	 * 2 = More serious problems
+	 * 2 = More serious problems (exited earlier)
 	 */
 	return ret;
 }

Modified: trunk/busybox/loginutils/chpasswd.c
===================================================================
--- trunk/busybox/loginutils/chpasswd.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/loginutils/chpasswd.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -9,8 +9,6 @@
 #include "libbb.h"
 
 #if ENABLE_GETOPT_LONG
-#include <getopt.h>
-
 static const char chpasswd_longopts[] ALIGN1 =
 	"encrypted\0" No_argument "e"
 	"md5\0"       No_argument "m"

Modified: trunk/busybox/miscutils/chrt.c
===================================================================
--- trunk/busybox/miscutils/chrt.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/miscutils/chrt.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -7,7 +7,6 @@
  */
 
 #include <sched.h>
-#include <getopt.h> /* optind */
 #include "libbb.h"
 #ifndef _POSIX_PRIORITY_SCHEDULING
 #warning your system may be foobared

Modified: trunk/busybox/miscutils/strings.c
===================================================================
--- trunk/busybox/miscutils/strings.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/miscutils/strings.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -7,8 +7,6 @@
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
-#include <getopt.h>
-
 #include "libbb.h"
 
 #define WHOLE_FILE		1

Modified: trunk/busybox/miscutils/taskset.c
===================================================================
--- trunk/busybox/miscutils/taskset.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/miscutils/taskset.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -7,7 +7,6 @@
  */
 
 #include <sched.h>
-#include <getopt.h> /* optind */
 #include "libbb.h"
 
 #if ENABLE_FEATURE_TASKSET_FANCY

Modified: trunk/busybox/networking/ftpgetput.c
===================================================================
--- trunk/busybox/networking/ftpgetput.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/networking/ftpgetput.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -13,7 +13,6 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <getopt.h>
 #include "libbb.h"
 
 typedef struct ftp_host_info_s {

Modified: trunk/busybox/networking/ifupdown.c
===================================================================
--- trunk/busybox/networking/ifupdown.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/networking/ifupdown.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -19,7 +19,6 @@
 
 #include <sys/utsname.h>
 #include <fnmatch.h>
-#include <getopt.h>
 
 #include "libbb.h"
 

Modified: trunk/busybox/networking/ipcalc.c
===================================================================
--- trunk/busybox/networking/ipcalc.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/networking/ipcalc.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -12,7 +12,6 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <getopt.h>
 #include <sys/socket.h>
 #include <arpa/inet.h>
 

Modified: trunk/busybox/networking/route.c
===================================================================
--- trunk/busybox/networking/route.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/networking/route.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -25,7 +25,6 @@
  * remove ridiculous amounts of bloat.
  */
 
-#include <getopt.h>
 #include <net/route.h>
 #include <net/if.h>
 

Modified: trunk/busybox/networking/udhcp/dhcpc.c
===================================================================
--- trunk/busybox/networking/udhcp/dhcpc.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/networking/udhcp/dhcpc.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -8,7 +8,6 @@
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
-#include <getopt.h>
 #include <syslog.h>
 
 /* Override ENABLE_FEATURE_PIDFILE - ifupdown needs our pidfile to always exist */

Modified: trunk/busybox/networking/udhcp/dumpleases.c
===================================================================
--- trunk/busybox/networking/udhcp/dumpleases.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/networking/udhcp/dumpleases.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -2,7 +2,6 @@
 /*
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
-#include <getopt.h>
 
 #include "common.h"
 #include "dhcpd.h"

Modified: trunk/busybox/networking/wget.c
===================================================================
--- trunk/busybox/networking/wget.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/networking/wget.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -6,7 +6,6 @@
  *
  */
 
-#include <getopt.h>	/* for struct option */
 #include "libbb.h"
 
 struct host_info {

Modified: trunk/busybox/procps/pgrep.c
===================================================================
--- trunk/busybox/procps/pgrep.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/procps/pgrep.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -7,8 +7,6 @@
  * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
  */
 
-#include <getopt.h>
-
 #include "libbb.h"
 #include "xregex.h"
 

Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/shell/hush.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -78,7 +78,6 @@
 
 
 #include <glob.h>      /* glob, of course */
-#include <getopt.h>    /* should be pretty obvious */
 /* #include <dmalloc.h> */
 
 #include "busybox.h" /* for APPLET_IS_NOFORK/NOEXEC */

Modified: trunk/busybox/util-linux/hexdump.c
===================================================================
--- trunk/busybox/util-linux/hexdump.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/util-linux/hexdump.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -9,7 +9,6 @@
  * Licensed under GPLv2 or later, see file License in this tarball for details.
  */
 
-#include <getopt.h>
 #include "libbb.h"
 #include "dump.h"
 

Modified: trunk/busybox/util-linux/hwclock.c
===================================================================
--- trunk/busybox/util-linux/hwclock.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/util-linux/hwclock.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -8,7 +8,6 @@
 */
 
 #include <sys/utsname.h>
-#include <getopt.h>
 #include "libbb.h"
 #include "rtc_.h"
 

Modified: trunk/busybox/util-linux/losetup.c
===================================================================
--- trunk/busybox/util-linux/losetup.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/util-linux/losetup.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -7,8 +7,6 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <getopt.h>
-
 #include "libbb.h"
 
 int losetup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;

Modified: trunk/busybox/util-linux/umount.c
===================================================================
--- trunk/busybox/util-linux/umount.c	2008-03-23 18:44:59 UTC (rev 21459)
+++ trunk/busybox/util-linux/umount.c	2008-03-23 22:55:25 UTC (rev 21460)
@@ -9,7 +9,6 @@
  */
 
 #include <mntent.h>
-#include <getopt.h>
 #include "libbb.h"
 
 /* ignored: -v -d -t -i */




More information about the busybox-cvs mailing list