Compiling anything that uses InvalidOid under g++ yields a warning about
authorBruce Momjian
Tue, 18 Mar 2003 17:21:07 +0000 (17:21 +0000)
committerBruce Momjian
Tue, 18 Mar 2003 17:21:07 +0000 (17:21 +0000)
the expression using an "old-style cast."  Therefore, would it be okay
to patch postgres_ext.h as follows:

Jeroen T. Vermeulen

src/include/postgres_ext.h

index d4e5b4ebbfacc252042f3e3735a543c6bd382646..b252453bbff4cc35f695e10f16e8a33f00dcb96d 100644 (file)
@@ -15,7 +15,7 @@
  * use header files that are otherwise internal to Postgres to interface
  * with the backend.
  *
- * $Id: postgres_ext.h,v 1.11 2002/08/13 20:40:44 momjian Exp $
+ * $Id: postgres_ext.h,v 1.12 2003/03/18 17:21:07 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
  */
 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  to use the above #define */