Skip to content

Commit 6c06bc2

Browse files
committed
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.
1 parent dad34ba commit 6c06bc2

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

src/include/catalog/indexing.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: indexing.h,v 1.75 2002/09/04 20:31:37 momjian Exp $
11+
* $Id: indexing.h,v 1.76 2002/10/18 20:33:57 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -98,8 +98,8 @@ extern void CatalogUpdateIndexes(Relation heapRel, HeapTuple heapTuple);
9898
* These macros are just to keep the C compiler from spitting up on the
9999
* upcoming commands for genbki.sh.
100100
*/
101-
#define DECLARE_INDEX(x) extern int errno
102-
#define DECLARE_UNIQUE_INDEX(x) extern int errno
101+
#define DECLARE_INDEX(x) extern int no_such_variable
102+
#define DECLARE_UNIQUE_INDEX(x) extern int no_such_variable
103103
#define BUILD_INDICES
104104

105105

src/include/postgres.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
1111
* Portions Copyright (c) 1995, Regents of the University of California
1212
*
13-
* $Id: postgres.h,v 1.61 2002/09/04 20:31:36 momjian Exp $
13+
* $Id: postgres.h,v 1.62 2002/10/18 20:33:57 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -539,8 +539,8 @@ extern int ExceptionalCondition(char *conditionName, char *errorType,
539539
#define BKI_WITHOUT_OIDS
540540

541541
/* these need to expand into some harmless, repeatable declaration */
542-
#define DATA(x) extern int errno
543-
#define DESCR(x) extern int errno
542+
#define DATA(x) extern int no_such_variable
543+
#define DESCR(x) extern int no_such_variable
544544

545545
#define BKI_BEGIN
546546
#define BKI_END

src/pl/plperl/ppport.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,7 @@ __DATA__
177177
#endif
178178

179179
#ifndef dTHR
180-
#ifdef WIN32
181-
#define dTHR extern int Perl___notused
182-
#else
183-
#define dTHR extern int errno
184-
#endif
180+
#define dTHR extern int no_such_variable
185181
#endif
186182

187183
#ifndef boolSV

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy