Commit 6c06bc26 authored by Tom Lane's avatar Tom Lane

Make 'dummy' declarations in header files be 'extern int no_such_variable'

instead of 'extern int errno'; the latter is unsafe according to the
ANSI C standard, as well as in practice on some platforms.
parent dad34ba5
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: indexing.h,v 1.75 2002/09/04 20:31:37 momjian Exp $ * $Id: indexing.h,v 1.76 2002/10/18 20:33:57 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -98,8 +98,8 @@ extern void CatalogUpdateIndexes(Relation heapRel, HeapTuple heapTuple); ...@@ -98,8 +98,8 @@ extern void CatalogUpdateIndexes(Relation heapRel, HeapTuple heapTuple);
* These macros are just to keep the C compiler from spitting up on the * These macros are just to keep the C compiler from spitting up on the
* upcoming commands for genbki.sh. * upcoming commands for genbki.sh.
*/ */
#define DECLARE_INDEX(x) extern int errno #define DECLARE_INDEX(x) extern int no_such_variable
#define DECLARE_UNIQUE_INDEX(x) extern int errno #define DECLARE_UNIQUE_INDEX(x) extern int no_such_variable
#define BUILD_INDICES #define BUILD_INDICES
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1995, Regents of the University of California * Portions Copyright (c) 1995, Regents of the University of California
* *
* $Id: postgres.h,v 1.61 2002/09/04 20:31:36 momjian Exp $ * $Id: postgres.h,v 1.62 2002/10/18 20:33:57 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -539,8 +539,8 @@ extern int ExceptionalCondition(char *conditionName, char *errorType, ...@@ -539,8 +539,8 @@ extern int ExceptionalCondition(char *conditionName, char *errorType,
#define BKI_WITHOUT_OIDS #define BKI_WITHOUT_OIDS
/* these need to expand into some harmless, repeatable declaration */ /* these need to expand into some harmless, repeatable declaration */
#define DATA(x) extern int errno #define DATA(x) extern int no_such_variable
#define DESCR(x) extern int errno #define DESCR(x) extern int no_such_variable
#define BKI_BEGIN #define BKI_BEGIN
#define BKI_END #define BKI_END
......
...@@ -177,11 +177,7 @@ __DATA__ ...@@ -177,11 +177,7 @@ __DATA__
#endif #endif
#ifndef dTHR #ifndef dTHR
#ifdef WIN32 #define dTHR extern int no_such_variable
#define dTHR extern int Perl___notused
#else
#define dTHR extern int errno
#endif
#endif #endif
#ifndef boolSV #ifndef boolSV
......
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