@@ -1,5 +1,11 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+
+ #ifdef LIBGOMP_H
+ # error Must not #include "config.h" after #include "libgomp.h".
+ #endif
+
+
/* Define to 1 if the target assembler supports .symver directive. */
#undef HAVE_AS_SYMVER_DIRECTIVE
@@ -2592,6 +2592,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers config.h"
+
# -------
# Options
# -------
@@ -11145,7 +11146,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11148 "configure"
+#line 11149 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11251,7 +11252,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11254 "configure"
+#line 11255 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -4,6 +4,11 @@
AC_PREREQ(2.64)
AC_INIT([GNU Offloading and Multi Processing Runtime Library], 1.0,,[libgomp])
AC_CONFIG_HEADER(config.h)
+AH_TOP([
+ #ifdef LIBGOMP_H
+ # error Must not #include "config.h" after #include "libgomp.h".
+ #endif
+])
# -------
# Options
@@ -33,7 +33,12 @@
that are part of the external ABI, and the lower case prefix "gomp"
is used group items that are completely private to the library. */
-#ifndef LIBGOMP_H
+#ifndef LIBGOMP_H
+/* We #include "config.h" early, before we #define LIBGOMP_H, so that we can
+ use the latter to check in "config.h" that it's not being included again,
+ which might conflict with configuration changes done further down in
+ libgomp.h. */
+#include "config.h"
#define LIBGOMP_H 1
#ifndef _LIBGOMP_CHECKING_
@@ -41,7 +46,6 @@
#define _LIBGOMP_CHECKING_ 0
#endif
-#include "config.h"
#include "gstdint.h"
#include "libgomp-plugin.h"
@@ -26,9 +26,8 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-#include "openacc.h"
-#include "config.h"
#include "libgomp.h"
+#include "openacc.h"
#include "oacc-int.h"
void *
@@ -38,8 +38,8 @@
#ifndef OACC_INT_H
#define OACC_INT_H 1
+#include "libgomp.h"
#include "openacc.h"
-#include "config.h"
#include <stddef.h>
#include <stdbool.h>
#include <stdarg.h>
@@ -26,9 +26,8 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-#include "openacc.h"
-#include "config.h"
#include "libgomp.h"
+#include "openacc.h"
#include "gomp-constants.h"
#include "oacc-int.h"
#include <stdint.h>
@@ -31,8 +31,8 @@
is not clear as to what that state might be. Or how one might
propagate it from one thread to another. */
+#include "libgomp.h"
#include "openacc.h"
-#include "config.h"
#include "libgomp-plugin.h"
#include "oacc-plugin.h"
#include "gomp-constants.h"
@@ -25,7 +25,6 @@
/* This file contains the support of offloading. */
-#include "config.h"
#include "libgomp.h"
#include "oacc-plugin.h"
#include "oacc-int.h"