[fortran,patch] Creating a common header to the front-end and runtime library

David Edelsohn dje@watson.ibm.com
Wed Sep 5 17:41:00 GMT 2007


	This patch broke libgfortran on AIX.  We are repeating the same
problem as before: config.h affects system headers but is include too
late.

	This patch gets farther along, but other files are broken.


	* libgfortran.h: Include config.h first.

Index: libgfortran.h
===================================================================
--- libgfortran.h	(revision 128130)
+++ libgfortran.h	(working copy)
@@ -31,6 +31,9 @@
 #ifndef LIBGFOR_H
 #define LIBGFOR_H
 
+/* config.h MUST be first because it can affect system headers.  */
+#include "config.h"
+
 #include <stdio.h>
 #include <math.h>
 #include <stddef.h>
@@ -45,7 +48,6 @@
 
 #include "../gcc/fortran/libgfortran.h"
 
-#include "config.h"
 #include "c99_protos.h"
 
 #if HAVE_IEEEFP_H



More information about the Gcc-patches mailing list