Commit 6cf8ce13 authored by Bruce Momjian's avatar Bruce Momjian

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
parent 526de7ff
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* use header files that are otherwise internal to Postgres to interface * use header files that are otherwise internal to Postgres to interface
* with the backend. * 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 $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -28,7 +28,11 @@ ...@@ -28,7 +28,11 @@
*/ */
typedef unsigned int Oid; typedef unsigned int Oid;
#ifdef __cplusplus
#define InvalidOid (Oid(0))
#else
#define InvalidOid ((Oid) 0) #define InvalidOid ((Oid) 0)
#endif
#define OID_MAX UINT_MAX #define OID_MAX UINT_MAX
/* you will need to include <limits.h> to use the above #define */ /* you will need to include <limits.h> to use the above #define */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment