diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-02-05 16:01:42 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-02-05 16:01:42 +0200 |
commit | 511dcf67322ad87fb32f97d1cf7725c129e83898 (patch) | |
tree | cfcbf8705fc208d101b8adbd270a425e7466d518 /odb/gcc-fwd.hxx | |
parent | d1b34452618d36eb486ff18b16f5d94acc6eeb07 (diff) |
Initial work to make ODB compatible with GCC 6
Diffstat (limited to 'odb/gcc-fwd.hxx')
-rw-r--r-- | odb/gcc-fwd.hxx | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/odb/gcc-fwd.hxx b/odb/gcc-fwd.hxx index a120f05..618b106 100644 --- a/odb/gcc-fwd.hxx +++ b/odb/gcc-fwd.hxx @@ -7,6 +7,24 @@ #include <bversion.h> +#if BUILDING_GCC_MAJOR >= 6 + +// If we include <system.h> here, it pulls in all kinds of GCC trouble that +// "poisons" standard C/C++ declarations; see safe-ctype.h. So instead we +// are going to "exclude" safe-ctype.h. To compensate, however, we will +// include it first thing in gcc.hxx. +// +# include <config.h> +# define SAFE_CTYPE_H +# include <system.h> +# undef SAFE_CTYPE_H +# include <coretypes.h> + +typedef unsigned int source_location; // <line-map.h> +typedef source_location location_t; // <input.h> + +#else // GCC < 6 + #if BUILDING_GCC_MAJOR > 4 || BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR > 8 # include <limits.h> // CHAR_BIT # include <config.h> @@ -33,6 +51,9 @@ extern "C" typedef unsigned int source_location; // <line-map.h> typedef source_location location_t; // <input.h> -} + +} // extern "C" + +#endif #endif // ODB_GCC_FWD_HXX |