Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6cf8ce1

Browse files
committed
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
1 parent 526de7f commit 6cf8ce1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/include/postgres_ext.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* use header files that are otherwise internal to Postgres to interface
1616
* with the backend.
1717
*
18-
* $Id: postgres_ext.h,v 1.11 2002/08/13 20:40:44 momjian Exp $
18+
* $Id: postgres_ext.h,v 1.12 2003/03/18 17:21:07 momjian Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -28,7 +28,11 @@
2828
*/
2929
typedef unsigned int Oid;
3030

31+
#ifdef __cplusplus
32+
#define InvalidOid (Oid(0))
33+
#else
3134
#define InvalidOid ((Oid) 0)
35+
#endif
3236

3337
#define OID_MAX UINT_MAX
3438
/* you will need to include <limits.h> to use the above #define */

0 commit comments

Comments
 (0)