tidy-up: drop unused CURL_INADDR_NONE macro and in_addr_t type
Closes #16318
This commit is contained in:
parent
4aec6cdfd3
commit
90b72607fa
@ -106,21 +106,6 @@ int main(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_IN_ADDR_T
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
if((in_addr_t *) 0)
|
|
||||||
return 0;
|
|
||||||
if(sizeof(in_addr_t))
|
|
||||||
return 0;
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_BOOL_T
|
#ifdef HAVE_BOOL_T
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|||||||
@ -1810,7 +1810,6 @@ foreach(_curl_test IN ITEMS
|
|||||||
HAVE_GETHOSTBYNAME_R_3_REENTRANT
|
HAVE_GETHOSTBYNAME_R_3_REENTRANT
|
||||||
HAVE_GETHOSTBYNAME_R_5_REENTRANT
|
HAVE_GETHOSTBYNAME_R_5_REENTRANT
|
||||||
HAVE_GETHOSTBYNAME_R_6_REENTRANT
|
HAVE_GETHOSTBYNAME_R_6_REENTRANT
|
||||||
HAVE_IN_ADDR_T
|
|
||||||
HAVE_BOOL_T
|
HAVE_BOOL_T
|
||||||
STDC_HEADERS
|
STDC_HEADERS
|
||||||
HAVE_FILE_OFFSET_BITS
|
HAVE_FILE_OFFSET_BITS
|
||||||
@ -1906,10 +1905,6 @@ endif()
|
|||||||
|
|
||||||
# Some other minor tests
|
# Some other minor tests
|
||||||
|
|
||||||
if(NOT HAVE_IN_ADDR_T)
|
|
||||||
set(in_addr_t "unsigned long")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
if(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
||||||
include(CheckCCompilerFlag)
|
include(CheckCCompilerFlag)
|
||||||
check_c_compiler_flag("-Wno-long-double" HAVE_C_FLAG_Wno_long_double)
|
check_c_compiler_flag("-Wno-long-double" HAVE_C_FLAG_Wno_long_double)
|
||||||
|
|||||||
78
acinclude.m4
78
acinclude.m4
@ -793,84 +793,6 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl TYPE_IN_ADDR_T
|
|
||||||
dnl -------------------------------------------------
|
|
||||||
dnl Check for in_addr_t: it is used to receive the return code of inet_addr()
|
|
||||||
dnl and a few other things.
|
|
||||||
|
|
||||||
AC_DEFUN([TYPE_IN_ADDR_T], [
|
|
||||||
AC_CHECK_TYPE([in_addr_t], ,[
|
|
||||||
dnl in_addr_t not available
|
|
||||||
AC_CACHE_CHECK([for in_addr_t equivalent],
|
|
||||||
[curl_cv_in_addr_t_equiv], [
|
|
||||||
curl_cv_in_addr_t_equiv="unknown"
|
|
||||||
for t in "unsigned long" int size_t unsigned long; do
|
|
||||||
if test "$curl_cv_in_addr_t_equiv" = "unknown"; then
|
|
||||||
AC_LINK_IFELSE([
|
|
||||||
AC_LANG_PROGRAM([[
|
|
||||||
#undef inline
|
|
||||||
#ifdef _WIN32
|
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#endif
|
|
||||||
#include <winsock2.h>
|
|
||||||
#else
|
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
|
||||||
#include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_ARPA_INET_H
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
]],[[
|
|
||||||
$t data = inet_addr ("1.2.3.4");
|
|
||||||
]])
|
|
||||||
],[
|
|
||||||
curl_cv_in_addr_t_equiv="$t"
|
|
||||||
])
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
])
|
|
||||||
case "$curl_cv_in_addr_t_equiv" in
|
|
||||||
unknown)
|
|
||||||
AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t])
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
|
|
||||||
[Type to use in place of in_addr_t when system does not provide it.])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
],[
|
|
||||||
#undef inline
|
|
||||||
#ifdef _WIN32
|
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#endif
|
|
||||||
#include <winsock2.h>
|
|
||||||
#else
|
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
|
||||||
#include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_ARPA_INET_H
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
dnl CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC
|
dnl CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Check if monotonic clock_gettime is available.
|
dnl Check if monotonic clock_gettime is available.
|
||||||
|
|||||||
@ -4005,8 +4005,6 @@ case $host_os in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
TYPE_IN_ADDR_T
|
|
||||||
|
|
||||||
TYPE_SOCKADDR_STORAGE
|
TYPE_SOCKADDR_STORAGE
|
||||||
|
|
||||||
CURL_CHECK_FUNC_SELECT
|
CURL_CHECK_FUNC_SELECT
|
||||||
|
|||||||
@ -234,9 +234,6 @@
|
|||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
#undef const
|
#undef const
|
||||||
|
|
||||||
/* type to use in place of in_addr_t if not defined */
|
|
||||||
#define in_addr_t unsigned long
|
|
||||||
|
|
||||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||||
#undef size_t
|
#undef size_t
|
||||||
|
|
||||||
|
|||||||
@ -244,9 +244,6 @@
|
|||||||
/* TYPEDEF REPLACEMENTS */
|
/* TYPEDEF REPLACEMENTS */
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
|
|
||||||
/* Define if in_addr_t is not an available 'typedefed' type. */
|
|
||||||
#define in_addr_t unsigned long
|
|
||||||
|
|
||||||
/* Define if ssize_t is not an available 'typedefed' type. */
|
/* Define if ssize_t is not an available 'typedefed' type. */
|
||||||
#ifndef _SSIZE_T_DEFINED
|
#ifndef _SSIZE_T_DEFINED
|
||||||
# ifdef __MINGW32__
|
# ifdef __MINGW32__
|
||||||
|
|||||||
@ -797,9 +797,6 @@ ${SIZEOF_TIME_T_CODE}
|
|||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
#cmakedefine const ${const}
|
#cmakedefine const ${const}
|
||||||
|
|
||||||
/* Type to use in place of in_addr_t when system does not provide it. */
|
|
||||||
#cmakedefine in_addr_t ${in_addr_t}
|
|
||||||
|
|
||||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||||
#cmakedefine size_t ${size_t}
|
#cmakedefine size_t ${size_t}
|
||||||
|
|
||||||
|
|||||||
@ -195,12 +195,6 @@ Curl_cache_addr(struct Curl_easy *data, struct Curl_addrinfo *addr,
|
|||||||
const char *hostname, size_t hostlen, int port,
|
const char *hostname, size_t hostlen, int port,
|
||||||
bool permanent);
|
bool permanent);
|
||||||
|
|
||||||
#ifndef INADDR_NONE
|
|
||||||
#define CURL_INADDR_NONE (in_addr_t) ~0
|
|
||||||
#else
|
|
||||||
#define CURL_INADDR_NONE INADDR_NONE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function provided by the resolver backend to set DNS servers to use.
|
* Function provided by the resolver backend to set DNS servers to use.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user