This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] improve fixproto 4/3 ;-)
- From: Nathanael Nerode <neroden at twcny dot rr dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 21 Mar 2003 14:05:25 -0500
- Subject: [patch] improve fixproto 4/3 ;-)
In keeping with the comments in
http://gcc.gnu.org/ml/gcc-patches/2001-05/msg00020.html
and follwing, this is 'part 4 of 3', including sys/types.h
before sys/time.h in generated time.h.
If I can get approval, I'll commit all 4 parts at once.
* fixproto: (synthesized time.h) Include sys/types.h before
sys/time.h.
--- fixproto 2003-03-21 13:41:05.000000000 -0500
+++ fixproto.new 2003-03-21 14:02:22.000000000 -0500
@@ -303,7 +303,12 @@
if test -f $src_dir_std/sys/time.h \
|| grep "sys/time.h" fixproto.list >/dev/null ; then
# It does; include it and hope it has the needed declarations.
- echo '#include <sys/time.h>' >>tmp.h
+ # Some versions require sys/types.h.
+ cat >>tmp.h <<EOF
+
+#include <sys/types.h>
+#include <sys/time.h>
+EOF
else
# It doesn't. Make up plausible definitions for time_t, clock_t.
# Forward-declare struct tm. Hope nobody tries to use it. (Odds