diff options
author | Tristan Gingold <gingold@adacore.com> | 2012-04-04 07:46:53 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@gcc.gnu.org> | 2012-04-04 07:46:53 +0000 |
commit | 62755fd571f16cf1965126c3f169a36fca0d1bf9 (patch) | |
tree | 70f3b763254fc3f2f4b1fc01d148cab0fdc36b4d | |
parent | 26c4ef3c090102c5445b3cad0cdd5754cca6ec18 (diff) | |
download | gcc-62755fd571f16cf1965126c3f169a36fca0d1bf9.zip gcc-62755fd571f16cf1965126c3f169a36fca0d1bf9.tar.gz gcc-62755fd571f16cf1965126c3f169a36fca0d1bf9.tar.bz2 |
libgfortran.h: Include complex.h before math.h
2012-04-04 Tristan Gingold <gingold@adacore.com>
* libgfortran.h: Include complex.h before math.h
From-SVN: r186131
-rw-r--r-- | libgfortran/ChangeLog | 4 | ||||
-rw-r--r-- | libgfortran/libgfortran.h | 16 |
2 files changed, 13 insertions, 7 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 0afe589..93e9117 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2012-04-04 Tristan Gingold <gingold@adacore.com> + + * libgfortran.h: Include complex.h before math.h + 2012-04-02 Tristan Gingold <gingold@adacore.com> * configure.ac: Use new version of GCC_CHECK_MATH_FUNC. 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" |