diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-04-14 01:00:16 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-04-14 01:00:16 +0000 |
commit | 87ca3bd294902d5e51073815f41fffa7fc54da67 (patch) | |
tree | 7a4c483947a4403095ab6f5bc0224207e3d0d085 /src | |
parent | 07672d4e0ae887d4b06bdd01b03bbe64e8163bdf (diff) |
#undef const, inline, signed, volatile, on the expectation that a C++
compiler will understand them. configure may have #define'd them to
empty because the local C compiler doesn't understand them, but this
may very well cause a C++ compilation to fail, so don't do it in C++.
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/libpq++/libpq++.h | 10 | ||||
-rw-r--r-- | src/interfaces/libpq++/pgconnection.h | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/interfaces/libpq++/libpq++.h b/src/interfaces/libpq++/libpq++.h index 493e2465a94..13fdcf0af6b 100644 --- a/src/interfaces/libpq++/libpq++.h +++ b/src/interfaces/libpq++/libpq++.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: libpq++.h,v 1.7 2000/03/30 05:30:42 tgl Exp $ + * $Id: libpq++.h,v 1.8 2000/04/14 01:00:16 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -25,6 +25,14 @@ extern "C" { #include "config.h" } +/* We assume that the C++ compiler will have these keywords, even though + * config.h may have #define'd them to empty because C compiler doesn't. + */ +#undef const +#undef inline +#undef signed +#undef volatile + #ifdef HAVE_CXX_STRING_HEADER #include <string> #endif diff --git a/src/interfaces/libpq++/pgconnection.h b/src/interfaces/libpq++/pgconnection.h index d010caa6528..1c5be0f5888 100644 --- a/src/interfaces/libpq++/pgconnection.h +++ b/src/interfaces/libpq++/pgconnection.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pgconnection.h,v 1.5 2000/03/30 05:30:42 tgl Exp $ + * $Id: pgconnection.h,v 1.6 2000/04/14 01:00:16 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -25,6 +25,14 @@ extern "C" { #include "config.h" } +/* We assume that the C++ compiler will have these keywords, even though + * config.h may have #define'd them to empty because C compiler doesn't. + */ +#undef const +#undef inline +#undef signed +#undef volatile + #ifdef HAVE_CXX_STRING_HEADER #include <string> #endif |