a few minor cleanups.
authorEric Andersen <andersen@codepoet.org>
Thu, 6 Jul 2000 09:56:35 +0000 (09:56 -0000)
committerEric Andersen <andersen@codepoet.org>
Thu, 6 Jul 2000 09:56:35 +0000 (09:56 -0000)
 -Erik

Makefile
archival/gunzip.c
freeramdisk.c
fsck_minix.c
gunzip.c
init.c
init/init.c
util-linux/freeramdisk.c
util-linux/fsck_minix.c

index 27ea8fd7f95f6d6f412bbbe02810a2c50f35cc59..ff2f8f88fd8ff83701a91d54561de5fa3c20b4b8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,8 @@ DOSTATIC = false
 
 # To compile vs an alternative libc, you may need to use/adjust
 # the following lines to meet your needs.  This is how I did it...
-#CFLAGS+=-nostdinc -I/home/andersen/CVS/uC-libc/include -I/usr/include/linux
+#GCCINCDIR = $(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
+#CFLAGS+=-nostdinc -fno-builtin -I/home/andersen/CVS/uC-libc/include -I$(GCCINCDIR)
 #LDFLAGS+=-nostdlib
 #LIBRARIES = /home/andersen/CVS/uC-libc/libc.a
 
index f2bb59dd7262ed568d47c1f3867a40120cf4819a..d6382aed0a35fb11e41486ee4c3a93ad16278bdf 100644 (file)
@@ -28,6 +28,7 @@
  */
 
 #include "internal.h"
+#include <getopt.h>
 
 static const char gunzip_usage[] =
        "gunzip [OPTION]... FILE\n"
index fdac5ea46094090b6ef77aec1721676e9a1e53d9..a6fa2431f3e2de3be61d83c473cf816b1be8fc11 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <linux/fs.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -32,6 +31,9 @@
 #include "internal.h"
 
 
+/* From linux/fs.h */
+#define BLKFLSBUF  _IO(0x12,97)        /* flush buffer cache */
+
 
 static const char freeramdisk_usage[] =
        "freeramdisk DEVICE\n"
index adeb78967af3a3047fc5939c0b85e2b96ae37b4b..a140bcecf98f23f652510fb7c29ec6e133fe3e46 100644 (file)
@@ -86,6 +86,7 @@
  * enforced (but it's not much fun on a character device :-). 
  */
 
+#include <linux/fs.h>
 #include "internal.h"
 #include <stdio.h>
 #include <errno.h>
@@ -98,8 +99,6 @@
 #include <mntent.h>
 #include <sys/stat.h>
 #include <sys/param.h>
-
-#include <linux/fs.h>
 #include <linux/minix_fs.h>
 
 #ifdef MINIX2_SUPER_MAGIC2
index f2bb59dd7262ed568d47c1f3867a40120cf4819a..d6382aed0a35fb11e41486ee4c3a93ad16278bdf 100644 (file)
--- a/gunzip.c
+++ b/gunzip.c
@@ -28,6 +28,7 @@
  */
 
 #include "internal.h"
+#include <getopt.h>
 
 static const char gunzip_usage[] =
        "gunzip [OPTION]... FILE\n"
diff --git a/init.c b/init.c
index 26e4dc7a7b20143bc4abd30ad86169cb150cf38c..7236cf8512fa639f746373fb996d44a8dcb11db9 100644 (file)
--- a/init.c
+++ b/init.c
 #include <linux/version.h>
 #include <linux/reboot.h>
 #include <linux/unistd.h>
+#include <linux/vt.h>                          /* for vt_stat */
 #include <sys/fcntl.h>
 #include <sys/ioctl.h>
 #include <sys/mount.h>
 #include <sys/types.h>
-#include <sys/vt.h>                            /* for vt_stat */
 #include <sys/wait.h>
 #ifdef BB_SYSLOGD
 # include <sys/syslog.h>
index 26e4dc7a7b20143bc4abd30ad86169cb150cf38c..7236cf8512fa639f746373fb996d44a8dcb11db9 100644 (file)
 #include <linux/version.h>
 #include <linux/reboot.h>
 #include <linux/unistd.h>
+#include <linux/vt.h>                          /* for vt_stat */
 #include <sys/fcntl.h>
 #include <sys/ioctl.h>
 #include <sys/mount.h>
 #include <sys/types.h>
-#include <sys/vt.h>                            /* for vt_stat */
 #include <sys/wait.h>
 #ifdef BB_SYSLOGD
 # include <sys/syslog.h>
index fdac5ea46094090b6ef77aec1721676e9a1e53d9..a6fa2431f3e2de3be61d83c473cf816b1be8fc11 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <linux/fs.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -32,6 +31,9 @@
 #include "internal.h"
 
 
+/* From linux/fs.h */
+#define BLKFLSBUF  _IO(0x12,97)        /* flush buffer cache */
+
 
 static const char freeramdisk_usage[] =
        "freeramdisk DEVICE\n"
index adeb78967af3a3047fc5939c0b85e2b96ae37b4b..a140bcecf98f23f652510fb7c29ec6e133fe3e46 100644 (file)
@@ -86,6 +86,7 @@
  * enforced (but it's not much fun on a character device :-). 
  */
 
+#include <linux/fs.h>
 #include "internal.h"
 #include <stdio.h>
 #include <errno.h>
@@ -98,8 +99,6 @@
 #include <mntent.h>
 #include <sys/stat.h>
 #include <sys/param.h>
-
-#include <linux/fs.h>
 #include <linux/minix_fs.h>
 
 #ifdef MINIX2_SUPER_MAGIC2