Skip to content

Commit 0184c68

Browse files
committed
Rearrange MSVC errcode hack, fix incorrect _MSC_VER test. Magnus
1 parent 878f32f commit 0184c68

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/include/c.h

Lines changed: 4 additions & 2 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.212 2006/10/03 03:59:22 momjian Exp $
15+
* $PostgreSQL: pgsql/src/include/c.h,v 1.213 2006/10/03 20:33:20 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -58,8 +58,10 @@
5858
#include "postgres_ext.h"
5959
#include "pg_trace.h"
6060

61-
#if defined(__BORLANDC__) || (_MSC_VER > 1400)
61+
#if defined(__BORLANDC__) || (_MSC_VER >= 1400)
62+
#define errcode __msvc_errcode
6263
#include <crtdefs.h>
64+
#undef errcode
6365
#endif
6466

6567
#include <stdio.h>

src/include/port/win32.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.60 2006/10/03 03:59:22 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.61 2006/10/03 20:33:20 tgl Exp $ */
22

33
#if defined(_MSC_VER) || defined(__BORLANDC__)
44
#define WIN32_ONLY_COMPILER
@@ -272,9 +272,6 @@ typedef unsigned short mode_t;
272272
#define inline __inline
273273
#define __inline__ __inline
274274

275-
#undef errcode
276-
#define errcode __msvc_errcode
277-
278275
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
279276
#define _S_IXUSR _S_IEXEC
280277
#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