summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2003-03-18 17:21:07 +0000
committerBruce Momjian2003-03-18 17:21:07 +0000
commit4869354277d6dea0cffd82b4173706a98b7b3e8e (patch)
tree7c495292d3b189dca7b92232e5a443ecf64c2234
parenta157b80fcbe17a9770f86f7ae876243285787127 (diff)
Compiling anything that uses InvalidOid under g++ yields a warning about
the expression using an "old-style cast." Therefore, would it be okay to patch postgres_ext.h as follows: Jeroen T. Vermeulen
-rw-r--r--src/include/postgres_ext.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h
index 6690e22f52..13c7dd2363 100644
--- a/src/include/postgres_ext.h
+++ b/src/include/postgres_ext.h
@@ -28,7 +28,11 @@
*/
typedef unsigned int Oid;
+#ifdef __cplusplus
+#define InvalidOid (Oid(0))
+#else
#define InvalidOid ((Oid) 0)
+#endif
#define OID_MAX UINT_MAX
/* you will need to include <limits.h> to use the above #define */