1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-24 01:29:19 +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

@@ -489,18 +489,6 @@ typedef unsigned short mode_t;
#define W_OK 2
#define R_OK 4
/*
* isinf() and isnan() should per spec be in <math.h>, but MSVC older than
* 2013 does not have them there. It does have _fpclass() and _isnan(), but
* they're in <float.h>, so include that here even though it means float.h
* percolates to our whole tree. Recent versions don't require any of this.
*/
#if (_MSC_VER < 1800)
#include <float.h>
#define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || (_fpclass(x) == _FPCLASS_NINF))
#define isnan(x) _isnan(x)
#endif
/* Pulled from Makefile.port in MinGW */
#define DLSUFFIX ".dll"