usr.bin/make Clean up includes

Max Okumoto okumoto at ucsd.edu
Wed Nov 17 15:44:59 PST 2004


Clean some includes and remove ifdef __STDC__

Parts taken from FreeBSD
2001/04/25 15:45:36
2002/03/23 23:30:30
2004/04/05 07:16:48
2004/04/05 18:02:08
			Max
---------------------
PatchSet 197
Date: 2001/04/25 15:45:36
Author: ru
Log:
-Wall cleanup.

Members: 
	dir.c:1.16->1.17 

Index: dir.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/dir.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- dir.c	10 Feb 2001 07:12:18 -0000	1.16
+++ dir.c	25 Apr 2001 14:45:36 -0000	1.17
@@ -88,8 +88,9 @@
 
 #include <stdio.h>
 #include <sys/types.h>
-#include <dirent.h>
 #include <sys/stat.h>
+#include <dirent.h>
+#include <err.h>
 #include "make.h"
 #include "hash.h"
 #include "dir.h"
diff -ru  dfly-src/make/make.h fbsd-src/make/make.h
--- make.h	Wed Nov 17 02:56:40 2004
+++ make.h	Wed Nov 17 02:56:38 2004
@@ -49,11 +49,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
-#include <err.h>
-
-#if !defined(MAKE_BOOTSTRAP) && defined(BSD4_4)
-# include <sys/cdefs.h>
-#endif
 
 #include <stdlib.h>
 #include <unistd.h>
---------------------
PatchSet 216
Date: 2002/03/23 23:30:30
Author: imp
Log:
o unifdef -D__STDC__

Members: 
	lst.h:1.12->1.13 
	main.c:1.50->1.51 

Index: lst.h
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/lst.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- lst.h	22 Mar 2002 01:33:14 -0000	1.12
+++ lst.h	23 Mar 2002 23:30:30 -0000	1.13
@@ -47,9 +47,7 @@
 #define _LST_H_
 
 #include	<sys/param.h>
-#ifdef __STDC__
 #include	<stdlib.h>
-#endif
 #include	"sprite.h"
 
 /*
Index: main.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/main.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- main.c	22 Mar 2002 01:33:14 -0000	1.50
+++ main.c	23 Mar 2002 23:30:30 -0000	1.51
@@ -90,11 +90,7 @@
 #include <fcntl.h>
 #include <stdio.h>
 #include <sysexits.h>
 #include <signal.h>
-#ifdef __STDC__
 #include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
 #include <unistd.h>
 #include "make.h"
 #include "hash.h"
---------------------
PatchSet 337
Date: 2004/04/05 07:16:48
Author: des
Log:
Sort #includes, remove <sys/types.h> (made redundant by <sys/param.h>),
add <signal.h> (needed for sigaction())

Noticed by:	Stefan Farfeleder <stefan at xxxxxxxxxxxxx>

Members: 
	main.c:1.86->1.87 

Index: main.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/main.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- main.c	13 Dec 2003 15:26:27 -0000	1.86
+++ main.c	5 Apr 2004 06:16:48 -0000	1.87
@@ -60,8 +60,6 @@
  *				the .MFLAGS target.
  */
 
-#include <sys/types.h>
-#include <sys/time.h>
 #include <sys/param.h>
 #include <sys/resource.h>
 #include <sys/signal.h>
@@ -69,19 +67,22 @@
 #if defined(__i386__)
 #include <sys/sysctl.h>
 #endif
+#include <sys/time.h>
 #ifndef MACHINE
 #include <sys/utsname.h>
 #endif
 #include <sys/wait.h>
+
 #include <err.h>
-#include <stdlib.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <signal.h>
+#include <stdarg.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <sysexits.h>
-#include <signal.h>
-#include <stdarg.h>
 #include <unistd.h>
+
 #include "make.h"
 #include "hash.h"
 #include "dir.h"
---------------------
PatchSet 338
Date: 2004/04/05 18:02:08
Author: ru
Log:
Unbreak compilation on RELENG_4.

Submitted by:	des

Members: 
	main.c:1.87->1.88 

Index: main.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/main.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- main.c	5 Apr 2004 06:16:48 -0000	1.87
+++ main.c	5 Apr 2004 17:02:08 -0000	1.88
@@ -61,13 +61,13 @@
  */
 
 #include <sys/param.h>
-#include <sys/resource.h>
 #include <sys/signal.h>
 #include <sys/stat.h>
 #if defined(__i386__)
 #include <sys/sysctl.h>
 #endif
 #include <sys/time.h>
+#include <sys/resource.h>
 #ifndef MACHINE
 #include <sys/utsname.h>
 #endif




More information about the Submit mailing list