1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-19 17:02:53 +03:00

Remove some code for old unsupported versions of MSVC

As of d9dd406fe2, we require MSVC 2013,
which means _MSC_VER >= 1800.  This means that conditionals about
older versions of _MSC_VER can be removed or simplified.

Previous code was also in some cases handling MinGW, where _MSC_VER is
not defined at all, incorrectly, such as in pg_ctl.c and win32_port.h,
leading to some compiler warnings.  This should now be handled better.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
This commit is contained in:
Peter Eisentraut
2019-10-08 10:27:30 +02:00
parent a7471bd85c
commit 38d8dce61f
12 changed files with 255 additions and 377 deletions

View File

@@ -63,7 +63,7 @@ extern int float8_cmp_internal(float8 a, float8 b);
* long lived bug in the Microsoft compilers.
* See http://support.microsoft.com/kb/120968/en-us for details
*/
#if (_MSC_VER >= 1800)
#ifdef _MSC_VER
#pragma warning(disable:4756)
#endif
static inline float4
@@ -73,7 +73,7 @@ get_float4_infinity(void)
/* C99 standard way */
return (float4) INFINITY;
#else
#if (_MSC_VER >= 1800)
#ifdef _MSC_VER
#pragma warning(default:4756)
#endif