]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgfortran.h: Include complex.h before math.h
authorTristan Gingold <gingold@adacore.com>
Wed, 4 Apr 2012 07:46:53 +0000 (07:46 +0000)
committerTristan Gingold <gingold@gcc.gnu.org>
Wed, 4 Apr 2012 07:46:53 +0000 (07:46 +0000)
2012-04-04  Tristan Gingold  <gingold@adacore.com>

        * libgfortran.h: Include complex.h before math.h

From-SVN: r186131

libgfortran/ChangeLog
libgfortran/libgfortran.h

index 0afe589e6b3adc500c42668efabb55f0beec32ee..93e9117d9569f8fac74a9811218bab8d7f6c26d8 100644 (file)
@@ -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.
index be5f133bb836f9949bb2ef6ff7fd6ae83be1afcd..ea20e140c4605113b4be3fe8d6059874c0ec7227 100644 (file)
@@ -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"