aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-10-03 20:33:20 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-10-03 20:33:20 +0000
commit0184c6835cb99057f3d99f4b5a62965221e2bf13 (patch)
tree6a7817158d4e7cff55588796236650fe41ca7209
parent878f32feab51f5d2968ea27d4ab84653fe397777 (diff)
downloadpostgresql-0184c6835cb99057f3d99f4b5a62965221e2bf13.tar.gz
postgresql-0184c6835cb99057f3d99f4b5a62965221e2bf13.zip
Rearrange MSVC errcode hack, fix incorrect _MSC_VER test. Magnus
-rw-r--r--src/include/c.h6
-rw-r--r--src/include/port/win32.h5
2 files changed, 5 insertions, 6 deletions
diff --git a/src/include/c.h b/src/include/c.h
index 5904c34e6fa..db9983b4624 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/c.h,v 1.212 2006/10/03 03:59:22 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/c.h,v 1.213 2006/10/03 20:33:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -58,8 +58,10 @@
#include "postgres_ext.h"
#include "pg_trace.h"
-#if defined(__BORLANDC__) || (_MSC_VER > 1400)
+#if defined(__BORLANDC__) || (_MSC_VER >= 1400)
+#define errcode __msvc_errcode
#include <crtdefs.h>
+#undef errcode
#endif
#include <stdio.h>
diff --git a/src/include/port/win32.h b/src/include/port/win32.h
index 1216f3ac6e3..f5e17aae3ec 100644
--- a/src/include/port/win32.h
+++ b/src/include/port/win32.h
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.60 2006/10/03 03:59:22 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.61 2006/10/03 20:33:20 tgl Exp $ */
#if defined(_MSC_VER) || defined(__BORLANDC__)
#define WIN32_ONLY_COMPILER
@@ -272,9 +272,6 @@ typedef unsigned short mode_t;
#define inline __inline
#define __inline__ __inline
-#undef errcode
-#define errcode __msvc_errcode
-
#define _S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC)
#define _S_IXUSR _S_IEXEC
#define _S_IWUSR _S_IWRITE