diff options
author | Gergely Nagy <ngg@tresorit.com> | 2021-06-18 10:39:35 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-06-18 13:52:21 +0200 |
commit | 6f5ff0ee04e2bcaf16bf2121c533bea38581cfe7 (patch) | |
tree | 1bf3a868c29c4e9bb25224e19850b9687b17aa22 /CMake | |
parent | f471efa78c64e405b61a195f072f8b759905f43f (diff) | |
download | curl-6f5ff0ee04e2bcaf16bf2121c533bea38581cfe7.tar.gz |
configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r
Closes #7276
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/CurlTests.c | 42 | ||||
-rw-r--r-- | CMake/Platforms/WindowsCache.cmake | 8 |
2 files changed, 5 insertions, 45 deletions
diff --git a/CMake/CurlTests.c b/CMake/CurlTests.c index 9c278ec50..07dca5ec1 100644 --- a/CMake/CurlTests.c +++ b/CMake/CurlTests.c @@ -71,21 +71,15 @@ main () } #endif -/* tests for gethostbyaddr_r or gethostbyname_r */ -#if defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \ - defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \ - defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \ - defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \ +/* tests for gethostbyname_r */ +#if defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \ defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \ defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT) # define _REENTRANT /* no idea whether _REENTRANT is always set, just invent a new flag */ # define TEST_GETHOSTBYFOO_REENTRANT #endif -#if defined(HAVE_GETHOSTBYADDR_R_5) || \ - defined(HAVE_GETHOSTBYADDR_R_7) || \ - defined(HAVE_GETHOSTBYADDR_R_8) || \ - defined(HAVE_GETHOSTBYNAME_R_3) || \ +#if defined(HAVE_GETHOSTBYNAME_R_3) || \ defined(HAVE_GETHOSTBYNAME_R_5) || \ defined(HAVE_GETHOSTBYNAME_R_6) || \ defined(TEST_GETHOSTBYFOO_REENTRANT) @@ -98,18 +92,10 @@ int main(void) int type = 0; struct hostent h; int rc = 0; -#if defined(HAVE_GETHOSTBYADDR_R_5) || \ - defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \ - \ - defined(HAVE_GETHOSTBYNAME_R_3) || \ +#if defined(HAVE_GETHOSTBYNAME_R_3) || \ defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) struct hostent_data hdata; -#elif defined(HAVE_GETHOSTBYADDR_R_7) || \ - defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \ - defined(HAVE_GETHOSTBYADDR_R_8) || \ - defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \ - \ - defined(HAVE_GETHOSTBYNAME_R_5) || \ +#elif defined(HAVE_GETHOSTBYNAME_R_5) || \ defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \ defined(HAVE_GETHOSTBYNAME_R_6) || \ defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT) @@ -118,24 +104,6 @@ int main(void) struct hostent *hp; #endif -#ifndef gethostbyaddr_r - (void)gethostbyaddr_r; -#endif - -#if defined(HAVE_GETHOSTBYADDR_R_5) || \ - defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) - rc = gethostbyaddr_r(address, length, type, &h, &hdata); - (void)rc; -#elif defined(HAVE_GETHOSTBYADDR_R_7) || \ - defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) - hp = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &h_errnop); - (void)hp; -#elif defined(HAVE_GETHOSTBYADDR_R_8) || \ - defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) - rc = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &hp, &h_errnop); - (void)rc; -#endif - #if defined(HAVE_GETHOSTBYNAME_R_3) || \ defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) rc = gethostbyname_r(address, &h, &hdata); diff --git a/CMake/Platforms/WindowsCache.cmake b/CMake/Platforms/WindowsCache.cmake index 2f96dbca3..fb803f8a6 100644 --- a/CMake/Platforms/WindowsCache.cmake +++ b/CMake/Platforms/WindowsCache.cmake @@ -83,7 +83,6 @@ if(NOT UNIX) set(HAVE_STRCASECMP 0) set(HAVE_STRICMP 1) set(HAVE_STRCMPI 1) - set(HAVE_GETHOSTBYADDR 1) set(HAVE_GETTIMEOFDAY 0) set(HAVE_INET_ADDR 1) set(HAVE_CLOSESOCKET 1) @@ -99,17 +98,10 @@ if(NOT UNIX) set(HAVE_RAND_STATUS 0) set(HAVE_GMTIME_R 0) set(HAVE_LOCALTIME_R 0) - set(HAVE_GETHOSTBYADDR_R 0) set(HAVE_GETHOSTBYNAME_R 0) set(HAVE_SIGNAL_FUNC 1) set(HAVE_SIGNAL_MACRO 0) - set(HAVE_GETHOSTBYADDR_R_5 0) - set(HAVE_GETHOSTBYADDR_R_5_REENTRANT 0) - set(HAVE_GETHOSTBYADDR_R_7 0) - set(HAVE_GETHOSTBYADDR_R_7_REENTRANT 0) - set(HAVE_GETHOSTBYADDR_R_8 0) - set(HAVE_GETHOSTBYADDR_R_8_REENTRANT 0) set(HAVE_GETHOSTBYNAME_R_3 0) set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0) set(HAVE_GETHOSTBYNAME_R_5 0) |