]> granicus.if.org Git - postgresql/commitdiff
#undef const, inline, signed, volatile, on the expectation that a C++
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Apr 2000 01:00:16 +0000 (01:00 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Apr 2000 01:00:16 +0000 (01:00 +0000)
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++.

src/interfaces/libpq++/libpq++.h
src/interfaces/libpq++/pgconnection.h

index 493e2465a94ec6cff2c09f2b5d77c3a572a3aa86..13fdcf0af6b469e864bd68a0bcfb7d87a0f0d334 100644 (file)
@@ -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
index d010caa6528c12c756eb3e488f5d217531e7b796..1c5be0f5888048926a7b80df35a41575d71c78b3 100644 (file)
@@ -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