diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 0afe589e6b3..93e9117d956 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2012-04-04 Tristan Gingold + + * libgfortran.h: Include complex.h before math.h + 2012-04-02 Tristan Gingold * configure.ac: Use new version of GCC_CHECK_MATH_FUNC. diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index be5f133bb83..ea20e140c46 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 -#include #include #include #include +#if HAVE_COMPLEX_H +/* Must appear before math.h on VMS systems. */ +# include +#else +#define complex __complex__ +#endif + +#include + /* 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 -#else -#define complex __complex__ -#endif - #include "../gcc/fortran/libgfortran.h" #include "c99_protos.h"