diff options
author | Andres Freund | 2015-08-07 23:19:02 +0000 |
---|---|---|
committer | Andres Freund | 2015-08-07 23:19:02 +0000 |
commit | 5a33650f24f9ad67a22c0f8a98c132c75034cfbf (patch) | |
tree | 7a9e54c4188e6c6ac5fdf3689fa3ade8c48d6e58 /src/include/c.h | |
parent | c2509944b1a090d64a4a18dcd524ff63ee0f0212 (diff) |
Attempt to work around a 32bit xlc compiler bug from a different place.
In de6fd1c8 I moved the the work around from 53f73879 into the aix
template. The previous location was removed in the former commit, and I
thought that it would be nice to emit a warning when running configure.
That didn't turn out to work because at the point the template is
included we don't know whether we're compiling a 32/64 bit binary and
it's possible to install compilers for both on a 64 bit kernel/OS.
So go back to a less ambitious approach and define
PG_FORCE_DISABLE_INLINE in port/aix.h, without emitting a warning. We
could try a more fancy approach, but it doesn't seem worth it.
This requires moving the check for PG_FORCE_DISABLE_INLINE in c.h to
after including the system headers included from therein which isn't
perfect, as it seems slightly more robust to include all system headers
in a similar environment. Oh well.
Discussion: 20150807132000.GC13310@awork2.anarazel.de
Diffstat (limited to 'src/include/c.h')
-rw-r--r-- | src/include/c.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/include/c.h b/src/include/c.h index e84c77460c0..b719eb95e14 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -54,20 +54,6 @@ #include "pg_config_manual.h" /* must be after pg_config.h */ /* - * Force disable inlining if PG_FORCE_DISABLE_INLINE is defined. This is used - * to work around compiler bugs and might also be useful for investigatory - * purposes. - * - * This is done early (in slightly the wrong section) for two reasons: a) we - * don't want to include headers with different settings of this b) - * functionality later in this file might want to rely on inline functions. - */ -#ifdef PG_FORCE_DISABLE_INLINE -#undef inline -#define inline -#endif - -/* * We always rely on the WIN32 macro being set by our build system, * but _WIN32 is the compiler pre-defined macro. So make sure we define * WIN32 whenever _WIN32 is set, to facilitate standalone building. @@ -115,6 +101,19 @@ #include "pg_config_os.h" #endif +/* + * Force disable inlining if PG_FORCE_DISABLE_INLINE is defined. This is used + * to work around compiler bugs and might also be useful for investigatory + * purposes by defining the symbol in the platform's header.. + * + * This is done early (in slightly the wrong section) as functionality later + * in this file might want to rely on inline functions. + */ +#ifdef PG_FORCE_DISABLE_INLINE +#undef inline +#define inline +#endif + /* Must be before gettext() games below */ #include <locale.h> |