diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-05 18:58:18 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-05-05 18:58:18 +0200 |
commit | 339f4f62c608b822be040a4862574e614dd3072b (patch) | |
tree | c04d48591feb69abc16d0c28cf0c412206af5fe8 /odb/gcc.hxx | |
parent | 858355cc3a7457f335a1d8bfd5c29a6baf191b1e (diff) |
Handle GCC 4. compiled with C and C++ compilers
Diffstat (limited to 'odb/gcc.hxx')
-rw-r--r-- | odb/gcc.hxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/odb/gcc.hxx b/odb/gcc.hxx index 89270b3..5290d7a 100644 --- a/odb/gcc.hxx +++ b/odb/gcc.hxx @@ -18,7 +18,18 @@ #include <bversion.h> +// GCC 4.7 can be built using either C or C++ compiler. +// #if BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR <= 6 +# define ODB_GCC_PLUGIN_C +#else +# include <config.h> +# ifndef ENABLE_BUILD_WITH_CXX +# define ODB_GCC_PLUGIN_C +# endif +#endif + +#ifdef ODB_GCC_PLUGIN_C extern "C" { #endif @@ -48,7 +59,7 @@ extern "C" #include <diagnostic.h> #include <output.h> -#if BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR <= 6 +#ifdef ODB_GCC_PLUGIN_C } // extern "C" #endif |