diff --git a/src/include/c.h b/src/include/c.h index f66c752d4a0..5b678283469 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -82,6 +82,14 @@ #endif #ifdef ENABLE_NLS #include +#endif + +#ifdef __cplusplus +extern "C++" +{ +/* This header is used in the definition of various C++ things below. */ +#include +} #endif /* Pull in fundamental symbols that we also expose to applications */ @@ -435,6 +443,7 @@ * [1]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2927.htm#existing-decltype */ #if defined(__cplusplus) +#undef typeof #ifdef pg_cxx_typeof #define typeof(x) pg_cxx_typeof(x) #elif !defined(HAVE_CXX_TYPEOF)