diff options
author | Magnus Hagander <magnus@hagander.net> | 2017-04-11 15:21:25 +0200 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2017-04-11 15:22:21 +0200 |
commit | a4777f35565b80ae10605d6d417e5d173156f7da (patch) | |
tree | 91b191a40437fd4d98a163bb4ce0f6ad8a3c8aff /src/include | |
parent | 6da56f3f84d430671d5edd8f9336bd744c089e31 (diff) |
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')
-rw-r--r-- | src/include/getaddrinfo.h | 2 | ||||
-rw-r--r-- | src/include/libpq/libpq-be.h | 4 | ||||
-rw-r--r-- | src/include/port.h | 2 | ||||
-rw-r--r-- | src/include/port/atomics.h | 2 | ||||
-rw-r--r-- | src/include/port/atomics/arch-x86.h | 4 | ||||
-rw-r--r-- | src/include/port/win32.h | 14 | ||||
-rw-r--r-- | src/include/storage/s_lock.h | 2 |
7 files changed, 13 insertions, 17 deletions
diff --git a/src/include/getaddrinfo.h b/src/include/getaddrinfo.h index b24afc57d53..c5595142a5e 100644 --- a/src/include/getaddrinfo.h +++ b/src/include/getaddrinfo.h @@ -40,7 +40,7 @@ #define EAI_MEMORY (-10) #define EAI_SYSTEM (-11) #else /* WIN32 */ -#ifdef WIN32_ONLY_COMPILER +#ifdef _MSC_VER #ifndef WSA_NOT_ENOUGH_MEMORY #define WSA_NOT_ENOUGH_MEMORY (WSAENOBUFS) #endif diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h index 2d438152382..0669b924cf2 100644 --- a/src/include/libpq/libpq-be.h +++ b/src/include/libpq/libpq-be.h @@ -38,14 +38,14 @@ * that doesn't match the msvc build. It gives a bunch of compiler warnings that we ignore, * but also defines a symbol that simply does not exist. Undefine it again. */ -#ifdef WIN32_ONLY_COMPILER +#ifdef _MSC_VER #undef HAVE_GETADDRINFO #endif #endif /* ENABLE_GSS */ #ifdef ENABLE_SSPI #define SECURITY_WIN32 -#if defined(WIN32) && !defined(WIN32_ONLY_COMPILER) +#if defined(WIN32) && !defined(_MSC_VER) #include <ntsecapi.h> #endif #include <security.h> diff --git a/src/include/port.h b/src/include/port.h index f9635533ea5..c6937e58a8f 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -231,7 +231,7 @@ extern int pgrename(const char *from, const char *to); extern int pgunlink(const char *path); /* Include this first so later includes don't see these defines */ -#ifdef WIN32_ONLY_COMPILER +#ifdef _MSC_VER #include <io.h> #endif diff --git a/src/include/port/atomics.h b/src/include/port/atomics.h index a6ef0f0f6ae..89eb522637a 100644 --- a/src/include/port/atomics.h +++ b/src/include/port/atomics.h @@ -96,7 +96,7 @@ /* gcc or compatible, including clang and icc */ #elif defined(__GNUC__) || defined(__INTEL_COMPILER) #include "port/atomics/generic-gcc.h" -#elif defined(WIN32_ONLY_COMPILER) +#elif defined(_MSC_VER) #include "port/atomics/generic-msvc.h" #elif defined(__hpux) && defined(__ia64) && !defined(__GNUC__) #include "port/atomics/generic-acc.h" diff --git a/src/include/port/atomics/arch-x86.h b/src/include/port/atomics/arch-x86.h index 363d9680cb1..bf8152573dd 100644 --- a/src/include/port/atomics/arch-x86.h +++ b/src/include/port/atomics/arch-x86.h @@ -113,14 +113,14 @@ pg_spin_delay_impl(void) { __asm__ __volatile__(" rep; nop \n"); } -#elif defined(WIN32_ONLY_COMPILER) && defined(__x86_64__) +#elif defined(_MSC_VER) && defined(__x86_64__) #define PG_HAVE_SPIN_DELAY static __forceinline void pg_spin_delay_impl(void) { _mm_pause(); } -#elif defined(WIN32_ONLY_COMPILER) +#elif defined(_MSC_VER) #define PG_HAVE_SPIN_DELAY static __forceinline void pg_spin_delay_impl(void) 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 diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index 1ac56ccbb12..bbf505e246f 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -833,7 +833,7 @@ extern slock_t pg_atomic_cas(volatile slock_t *lock, slock_t with, #endif -#ifdef WIN32_ONLY_COMPILER +#ifdef _MSC_VER typedef LONG slock_t; #define HAS_TEST_AND_SET |