aboutsummaryrefslogtreecommitdiff
path: root/src/include/port/win32.h
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2017-04-11 15:21:25 +0200
committerMagnus Hagander <magnus@hagander.net>2017-04-11 15:22:21 +0200
commita4777f35565b80ae10605d6d417e5d173156f7da (patch)
tree91b191a40437fd4d98a163bb4ce0f6ad8a3c8aff /src/include/port/win32.h
parent6da56f3f84d430671d5edd8f9336bd744c089e31 (diff)
downloadpostgresql-a4777f35565b80ae10605d6d417e5d173156f7da.tar.gz
postgresql-a4777f35565b80ae10605d6d417e5d173156f7da.zip
Remove symbol WIN32_ONLY_COMPILER
This used to mean "Visual C++ except in those parts where Borland C++ was supported where it meant one of those". Now that we don't support Borland C++ anymore, simplify by using _MSC_VER which is the normal way to detect Visual C++.
Diffstat (limited to 'src/include/port/win32.h')
-rw-r--r--src/include/port/win32.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/include/port/win32.h b/src/include/port/win32.h
index 8cc619f6847..0debb3b3f42 100644
--- a/src/include/port/win32.h
+++ b/src/include/port/win32.h
@@ -1,9 +1,5 @@
/* src/include/port/win32.h */
-#if defined(_MSC_VER)
-#define WIN32_ONLY_COMPILER
-#endif
-
/*
* Make sure _WIN32_WINNT has the minimum required value.
* Leave a higher value in place. When building with at least Visual
@@ -43,7 +39,7 @@
* The Mingw64 headers choke if this is already defined - they
* define it themselves.
*/
-#if !defined(__MINGW64_VERSION_MAJOR) || defined(WIN32_ONLY_COMPILER)
+#if !defined(__MINGW64_VERSION_MAJOR) || defined(_MSC_VER)
#define _WINSOCKAPI_
#endif
#include <winsock2.h>
@@ -233,7 +229,7 @@ int setitimer(int which, const struct itimerval * value, struct itimerval * ov
* with 64-bit offsets.
*/
#define pgoff_t __int64
-#ifdef WIN32_ONLY_COMPILER
+#ifdef _MSC_VER
#define fseeko(stream, offset, origin) _fseeki64(stream, offset, origin)
#define ftello(stream) _ftelli64(stream)
#else
@@ -256,7 +252,7 @@ typedef int gid_t;
#endif
typedef long key_t;
-#ifdef WIN32_ONLY_COMPILER
+#ifdef _MSC_VER
typedef int pid_t;
#endif
@@ -416,7 +412,7 @@ extern int pgwin32_is_admin(void);
#define unsetenv(x) pgwin32_unsetenv(x)
/* Things that exist in MingW headers, but need to be added to MSVC */
-#ifdef WIN32_ONLY_COMPILER
+#ifdef _MSC_VER
#ifndef _WIN64
typedef long ssize_t;
@@ -446,7 +442,7 @@ typedef unsigned short mode_t;
/* Pulled from Makefile.port in mingw */
#define DLSUFFIX ".dll"
-#endif /* WIN32_ONLY_COMPILER */
+#endif /* _MSC_VER */
/* These aren't provided by either MingW or MSVC */
#define S_IRGRP 0