public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES
@ 2022-08-03 14:06 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2022-08-03 14:06 UTC (permalink / raw)
  To: cygwin-cvs

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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-03 14:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 14:06 [newlib-cygwin] Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES Corinna Vinschen

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).