Skip to content

Commit c554bf8

Browse files
committed
Fix definition of "errcode" for MSVC.
Hiroshi Saito
1 parent 2392cdb commit c554bf8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/include/c.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $PostgreSQL: pgsql/src/include/c.h,v 1.208 2006/07/29 17:35:07 momjian Exp $
15+
* $PostgreSQL: pgsql/src/include/c.h,v 1.209 2006/08/08 18:49:14 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -60,11 +60,9 @@
6060

6161
#if defined(_MSC_VER) || defined(__BORLANDC__)
6262
#define WIN32_ONLY_COMPILER
63-
#define errcode __vc_errcode
6463
#if defined(__BORLANDC__) || (_MSC_VER > 1400)
6564
#include <crtdefs.h>
6665
#endif
67-
#undef errcode
6866
#endif
6967

7068
#include <stdio.h>

src/include/port/win32.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.54 2006/07/30 01:45:21 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.55 2006/08/08 18:49:14 momjian Exp $ */
22

33
/* undefine and redefine after #include */
44
#undef mkdir
@@ -262,6 +262,9 @@ typedef unsigned short mode_t;
262262
#define inline __inline
263263
#define __inline__ __inline
264264

265+
#undef errcode
266+
#define errcode __vc_errcode
267+
265268
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
266269
#define _S_IXUSR _S_IEXEC
267270
#define _S_IWUSR _S_IWRITE

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