From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 23673385BC13; Wed, 3 Aug 2022 14:06:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23673385BC13 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: 741f9a61c624a3a1ec856ae781b97a8c4c36d228 X-Git-Newrev: 57c3ca8d51cdf1e9fcf10588c9519fb7b9dcf7e1 Message-Id: <20220803140605.23673385BC13@sourceware.org> Date: Wed, 3 Aug 2022 14:06:05 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2022 14:06:05 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D57c3ca8d51c= df1e9fcf10588c9519fb7b9dcf7e1 commit 57c3ca8d51cdf1e9fcf10588c9519fb7b9dcf7e1 Author: Corinna Vinschen Date: Wed Aug 3 15:53:41 2022 +0200 Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1= _VALUES =20 Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/fhandler_socket_inet.cc | 27 --------------------------- winsup/cygwin/include/cygwin/version.h | 3 --- 2 files changed, 30 deletions(-) diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler= _socket_inet.cc index a4077e4ec..63cc498f1 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); } =20 -static int -convert_ws1_ip_optname (int optname) -{ - static int ws2_optname[] =3D - { - 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 optn= ame, const void *optval, break; =20 case IPPROTO_IP: - /* Old applications still use the old WinSock1 IPPROTO_IP values. */ - if (CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES) - optname =3D convert_ws1_ip_optname (optname); switch (optname) { case IP_TOS: @@ -2158,9 +2134,6 @@ fhandler_socket_inet::getsockopt (int level, int optn= ame, const void *optval, break; =20 case IPPROTO_IP: - /* Old applications still use the old WinSock1 IPPROTO_IP values. */ - if (CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES) - optname =3D convert_ws1_ip_optname (optname); break; =20 case IPPROTO_TCP: diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include= /cygwin/version.h index befc006bb..83f8c34f6 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) =20 -#define CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES \ - (CYGWIN_VERSION_USER_API_VERSION_COMBINED <=3D 138) - #define CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ \ (CYGWIN_VERSION_USER_API_VERSION_COMBINED <=3D 161)