From 4d73854462f30948acab12984b611e9e33ee41e6 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 19 Jul 2022 15:06:26 +0000 Subject: tidy-up: delete unused build configuration macros Most of them feature guards: - `CURL_INCLUDES_SYS_UIO` [1] - `HAVE_ALLOCA_H` [2] - `HAVE_CRYPTO_CLEANUP_ALL_EX_DATA` (unused since de71e68000c8624ea13f90b136f8734dd0fb1bdc) - `HAVE_DLFCN_H` - `HAVE_DLOPEN` - `HAVE_DOPRNT` - `HAVE_FCNTL` - `HAVE_GETHOSTBYNAME` [3] - `HAVE_GETOPT_H` - `HAVE_GETPASS` - `HAVE_GETPROTOBYNAME` - `HAVE_GETSERVBYNAME` - `HAVE_IDN_FREE*` - `HAVE_INET_ADDR` - `HAVE_IOCTL` - `HAVE_KRB4` - `HAVE_KRB_GET_OUR_IP_FOR_REALM` - `HAVE_KRB_H` - `HAVE_LDAPSSL_H` - `HAVE_LDAP_INIT_FD` - `HAVE_LIBDL` - `HAVE_LIBNSL` - `HAVE_LIBRESOLV*` - `HAVE_LIBUCB` - `HAVE_LL` - `HAVE_LOCALTIME_R` - `HAVE_MALLOC_H` - `HAVE_MEMCPY` - `HAVE_MEMORY_H` - `HAVE_NETINET_IF_ETHER_H` - `HAVE_NI_WITHSCOPEID` - `HAVE_OPENSSL_CRYPTO_H` - `HAVE_OPENSSL_ERR_H` - `HAVE_OPENSSL_PEM_H` - `HAVE_OPENSSL_PKCS12_H` - `HAVE_OPENSSL_RAND_H` - `HAVE_OPENSSL_RSA_H` - `HAVE_OPENSSL_SSL_H` - `HAVE_OPENSSL_X509_H` - `HAVE_PEM_H` - `HAVE_POLL` - `HAVE_RAND_SCREEN` - `HAVE_RAND_STATUS` - `HAVE_RECVFROM` - `HAVE_SETSOCKOPT` - `HAVE_SETVBUF` - `HAVE_SIZEOF_LONG_DOUBLE` - `HAVE_SOCKIO_H` - `HAVE_SOCK_OPTS` - `HAVE_STDIO_H` - `HAVE_STRCASESTR` - `HAVE_STRFTIME` - `HAVE_STRLCAT` - `HAVE_STRNCMPI` - `HAVE_STRNICMP` - `HAVE_STRSTR` - `HAVE_STRUCT_IN6_ADDR` - `HAVE_TLD_H` - `HAVE_TLD_STRERROR` - `HAVE_UNAME` - `HAVE_USLEEP` - `HAVE_WINBER_H` - `HAVE_WRITEV` - `HAVE_X509_H` - `LT_OBJDIR` - `NEED_BASENAME_PROTO` - `NOT_NEED_LIBNSL` - `OPENSSL_NO_KRB5` - `RECVFROM_TYPE*` - `SIZEOF_LONG_DOUBLE` - `STRERROR_R_TYPE_ARG3` - `USE_YASSLEMUL` - `_USRDLL` (from CMake) [4] [1] Related parts in `m4/curl-functions.m4` and `configure.ac` might also be deleted. [2] Related comment can possibly be deleted in `packages/vms/generate_config_vms_h_curl.com`. [3] There are more instances of this in autotools, but I did not dare to touch those. Looked like it's used to detect socket support. [4] This is necessary for MFC (Microsoft Foundation Class) DLLs to force linking MFC components statically to the DLL. `libcurl.dll` does not use MFC, so we can delete this define. Ref: https://docs.microsoft.com/cpp/build/regular-dlls-statically-linked-to-mfc Script that can help finding unused settings like above: ```shell autoheader configure.ac # generate lib/curl_config.h.in { grep -o -E 'set\([A-Z][A-Z0-9_]{3,}' CMake/Platforms/WindowsCache.cmake | sed -E 's|set\(||g' grep -o -E -h '#define +[A-Z][A-Z0-9_]{3,}' lib/config-*.h | sed -E 's|#define +||g' grep -o -E '#cmakedefine +[A-Z][A-Z0-9_]{3,}' lib/curl_config.h.cmake | sed -E 's|#cmakedefine +||g' grep -o -E '#undef +[A-Z][A-Z0-9_]{3,}' lib/curl_config.h.in | sed -E 's|#undef +||g' } | sort -u | grep -v -F 'HEADER_CURL_' | while read -r def; do c="$(git grep -w -F "${def}" | grep -v -E -c '(/libcurl\.tmpl|^lib/config-|^lib/curl_config\.h\.cmake|^CMakeLists\.txt|^CMake/Platforms/WindowsCache\.cmake|^packages/vms/config_h\.com|^m4/curl-functions\.m4|^acinclude\.m4|^configure\.ac)')" if [ "${c}" = '0' ]; then echo "${def}" fi done ``` Reviewed-by: Daniel Stenberg Closes #9044 --- lib/config-riscos.h | 123 ---------------------------------------------------- 1 file changed, 123 deletions(-) (limited to 'lib/config-riscos.h') diff --git a/lib/config-riscos.h b/lib/config-riscos.h index 383656240..71a67b0e1 100644 --- a/lib/config-riscos.h +++ b/lib/config-riscos.h @@ -34,9 +34,6 @@ /* Version number of this archive. */ #undef VERSION -/* Define if you have the getpass function. */ -#undef HAVE_GETPASS - /* Define cpu-machine-OS */ #define OS "ARM-RISC OS" @@ -55,9 +52,6 @@ /* Define if you need the _REENTRANT define for some functions */ #undef NEED_REENTRANT -/* Define if you have the Kerberos4 libraries (including -ldes) */ -#undef HAVE_KRB4 - /* Define if you want to enable IPv6 support */ #undef ENABLE_IPV6 @@ -79,9 +73,6 @@ /* Define if you have the alarm function. */ #define HAVE_ALARM -/* Define if you have the header file. */ -#define HAVE_ALLOCA_H - /* Define if you have the header file. */ #define HAVE_ARPA_INET_H @@ -109,117 +100,48 @@ /* Define if you have the `gethostname' function. */ #define HAVE_GETHOSTNAME -/* Define if you have the header file. */ -#define HAVE_GETOPT_H - /* Define if you have the `getpass_r' function. */ #undef HAVE_GETPASS_R /* Define if you have the `getpwuid' function. */ #undef HAVE_GETPWUID -/* Define if you have the `getservbyname' function. */ -#undef HAVE_GETSERVBYNAME - /* Define if you have the `gettimeofday' function. */ #define HAVE_GETTIMEOFDAY /* Define if you have the `timeval' struct. */ #define HAVE_STRUCT_TIMEVAL -/* Define if you have the `inet_addr' function. */ -#undef HAVE_INET_ADDR - /* Define if you have the header file. */ #define HAVE_INTTYPES_H /* Define if you have the header file. */ #undef HAVE_IO_H -/* Define if you have the `krb_get_our_ip_for_realm' function. */ -#undef HAVE_KRB_GET_OUR_IP_FOR_REALM - -/* Define if you have the header file. */ -#undef HAVE_KRB_H - -/* Define if you have the `nsl' library (-lnsl). */ -#undef HAVE_LIBNSL - -/* Define if you have the `resolv' library (-lresolv). */ -#undef HAVE_LIBRESOLV - -/* Define if you have the `resolve' library (-lresolve). */ -#undef HAVE_LIBRESOLVE - /* Define if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET -/* Define if you have the `ucb' library (-lucb). */ -#undef HAVE_LIBUCB - -/* Define if you have the `localtime_r' function. */ -#undef HAVE_LOCALTIME_R - -/* Define if you have the header file. */ -#define HAVE_MALLOC_H - /* Define if you need the malloc.h header file even with stdlib.h */ /* #define NEED_MALLOC_H 1 */ -/* Define if you have the header file. */ -#undef HAVE_MEMORY_H - /* Define if you have the header file. */ #define HAVE_NETDB_H -/* Define if you have the header file. */ -#undef HAVE_NETINET_IF_ETHER_H - /* Define if you have the header file. */ #define HAVE_NETINET_IN_H /* Define if you have the header file. */ #define HAVE_NET_IF_H -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_CRYPTO_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_ERR_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_PEM_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_RSA_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_SSL_H - -/* Define if you have the header file. */ -#undef HAVE_OPENSSL_X509_H - -/* Define if you have the header file. */ -#undef HAVE_PEM_H - /* Define if you have the header file. */ #undef HAVE_PWD_H /* Define if you have the `RAND_egd' function. */ #undef HAVE_RAND_EGD -/* Define if you have the `RAND_screen' function. */ -#undef HAVE_RAND_SCREEN - -/* Define if you have the `RAND_status' function. */ -#undef HAVE_RAND_STATUS - /* Define if you have the `select' function. */ #define HAVE_SELECT -/* Define if you have the `setvbuf' function. */ -#undef HAVE_SETVBUF - /* Define if you have the `sigaction' function. */ #undef HAVE_SIGACTION @@ -250,9 +172,6 @@ /* Define if you have the `strdup' function. */ #define HAVE_STRDUP -/* Define if you have the `strftime' function. */ -#define HAVE_STRFTIME - /* Define if you have the `stricmp' function. */ #define HAVE_STRICMP @@ -262,9 +181,6 @@ /* Define if you have the header file. */ #define HAVE_STRING_H -/* Define if you have the `strstr' function. */ -#define HAVE_STRSTR - /* Define if you have the `strtok_r' function. */ #undef HAVE_STRTOK_R @@ -301,24 +217,15 @@ /* Define if you have the header file. */ #undef HAVE_TIME_H -/* Define if you have the `uname' function. */ -#define HAVE_UNAME - /* Define if you have the header file. */ #define HAVE_UNISTD_H -/* Define if you have the header file. */ -#undef HAVE_X509_H - /* Name of package */ #undef PACKAGE /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 -/* The size of `long double', as computed by sizeof. */ -#undef SIZEOF_LONG_DOUBLE - /* The size of `long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG @@ -359,9 +266,6 @@ /* Define to `int' if does not define. */ #undef ssize_t -/* Define if you have the ioctl function. */ -#define HAVE_IOCTL - /* Define if you have a working ioctl FIONBIO function. */ #define HAVE_IOCTL_FIONBIO @@ -386,33 +290,6 @@ /* Define to the function return type for recv. */ #define RECV_TYPE_RETV ssize_t -/* Define 1 if you have the recvfrom function. */ -#define HAVE_RECVFROM 1 - -/* Define to the type of arg 1 for recvfrom. */ -#define RECVFROM_TYPE_ARG1 int - -/* Define to the type pointed by arg 2 for recvfrom. */ -#define RECVFROM_TYPE_ARG2 void - -/* Define if the type pointed by arg 2 for recvfrom is void. */ -#define RECVFROM_TYPE_ARG2_IS_VOID - -/* Define to the type of arg 3 for recvfrom. */ -#define RECVFROM_TYPE_ARG3 size_t - -/* Define to the type of arg 4 for recvfrom. */ -#define RECVFROM_TYPE_ARG4 int - -/* Define to the type pointed by arg 5 for recvfrom. */ -#define RECVFROM_TYPE_ARG5 struct sockaddr - -/* Define to the type pointed by arg 6 for recvfrom. */ -#define RECVFROM_TYPE_ARG6 int - -/* Define to the function return type for recvfrom. */ -#define RECVFROM_TYPE_RETV ssize_t - /* Define if you have the send function. */ #define HAVE_SEND 1 -- cgit v1.2.1