Comments

Hi,
unfortunately VMS doesn't like to include complex.h after math.h, while the reverse is allowed.
The reason is that math.h (unless ANSI_C_SOURCE is defined but that hides many math functions) declares cabs/cabsf/cabsl for a structure representing a complex number, which is not compatible with the declarations in complex.h
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.
Tested by building gfortran for x86_64-darwin and ia64-hp-openvms.
Ok for trunk ?
Tristan.
libgfortran/
2012-04-03 Tristan Gingold <gingold@adacore.com>
* libgfortran.h: Include complex.h before math.h

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.