diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2022-08-03 15:53:41 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2022-08-03 15:53:41 +0200 |
commit | 57c3ca8d51cdf1e9fcf10588c9519fb7b9dcf7e1 (patch) | |
tree | 5a8e332aa7df8a75f94315f0921ff8a03ef9e7ff | |
parent | 741f9a61c624a3a1ec856ae781b97a8c4c36d228 (diff) | |
download | newlib-57c3ca8d51cdf1e9fcf10588c9519fb7b9dcf7e1.zip newlib-57c3ca8d51cdf1e9fcf10588c9519fb7b9dcf7e1.tar.gz newlib-57c3ca8d51cdf1e9fcf10588c9519fb7b9dcf7e1.tar.bz2 |
Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/fhandler_socket_inet.cc | 27 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/version.h | 3 |
2 files changed, 0 insertions, 30 deletions
diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler_socket_inet.cc index a4077e4..63cc498 100644 --- a/winsup/cygwin/fhandler_socket_inet.cc +++ b/winsup/cygwin/fhandler_socket_inet.cc @@ -177,27 +177,6 @@ get_ext_funcptr (SOCKET sock, void *funcptr) &bret, NULL, NULL); } -static int -convert_ws1_ip_optname (int optname) -{ - static int ws2_optname[] = - { - 0, - IP_OPTIONS, - IP_MULTICAST_IF, - IP_MULTICAST_TTL, - IP_MULTICAST_LOOP, - IP_ADD_MEMBERSHIP, - IP_DROP_MEMBERSHIP, - IP_TTL, - IP_TOS, - IP_DONTFRAGMENT - }; - return (optname < 1 || optname > _WS1_IP_DONTFRAGMENT) - ? optname - : ws2_optname[optname]; -} - fhandler_socket_wsock::fhandler_socket_wsock () : fhandler_socket (), wsock_events (NULL), @@ -1832,9 +1811,6 @@ fhandler_socket_inet::setsockopt (int level, int optname, const void *optval, break; case IPPROTO_IP: - /* Old applications still use the old WinSock1 IPPROTO_IP values. */ - if (CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES) - optname = convert_ws1_ip_optname (optname); switch (optname) { case IP_TOS: @@ -2158,9 +2134,6 @@ fhandler_socket_inet::getsockopt (int level, int optname, const void *optval, break; case IPPROTO_IP: - /* Old applications still use the old WinSock1 IPPROTO_IP values. */ - if (CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES) - optname = convert_ws1_ip_optname (optname); break; case IPPROTO_TCP: diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index befc006..83f8c34 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -34,9 +34,6 @@ details. */ #define CYGWIN_VERSION_USER_API_VERSION_COMBINED \ CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED (user_data) -#define CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES \ - (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 138) - #define CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ \ (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 161) |