if(NOT HAVE_WINDOWS_H)
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
add_header_include(TIME_WITH_SYS_TIME "time.h")
- add_header_include(HAVE_TIME_H "time.h")
endif()
check_c_source_compiles("${_source_epilogue}
+#include <time.h>
int main(void) {
struct timeval ts;
ts.tv_sec = 0;
set(HAVE_IOCTL_SIOCGIFADDR 0)
set(HAVE_POLL_H 0)
set(HAVE_PWD_H 0)
- set(HAVE_SETJMP_H 1)
- set(HAVE_SIGNAL_H 1)
- set(HAVE_STDLIB_H 1)
set(HAVE_STRINGS_H 0)
- set(HAVE_STRING_H 1)
set(HAVE_SYS_FILIO_H 0)
set(HAVE_SYS_IOCTL_H 0)
set(HAVE_SYS_PARAM_H 0)
set(HAVE_SYS_UTIME_H 1)
set(HAVE_TERMIOS_H 0)
set(HAVE_TERMIO_H 0)
- set(HAVE_TIME_H 1)
set(HAVE_UTIME_H 0)
set(HAVE_SOCKET 1)
"Set CURL_CA_PATH=none or enable one of those TLS backends.")
endif()
+# TODO: offload these headers to the specific tests where they are needed.
+list(APPEND CURL_INCLUDES "string.h")
+list(APPEND CURL_INCLUDES "stdlib.h")
+list(APPEND CURL_INCLUDES "stddef.h")
+
# Check for header files
if(NOT UNIX)
check_include_file_concat("windows.h" HAVE_WINDOWS_H)
check_include_file_concat("poll.h" HAVE_POLL_H)
check_include_file_concat("pwd.h" HAVE_PWD_H)
-check_include_file_concat("setjmp.h" HAVE_SETJMP_H)
-check_include_file_concat("signal.h" HAVE_SIGNAL_H)
check_include_file_concat("stdatomic.h" HAVE_STDATOMIC_H)
check_include_file_concat("stdbool.h" HAVE_STDBOOL_H)
check_include_file_concat("stdint.h" HAVE_STDINT_H)
-check_include_file_concat("stdio.h" HAVE_STDIO_H)
-check_include_file_concat("stdlib.h" HAVE_STDLIB_H)
-check_include_file_concat("string.h" HAVE_STRING_H)
check_include_file_concat("strings.h" HAVE_STRINGS_H)
check_include_file_concat("stropts.h" HAVE_STROPTS_H)
check_include_file_concat("termio.h" HAVE_TERMIO_H)
check_include_file_concat("unistd.h" HAVE_UNISTD_H)
check_include_file_concat("utime.h" HAVE_UTIME_H)
-check_include_file_concat("stddef.h" HAVE_STDDEF_H)
-
check_type_size(size_t SIZEOF_SIZE_T)
check_type_size(ssize_t SIZEOF_SSIZE_T)
check_type_size("long long" SIZEOF_LONG_LONG)
check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE)
check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE)
-check_symbol_exists(fseeko "${CURL_INCLUDES}" HAVE_FSEEKO)
-check_symbol_exists(_fseeki64 "${CURL_INCLUDES}" HAVE__FSEEKI64)
+check_symbol_exists(fseeko "${CURL_INCLUDES};stdio.h" HAVE_FSEEKO)
+check_symbol_exists(_fseeki64 "${CURL_INCLUDES};stdio.h" HAVE__FSEEKI64)
check_symbol_exists(getpeername "${CURL_INCLUDES}" HAVE_GETPEERNAME)
check_symbol_exists(getsockname "${CURL_INCLUDES}" HAVE_GETSOCKNAME)
check_symbol_exists(if_nametoindex "${CURL_INCLUDES}" HAVE_IF_NAMETOINDEX)
# sigaction and sigsetjmp are special. Use special mechanism for
# detecting those, but only if previous attempt failed.
-if(HAVE_SIGNAL_H)
- check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
-endif()
+check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
if(NOT HAVE_SIGSETJMP)
- if(HAVE_SETJMP_H)
- check_symbol_exists(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP)
- if(HAVE_MACRO_SIGSETJMP)
- set(HAVE_SIGSETJMP 1)
- endif()
+ check_symbol_exists(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP)
+ if(HAVE_MACRO_SIGSETJMP)
+ set(HAVE_SIGSETJMP 1)
endif()
endif()
AC_MSG_CHECKING([if monotonic clock_gettime works])
CURL_RUN_IFELSE([
AC_LANG_PROGRAM([[
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#define HAVE_NET_IF_H 1
#define HAVE_PWD_H 1
#define HAVE_SELECT 1
-#define HAVE_SETJMP_H 1
#define HAVE_SIGNAL 1
-#define HAVE_SIGNAL_H 1
#define HAVE_SOCKET 1
#define HAVE_STRCASECMP 1
#define HAVE_STRDUP 1
#define HAVE_STRICMP 1
#define HAVE_STRINGS_H 1
-#define HAVE_STRING_H 1
#define HAVE_STRUCT_TIMEVAL 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
-#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UTIME 1
#define HAVE_UTIME_H 1
#define HAVE_RECV 1
#define HAVE_SELECT 1
#define HAVE_SEND 1
-#define HAVE_SETJMP_H 1
#define HAVE_SETLOCALE 1
#define HAVE_SETMODE 1
#define HAVE_SIGNAL 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
-#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#define NEED_MALLOC_H 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_FCNTL_H 1
#define HAVE_SYS_STAT_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_TIME_H 1
#define HAVE_UTIME_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_UTIME_H 1
#define HAVE_STRUCT_TIMEVAL 1
#define HAVE_SIGACTION 1
-#define HAVE_SIGNAL_H 1
#ifdef MACOS_SSL_SUPPORT
# define USE_OPENSSL 1
/* Define if you have the `signal' function. */
#undef HAVE_SIGNAL
-/* Define if you have the <signal.h> header file. */
-#define HAVE_SIGNAL_H
-
/* Define if you have the `socket' function. */
#define HAVE_SOCKET
/* Define if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H
-
/* The following define is needed on OS400 to enable strcmpi(), stricmp() and
strdup(). */
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H
-
/* Define if you have the <stropts.h> header file. */
#undef HAVE_STROPTS_H
/* Define if you have the <termio.h> header file. */
#undef HAVE_TERMIO_H
-/* Define if you have the <time.h> header file. */
-#define HAVE_TIME_H
-
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H
#define HAVE_POLL_FINE 1
#define HAVE_POLL_H 1
#define HAVE_PTHREAD_H 1
-#define HAVE_SETJMP_H 1
#define HAVE_SETLOCALE 1
#define HAVE_SIGACTION 1
#define HAVE_SIGNAL 1
-#define HAVE_SIGNAL_H 1
#define HAVE_SIGSETJMP 1
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
#define HAVE_SOCKET 1
#define HAVE_SSL_GET_SHUTDOWN 1
#define HAVE_STDBOOL_H 1
#define HAVE_STDINT_H 1
-#define HAVE_STDLIB_H 1
#define HAVE_STRCASECMP 1
#define HAVE_STRDUP 1
-#define HAVE_STRING_H 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOLL 1
#define HAVE_STRUCT_TIMEVAL 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_UN_H 1
#define HAVE_TERMIOS_H 1
-#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UTIME 1
#define HAVE_UTIME_H 1
/* Define if you have the `signal' function. */
#define HAVE_SIGNAL
-/* Define if you have the <signal.h> header file. */
-#define HAVE_SIGNAL_H
-
/* Define if you have the `socket' function. */
#define HAVE_SOCKET
/* Define if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H
-
/* Define if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H
-
/* Define if you have the `strtok_r' function. */
#undef HAVE_STRTOK_R
/* Define if you have the <termio.h> header file. */
#undef HAVE_TERMIO_H
-/* Define if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H
/* Define if you have the <netinet/in.h> header file. */
/* #define HAVE_NETINET_IN_H 1 */
-/* Define if you have the <signal.h> header file. */
-#define HAVE_SIGNAL_H 1
-
/* Define to 1 if you have the <stdbool.h> header file. */
#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)
#define HAVE_STDBOOL_H 1
#endif
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
/* Define if you have the <sys/param.h> header file. */
/* #define HAVE_SYS_PARAM_H 1 */
/* Define if you have the <termios.h> header file. */
/* #define HAVE_TERMIOS_H 1 */
-/* Define if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
/* Define if you have the <unistd.h> header file. */
#if defined(__MINGW32__) || defined(__LCC__) || defined(__POCC__)
#define HAVE_UNISTD_H 1
#define HAVE_WS2TCPIP_H 1
#endif
-/* Define to 1 if you have the <setjmp.h> header file. */
-#define HAVE_SETJMP_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
/* Define to 1 if you have the <libgen.h> header file. */
#if defined(__MINGW32__)
#define HAVE_LIBGEN_H 1
/* Define if you have the <netinet/in.h> header file. */
/* #define HAVE_NETINET_IN_H 1 */
-/* Define if you have the <signal.h> header file. */
-#define HAVE_SIGNAL_H 1
-
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
/* Define if you have the <sys/param.h> header file. */
/* #define HAVE_SYS_PARAM_H 1 */
/* Define if you have the <termios.h> header file. */
/* #define HAVE_TERMIOS_H 1 */
-/* Define if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
/* Define if you have the <unistd.h> header file. */
#if defined(__MINGW32__) || defined(__LCC__)
#define HAVE_UNISTD_H 1
/* fsetxattr() takes 6 args */
#cmakedefine HAVE_FSETXATTR_6 1
-/* Define to 1 if you have the <setjmp.h> header file. */
-#cmakedefine HAVE_SETJMP_H 1
-
/* Define to 1 if you have the `setlocale' function. */
#cmakedefine HAVE_SETLOCALE 1
/* Define to 1 if you have the signal function. */
#cmakedefine HAVE_SIGNAL 1
-/* Define to 1 if you have the <signal.h> header file. */
-#cmakedefine HAVE_SIGNAL_H 1
-
/* Define to 1 if you have the sigsetjmp function or macro. */
#cmakedefine HAVE_SIGSETJMP 1
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1
-/* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H 1
-
/* Define to 1 if you have the strcasecmp function. */
#cmakedefine HAVE_STRCASECMP 1
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H 1
-/* Define to 1 if you have the <string.h> header file. */
-#cmakedefine HAVE_STRING_H 1
-
/* Define to 1 if you have the <stropts.h> header file. */
#cmakedefine HAVE_STROPTS_H 1
/* Define to 1 if you have the <termio.h> header file. */
#cmakedefine HAVE_TERMIO_H 1
-/* Define to 1 if you have the <time.h> header file. */
-#cmakedefine HAVE_TIME_H 1
-
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
#ifdef HAVE_MEMRCHR
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#include <inet.h>
#endif
-#ifdef HAVE_SETJMP_H
#include <setjmp.h>
-#endif
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#include "urldata.h"
#include "sendf.h"
#include "timeval.h" /* for timediff_t */
#include "asyn.h"
-#ifdef HAVE_SETJMP_H
#include <setjmp.h>
-#endif
/* Allocate enough memory to hold the full name information structs and
* everything. OSF1 is known to require at least 8872 bytes. The buffer
***************************************************************************/
#include "curl_setup.h"
-#if defined(HAVE_SIGNAL_H) && defined(HAVE_SIGACTION) && \
+#if defined(HAVE_SIGACTION) && \
(defined(USE_OPENSSL) || defined(USE_MBEDTLS) || defined(USE_WOLFSSL))
#include <signal.h>
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#ifdef HAVE_SETJMP_H
-# include <setjmp.h>
-#endif
+include <setjmp.h>
/* includes end */"
AC_CHECK_HEADERS(
- sys/types.h setjmp.h,
+ sys/types.h,
[], [], [$curl_includes_setjmp])
])
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#ifdef HAVE_SIGNAL_H
-# include <signal.h>
-#endif
+include <signal.h>
/* includes end */"
AC_CHECK_HEADERS(
- sys/types.h signal.h,
+ sys/types.h,
[], [], [$curl_includes_signal])
])
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+include <stdlib.h>
/* includes end */"
AC_CHECK_HEADERS(
- sys/types.h stdlib.h,
+ sys/types.h,
[], [], [$curl_includes_stdlib])
])
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
/* includes end */"
AC_CHECK_HEADERS(
- sys/types.h string.h strings.h,
+ sys/types.h strings.h,
[], [], [$curl_includes_string])
])
#include <tchar.h>
#endif
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
/* based on sockfilt.c */
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
*
*/
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
* This source file was started based on curl's HTTP test suite server.
*/
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
* it!
*/
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
/* based on sockfilt.c */
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
*/
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include <sys/filio.h>
#endif
-#ifdef HAVE_SETJMP_H
#include <setjmp.h>
-#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
***************************************************************************/
#include "server_setup.h"
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <inet.h>
#endif
-#ifdef HAVE_SETJMP_H
#include <setjmp.h>
-#endif
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#include "urldata.h"
#include "connect.h"