Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6c06bc2

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 theANSI C standard, as well as in practice on some platforms.
1 parentdad34ba commit6c06bc2

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-
#defineDECLARE_INDEX(x) extern interrno
102-
#defineDECLARE_UNIQUE_INDEX(x) extern interrno
101+
#defineDECLARE_INDEX(x) extern intno_such_variable
102+
#defineDECLARE_UNIQUE_INDEX(x) extern intno_such_variable
103103
#defineBUILD_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
#defineBKI_WITHOUT_OIDS
540540

541541
/* these need to expand into some harmless, repeatable declaration */
542-
#defineDATA(x) extern interrno
543-
#defineDESCR(x) extern interrno
542+
#defineDATA(x) extern intno_such_variable
543+
#defineDESCR(x) extern intno_such_variable
544544

545545
#defineBKI_BEGIN
546546
#defineBKI_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
#ifndefdTHR
180-
#ifdefWIN32
181-
#definedTHR extern int Perl___notused
182-
#else
183-
#definedTHR extern int errno
184-
#endif
180+
#definedTHR extern int no_such_variable
185181
#endif
186182

187183
#ifndefboolSV

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp