From 8419fe4d88bdbad6c64b3da70a1a976048f04c2c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 4 May 2021 11:03:30 +0200 Subject: [PATCH] cmake: check for getppid and utimes ... as they're checked for in the configure script and are used by source code. Removed checks for perror, setvbuf and strlcat since those defines are not checked for in source code. Bonus: removed HAVE_STRLCPY from a few config-*.h files since that symbol is not used in source code. Closes #6997 --- CMakeLists.txt | 6 +++--- lib/config-os400.h | 3 --- lib/config-riscos.h | 3 --- lib/config-tpf.h | 3 --- lib/config-vxworks.h | 3 --- lib/curl_config.h.cmake | 15 ++++++--------- 6 files changed, 9 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 02474e29c..2ffb72faf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1001,18 +1001,18 @@ check_symbol_exists(alarm "${CURL_INCLUDES}" HAVE_ALARM) if(NOT HAVE_STRNCMPI) set(HAVE_STRCMPI) endif() +check_symbol_exists(getppid "${CURL_INCLUDES}" HAVE_GETPPID) +check_symbol_exists(utimes "${CURL_INCLUDES}" HAVE_UTIMES) + check_symbol_exists(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR) check_symbol_exists(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R) check_symbol_exists(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY) check_symbol_exists(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR) check_symbol_exists(inet_ntoa "${CURL_INCLUDES}" HAVE_INET_NTOA) check_symbol_exists(inet_ntoa_r "${CURL_INCLUDES}" HAVE_INET_NTOA_R) -check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR) check_symbol_exists(closesocket "${CURL_INCLUDES}" HAVE_CLOSESOCKET) -check_symbol_exists(setvbuf "${CURL_INCLUDES}" HAVE_SETVBUF) check_symbol_exists(sigsetjmp "${CURL_INCLUDES}" HAVE_SIGSETJMP) check_symbol_exists(getpass_r "${CURL_INCLUDES}" HAVE_GETPASS_R) -check_symbol_exists(strlcat "${CURL_INCLUDES}" HAVE_STRLCAT) check_symbol_exists(getpwuid "${CURL_INCLUDES}" HAVE_GETPWUID) check_symbol_exists(getpwuid_r "${CURL_INCLUDES}" HAVE_GETPWUID_R) check_symbol_exists(geteuid "${CURL_INCLUDES}" HAVE_GETEUID) diff --git a/lib/config-os400.h b/lib/config-os400.h index b5a9823fd..428ce77a8 100644 --- a/lib/config-os400.h +++ b/lib/config-os400.h @@ -310,9 +310,6 @@ /* Define if you have the header file. */ #define HAVE_STRING_H -/* Define if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - /* Define if you have the header file. */ #undef HAVE_STROPTS_H diff --git a/lib/config-riscos.h b/lib/config-riscos.h index 2dc3c6631..6c9b584f5 100644 --- a/lib/config-riscos.h +++ b/lib/config-riscos.h @@ -296,9 +296,6 @@ /* Define if you have the header file. */ #define HAVE_STRING_H -/* Define if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - /* Define if you have the `strstr' function. */ #define HAVE_STRSTR diff --git a/lib/config-tpf.h b/lib/config-tpf.h index 3fdb8924c..0fa3fcdcf 100644 --- a/lib/config-tpf.h +++ b/lib/config-tpf.h @@ -450,9 +450,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 diff --git a/lib/config-vxworks.h b/lib/config-vxworks.h index 916d02338..435340ac6 100644 --- a/lib/config-vxworks.h +++ b/lib/config-vxworks.h @@ -553,9 +553,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the `strlcpy' function. */ -/* #undef HAVE_STRLCPY */ - /* Define to 1 if you have the strncmpi function. */ /* #undef HAVE_STRNCMPI */ diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index fbe17bc5b..1f298871e 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -208,6 +208,9 @@ /* Define to 1 if you have the `geteuid' function. */ #cmakedefine HAVE_GETEUID 1 +/* Define to 1 if you have the `getppid' function. */ +#cmakedefine HAVE_GETPPID 1 + /* Define to 1 if you have the gethostbyaddr function. */ #cmakedefine HAVE_GETHOSTBYADDR 1 @@ -500,9 +503,6 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_PEM_H 1 -/* Define to 1 if you have the `perror' function. */ -#cmakedefine HAVE_PERROR 1 - /* Define to 1 if you have the `pipe' function. */ #cmakedefine HAVE_PIPE 1 @@ -644,12 +644,6 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STRING_H 1 -/* Define to 1 if you have the strlcat function. */ -#cmakedefine HAVE_STRLCAT 1 - -/* Define to 1 if you have the `strlcpy' function. */ -#cmakedefine HAVE_STRLCPY 1 - /* Define to 1 if you have the strncmpi function. */ #cmakedefine HAVE_STRNCMPI 1 @@ -740,6 +734,9 @@ /* Define to 1 if you have the `utime' function. */ #cmakedefine HAVE_UTIME 1 +/* Define to 1 if you have the `utimes' function. */ +#cmakedefine HAVE_UTIMES 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_UTIME_H 1