Message ID | A484518E-9110-4764-A022-086F3DFB9737@adacore.com |
---|---|
State | New |
Headers | show |
On 04/03/2012 02:42 PM, Tristan Gingold wrote: > The simplest path is simply to reverse the include order in libgfortran.h. I know that this is somewhat VMS specific, and I welcome better ideas. Well, changing the order is not that bad than one has to try hard to find a better solution. (Unless, it fails on other systems with the new order.) > Tested by building gfortran for x86_64-darwin and ia64-hp-openvms. OK. Thanks for the patch. Tobias
On Apr 3, 2012, at 5:53 PM, Tobias Burnus wrote: > > On 04/03/2012 02:42 PM, Tristan Gingold wrote: >> The simplest path is simply to reverse the include order in libgfortran.h. I know that this is somewhat VMS specific, and I welcome better ideas. > > Well, changing the order is not that bad than one has to try hard to find a better solution. (Unless, it fails on other systems with the new order.) I cross my fingers! >> Tested by building gfortran for x86_64-darwin and ia64-hp-openvms. > > OK. Thanks for the patch. You're welcome. This was my latest patch to make gfortran build for VMS. AFAIK, this is now the only post F95 fortran compiler available for VMS, although I suppose it lacks some DEC extensions specific to VMS. Tristan.
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index be5f133..ea20e14 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -42,11 +42,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "config.h" #include <stdio.h> -#include <math.h> #include <stddef.h> #include <float.h> #include <stdarg.h> +#if HAVE_COMPLEX_H +/* Must appear before math.h on VMS systems. */ +# include <complex.h> +#else +#define complex __complex__ +#endif + +#include <math.h> + /* If we're support quad-precision floating-point type, include the header to our support library. */ #ifdef HAVE_FLOAT128 @@ -66,12 +74,6 @@ extern long double __strtold (const char *, char **); #define gfc_strtold strtold #endif -#if HAVE_COMPLEX_H -# include <complex.h> -#else -#define complex __complex__ -#endif - #include "../gcc/fortran/libgfortran.h" #include "c99_protos.h"