Opened 4 years ago

Last modified 8 months ago

#10534 new Bugs

'WSASocketA': Use WSASocketW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS

Reported by: Valentin Shtronda <valiko.ua@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.56.0 Severity: Problem
Keywords: WSASocketA WSASocketW _WINSOCK_DEPRECATED_NO_WARNINGS Cc: nilsgladitz@…

Description

With msvc-12.0 toolset (VS2013 Update 3):

boost_1_56_0\boost/asio/detail/impl/socket_ops.ipp(1363): warning C4996: 'WSASocketA': Use WSASocketW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings

which leads to build failure if 'treat warnings as errors' option is on.

Attachments (2)

socket.rar (1.7 KB) - added by kosp51@… 4 years ago.
mini.cpp (1.8 KB) - added by 736324849@… 2 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by kosp51@…

Attachment: socket.rar added

comment:1 Changed 4 years ago by nilsgladitz@…

Cc: nilsgladitz@… added

Additional warnings (in the same scope) related to warning C4996 and _WINSOCK_DEPRECATED_NO_WARNINGS that I see are:

  • 'WSAAddressToStringA': Use WSAAddressToStringW() instead...
  • 'WSAStringToAddressA': Use WSAStringToAddressW() instead...
  • 'gethostbyaddr': Use getnameinfo() or GetNameInfoW() instead...
  • 'inet_addr': Use inet_pton() or InetPton() instead...
  • 'inet_addr': Use inet_pton() or InetPton() instead...

Changed 2 years ago by 736324849@…

Attachment: mini.cpp added

comment:2 Changed 8 months ago by anonymous

烦死哒

Note: See TracTickets for help on using tickets.