mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Define _WINSOCK_DEPRECATED_NO_WARNINGS in all MSVC builds.
Commit0fb54de9athought that this was only needed in VS2015 and later, but buildfarm member woodlouse shows that at least VS2013 whines as well. Let's just define it regardless of MSVC version; it should be harmless enough in older releases. Also, in the wake ofed9b3606d, it seems better to put it in win32_port.h where <winsock2.h> is included. Since this is only suppressing a pedantic compiler warning, I don't feel a need for a back-patch. Discussion: https://postgr.es/m/20124.1510850225@sss.pgh.pa.us
This commit is contained in:
@@ -27,6 +27,14 @@
|
||||
|
||||
#undef ERROR
|
||||
|
||||
/*
|
||||
* VS2013 and later issue warnings about using the old Winsock API,
|
||||
* which we don't really want to hear about.
|
||||
*/
|
||||
#ifdef _MSC_VER
|
||||
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The MinGW64 headers choke if this is already defined - they
|
||||
* define it themselves.
|
||||
|
||||
Reference in New Issue
Block a user