[PATCH/RFA] Fix Fortran build on NetBSD

Jason R Thorpe thorpej@wasabisystems.com
Mon Jun 17 13:56:00 GMT 2002


This change:

2002-06-11  Richard Henderson  <rth@redhat.com>

        .
        .
        .

        From Joseph S. Myers:
        * glimits.h: Rewrite to expect the double underscore definitions
        from the compiler.

        .
        .
        .

...broke building on NetBSD using NetBSD's 2.95.3-based system compiler:

gcc -c -DIN_GCC    -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes   -DHAVE_CONFIG_H    -I. -If -I../../../gcc/gcc -I../../../gcc/gcc/f -I../../../gcc/gcc/config -I../../../gcc/gcc/../include ../../../gcc/gcc/f/bit.c -o f/bit.o
../../../gcc/gcc/f/bit.c: In function `ffebit_count':
../../../gcc/gcc/f/bit.c:85: `__CHAR_BIT__' undeclared (first use in this function)
../../../gcc/gcc/f/bit.c:85: (Each undeclared identifier is reported only once
../../../gcc/gcc/f/bit.c:85: for each function it appears in.)
.
.
.

This is because f/where.h, f/bit.c, and f/target.c include glimits.h
directly.  They don't appear to need to do so, and are the only files
which do.  The stuff they need will come from the system <limits.h>,
provided by other GCC header files.

OK to commit?

	* bit.c: Don't include glimits.h.
	* target.c: Likewise.
	* where.h: Likewise.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>
-------------- next part --------------
Index: bit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/bit.c,v
retrieving revision 1.5
diff -u -r1.5 bit.c
--- bit.c	21 Jun 2000 20:11:14 -0000	1.5
+++ bit.c	17 Jun 2002 20:19:03 -0000
@@ -31,7 +31,6 @@
 /* Include files. */
 
 #include "proj.h"
-#include "glimits.h"
 #include "bit.h"
 #include "malloc.h"
 
Index: target.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/target.c,v
retrieving revision 1.18
diff -u -r1.18 target.c
--- target.c	28 May 2002 17:33:02 -0000	1.18
+++ target.c	17 Jun 2002 20:19:05 -0000
@@ -69,7 +69,6 @@
 /* Include files. */
 
 #include "proj.h"
-#include "glimits.h"
 #include "target.h"
 #include "diagnostic.h"
 #include "bad.h"
Index: where.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/where.h,v
retrieving revision 1.7
diff -u -r1.7 where.h
--- where.h	26 May 2001 01:31:46 -0000	1.7
+++ where.h	17 Jun 2002 20:19:05 -0000
@@ -61,7 +61,6 @@
 
 /* Include files needed by this one. */
 
-#include "glimits.h"
 #include "top.h"
 
 /* Structure definitions. */


More information about the Gcc-patches mailing list