From e2b3f9eaea6d1c8e549e3e1cf9c6281a6eba1bb6 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Wed, 29 Sep 2021 14:53:04 +0200 Subject: configure: remove `HAVE_WINSOCK_H` definition It's not used anymore. Closes https://github.com/curl/curl/pull/7795 --- acinclude.m4 | 80 ---------------------------------------------------- configure.ac | 18 +----------- m4/curl-functions.m4 | 7 +---- 3 files changed, 2 insertions(+), 103 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 277902dac..0e86bcd06 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -235,43 +235,6 @@ AC_DEFUN([CURL_CHECK_NATIVE_WINDOWS], [ ]) -dnl CURL_CHECK_HEADER_WINSOCK -dnl ------------------------------------------------- -dnl Check for compilable and valid winsock.h header - -AC_DEFUN([CURL_CHECK_HEADER_WINSOCK], [ - AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl - AC_CACHE_CHECK([for winsock.h], [curl_cv_header_winsock_h], [ - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#undef inline -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include -#include - ]],[[ -#if defined(__CYGWIN__) || defined(__CEGCC__) - HAVE_WINSOCK_H shall not be defined. -#else - int dummy=WSACleanup(); -#endif - ]]) - ],[ - curl_cv_header_winsock_h="yes" - ],[ - curl_cv_header_winsock_h="no" - ]) - ]) - case "$curl_cv_header_winsock_h" in - yes) - AC_DEFINE_UNQUOTED(HAVE_WINSOCK_H, 1, - [Define to 1 if you have the winsock.h header file.]) - ;; - esac -]) - - dnl CURL_CHECK_HEADER_WINSOCK2 dnl ------------------------------------------------- dnl Check for compilable and valid winsock2.h header @@ -1043,7 +1006,6 @@ dnl and RECV_TYPE_ARG4, defining the type of the function dnl return value in RECV_TYPE_RETV. AC_DEFUN([CURL_CHECK_FUNC_RECV], [ - AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl AC_CHECK_HEADERS(sys/types.h sys/socket.h) # @@ -1058,10 +1020,6 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [ #include #ifdef HAVE_WINSOCK2_H #include -#else -#ifdef HAVE_WINSOCK_H -#include -#endif #endif #else #ifdef HAVE_PROTO_BSDSOCKET_H @@ -1106,10 +1064,6 @@ struct Library *SocketBase = NULL; #include #ifdef HAVE_WINSOCK2_H #include -#else -#ifdef HAVE_WINSOCK_H -#include -#endif #endif #define RECVCALLCONV PASCAL #else @@ -1187,7 +1141,6 @@ dnl return value in SEND_TYPE_RETV, and also defining the dnl type qualifier of second argument in SEND_QUAL_ARG2. AC_DEFUN([CURL_CHECK_FUNC_SEND], [ - AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl AC_CHECK_HEADERS(sys/types.h sys/socket.h) # @@ -1202,10 +1155,6 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [ #include #ifdef HAVE_WINSOCK2_H #include -#else -#ifdef HAVE_WINSOCK_H -#include -#endif #endif #else #ifdef HAVE_PROTO_BSDSOCKET_H @@ -1250,10 +1199,6 @@ struct Library *SocketBase = NULL; #include #ifdef HAVE_WINSOCK2_H #include -#else -#ifdef HAVE_WINSOCK_H -#include -#endif #endif #define SENDCALLCONV PASCAL #else @@ -1368,10 +1313,6 @@ AC_DEFUN([CURL_CHECK_MSG_NOSIGNAL], [ #include #ifdef HAVE_WINSOCK2_H #include -#else -#ifdef HAVE_WINSOCK_H -#include -#endif #endif #else #ifdef HAVE_PROTO_BSDSOCKET_H @@ -1408,7 +1349,6 @@ dnl ------------------------------------------------- dnl Check for timeval struct AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [ - AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl AC_CHECK_HEADERS(sys/types.h sys/time.h sys/socket.h) AC_CACHE_CHECK([for struct timeval], [curl_cv_struct_timeval], [ @@ -1422,10 +1362,6 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [ #include #ifdef HAVE_WINSOCK2_H #include -#else -#ifdef HAVE_WINSOCK_H -#include -#endif #endif #endif #ifdef HAVE_SYS_TYPES_H @@ -1481,10 +1417,6 @@ AC_DEFUN([TYPE_IN_ADDR_T], [ #include #ifdef HAVE_WINSOCK2_H #include -#else -#ifdef HAVE_WINSOCK_H -#include -#endif #endif #else #ifdef HAVE_SYS_TYPES_H @@ -1527,10 +1459,6 @@ AC_DEFUN([TYPE_IN_ADDR_T], [ #include #ifdef HAVE_WINSOCK2_H #include -#else -#ifdef HAVE_WINSOCK_H -#include -#endif #endif #else #ifdef HAVE_SYS_TYPES_H @@ -1823,10 +1751,6 @@ AC_DEFUN([CURL_CHECK_FUNC_SELECT], [ #include #ifdef HAVE_WINSOCK2_H #include -#else -#ifdef HAVE_WINSOCK_H -#include -#endif #endif #endif #ifdef HAVE_SYS_TYPES_H @@ -1881,10 +1805,6 @@ struct Library *SocketBase = NULL; #include #ifdef HAVE_WINSOCK2_H #include -#else -#ifdef HAVE_WINSOCK_H -#include -#endif #endif #define SELECTCALLCONV PASCAL #endif diff --git a/configure.ac b/configure.ac index 152b0472e..37cf62b56 100644 --- a/configure.ac +++ b/configure.ac @@ -477,7 +477,7 @@ dnl Compilation based checks should not be done before this point. dnl ********************************************************************** dnl ********************************************************************** -dnl Make sure that our checks for headers windows.h winsock.h winsock2.h +dnl Make sure that our checks for headers windows.h winsock2.h dnl and ws2tcpip.h take precedence over any other further checks which dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for dnl this specific header files. And do them before its results are used. @@ -487,7 +487,6 @@ CURL_CHECK_HEADER_WINDOWS CURL_CHECK_NATIVE_WINDOWS case X-"$curl_cv_native_windows" in X-yes) - CURL_CHECK_HEADER_WINSOCK CURL_CHECK_HEADER_WINSOCK2 CURL_CHECK_HEADER_WS2TCPIP CURL_CHECK_HEADER_WINCRYPT @@ -495,7 +494,6 @@ case X-"$curl_cv_native_windows" in CURL_CHECK_HEADER_WINBER ;; *) - curl_cv_header_winsock_h="no" curl_cv_header_winsock2_h="no" curl_cv_header_ws2tcpip_h="no" curl_cv_header_wincrypt_h="no" @@ -1022,16 +1020,6 @@ if test "$HAVE_GETHOSTBYNAME" != "1" then dnl This is for winsock systems if test "$curl_cv_header_windows_h" = "yes"; then - if test "$curl_cv_header_winsock_h" = "yes"; then - case $host in - *-*-mingw32ce*) - winsock_LIB="-lwinsock" - ;; - *) - winsock_LIB="-lwsock32" - ;; - esac - fi if test "$curl_cv_header_winsock2_h" = "yes"; then winsock_LIB="-lws2_32" fi @@ -1048,10 +1036,6 @@ then #include #ifdef HAVE_WINSOCK2_H #include -#else -#ifdef HAVE_WINSOCK_H -#include -#endif #endif #endif ]],[[ diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4 index d3ffaea9f..b21bbd1e2 100644 --- a/m4/curl-functions.m4 +++ b/m4/curl-functions.m4 @@ -486,7 +486,7 @@ curl_includes_unistd="\ dnl CURL_INCLUDES_WINSOCK2 dnl ------------------------------------------------- dnl Set up variable with list of headers that must be -dnl included when winsock(2).h is to be included. +dnl included when winsock2.h is to be included. AC_DEFUN([CURL_INCLUDES_WINSOCK2], [ curl_includes_winsock2="\ @@ -498,15 +498,10 @@ curl_includes_winsock2="\ # include # ifdef HAVE_WINSOCK2_H # include -# else -# ifdef HAVE_WINSOCK_H -# include -# endif # endif #endif /* includes end */" CURL_CHECK_HEADER_WINDOWS - CURL_CHECK_HEADER_WINSOCK CURL_CHECK_HEADER_WINSOCK2 ]) -- cgit v1.2.1