public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES
Date: Wed,  3 Aug 2022 14:06:05 +0000 (GMT)	[thread overview]
Message-ID: <20220803140605.23673385BC13@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=57c3ca8d51cdf1e9fcf10588c9519fb7b9dcf7e1

commit 57c3ca8d51cdf1e9fcf10588c9519fb7b9dcf7e1
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Aug 3 15:53:41 2022 +0200

    Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

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);
 }
 
-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 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)
 
-#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)


                 reply	other threads:[~2022-08-03 14:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220803140605.23673385BC13@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).