]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows: Drop obsolete WinSock v1 library (#1384)
authorAmos Jeffries <yadij@users.noreply.github.com>
Tue, 20 Jun 2023 08:52:03 +0000 (08:52 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 20 Jun 2023 12:39:03 +0000 (12:39 +0000)
wsock32 library and its winsock.h are for Windows 95
and older version socket support. We no longer need
Squid to run on such old Windows machines.

acinclude/os-deps.m4
compat/os/mswindows.h
src/icmp/Icmp4.h
src/icmp/pinger.cc

index f51714a8af154950db414201048b945582eabaaa..8d1b2a03bd77728dcf0294e48c91562e2a982732 100644 (file)
@@ -143,8 +143,6 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #endif
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
 #endif
 int main(int argc, char **argv) {
        FILE *fp = fopen("conftestval", "w");
@@ -332,8 +330,6 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #endif
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
 #endif
 int main(int argc, char **argv)
 {
@@ -382,8 +378,6 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #endif
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
 #endif
 int main(int argc, char **argv)
 {
@@ -432,8 +426,6 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #endif
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
 #endif
 int main(int argc, char **argv)
 {
@@ -486,8 +478,6 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #endif
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
 #endif
 int main(int argc, char **argv)
 {
@@ -715,16 +705,14 @@ AC_CACHE_CHECK(for _res.nsaddr_list, ac_cv_have_res_nsaddr_list,
 ])
 
 
-dnl checks the winsock library to use (ws2_32 or wsock32)
+dnl checks whether to use the ws2_32 library
 dnl may set ac_cv_func_select as a side effect
 AC_DEFUN([SQUID_CHECK_WINSOCK_LIB],[
-  AC_CHECK_HEADERS(winsock2.h winsock.h)
+  AC_CHECK_HEADERS(winsock2.h)
   SQUID_STATE_SAVE(winsock)
-  SQUID_SEARCH_LIBS([squid_getprotobynumber],[ws2_32 wsock32],,,,[
+  SQUID_SEARCH_LIBS([squid_getprotobynumber],[ws2_32],,,,[
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
 #endif
 /* ugly hack. */
 void squid_getprotobynumber(void) {
@@ -739,11 +727,6 @@ void squid_getprotobynumber(void) {
       AC_MSG_RESULT([winsock2])
       XTRA_LIBS="-lws2_32 $XTRA_LIBS"
       ac_cv_func_select="yes"
-    ],
-    ["-lwsock32"],[
-      AC_MSG_RESULT([winsock])
-      XTRA_LIBS="-lwsock32 $XTRA_LIBS"
-      ac_cv_func_select="yes"
     ]
   )
   SQUID_STATE_ROLLBACK(winsock)
index 62978cee4e32ff3c1db0696b0d6db7122acf1986..3bf8796b209265ce771a9a048d33cdafed38abbb 100644 (file)
@@ -281,8 +281,6 @@ struct timezone {
 #include <errno.h>
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
 #endif
 
 #if !_SQUID_CYGWIN_
@@ -506,7 +504,7 @@ namespace Squid
 
 /*
  * Each of these functions is defined in the Squid namespace so as not to
- * clash with the winsock.h and winsock2.h definitions.
+ * clash with the winsock2.h definitions.
  * It is then paired with a #define to cause these wrappers to be used by
  * the main code instead of those system definitions.
  *
index e0511a5695e6eb0e3c5a908b4e488a1c079862f9..7e8c12be1cc393c931a5bd20c864330052c75174 100644 (file)
@@ -66,8 +66,6 @@
 
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
 #endif
 #include <process.h>
 
index 67a717da5a7a9b535f3111849e274758b0c26e53..98af8a0b89e982300a2611f42e09f16eeff7f4a6 100644 (file)
@@ -59,8 +59,6 @@
 
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
-#elif HAVE_WINSOCK_H
-#include <winsock.h>
 #endif
 #include <process.h>