From 339f4f62c608b822be040a4862574e614dd3072b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 5 May 2012 18:58:18 +0200 Subject: Handle GCC 4. compiled with C and C++ compilers --- odb/gcc.hxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 +// 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 +# 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 #include -#if BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR <= 6 +#ifdef ODB_GCC_PLUGIN_C } // extern "C" #endif -- cgit v1.1