This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] improve fixproto 2/3


Seems to work.  I don't have access to a system without string.h, of course.
The purpose here is to eliminate the POSIX define, not to make string.h work.

	* fixproto: Generate string.h if it's missing.
	* tsystem.h: Include <string.h> unconditionally.

Index: tsystem.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tsystem.h,v
retrieving revision 1.7
diff -u -r1.7 tsystem.h
--- tsystem.h	25 Mar 2002 20:52:14 -0000	1.7
+++ tsystem.h	21 Mar 2003 18:24:32 -0000
@@ -73,11 +73,8 @@
 extern int errno;
 #endif
 
-#ifdef POSIX
-#include <string.h>
-#endif
-
 /* GCC (fixproto) guarantees these system headers exist.  */
+#include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
 
--- fixproto.old	2003-03-21 13:22:12.000000000 -0500
+++ fixproto	2003-03-21 13:23:17.000000000 -0500
@@ -279,7 +279,7 @@
 # a <dummy> source directory at the end.  FIXME!
 
 # All the headers we create define size_t and NULL.
-for rel_source_file in unistd.h stdlib.h ; do
+for rel_source_file in unistd.h stdlib.h string.h ; do
   if grep "$rel_source_file" fixproto.list >/dev/null ; then
     : # It exists, we don't need to make it
   else


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]