Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff2d435

Browse files
committed
Define _WINSOCK_DEPRECATED_NO_WARNINGS in all MSVC builds.
Commit0fb54de thought that this was only needed in VS2015 and later,but buildfarm member woodlouse shows that at least VS2013 whines aswell. Let's just define it regardless of MSVC version; it should beharmless enough in older releases.Also, in the wake ofed9b360, it seems better to put it in win32_port.hwhere <winsock2.h> is included.Since this is only suppressing a pedantic compiler warning, I don'tfeel a need for a back-patch.Discussion:https://postgr.es/m/20124.1510850225@sss.pgh.pa.us
1 parent98d54bb commitff2d435

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

‎src/include/port/win32.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@
1515
* Studio 2015 the minimum requirement is Windows Vista (0x0600) to
1616
* get support for GetLocaleInfoEx() with locales. For everything else
1717
* the minimum version is Windows XP (0x0501).
18-
* Also for VS2015, add a define that stops compiler complaints about
19-
* using the old Winsock API.
2018
*/
2119
#if defined(_MSC_VER)&&_MSC_VER >=1900
22-
#define_WINSOCK_DEPRECATED_NO_WARNINGS
2320
#defineMIN_WINNT 0x0600
2421
#else
2522
#defineMIN_WINNT 0x0501

‎src/include/port/win32_port.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727

2828
#undef ERROR
2929

30+
/*
31+
* VS2013 and later issue warnings about using the old Winsock API,
32+
* which we don't really want to hear about.
33+
*/
34+
#ifdef_MSC_VER
35+
#define_WINSOCK_DEPRECATED_NO_WARNINGS
36+
#endif
37+
3038
/*
3139
* The MinGW64 headers choke if this is already defined - they
3240
* define it themselves.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp