build: drop `dirent.h` and `opendir()` detections on Windows
No binary (build failed)
—
(log yok)
| @@ -28,10 +28,8 @@ endif() | |
| if(MINGW) | |
| set(HAVE_BASENAME 1) | |
| set(HAVE_BOOL_T 1) # = HAVE_STDBOOL_H | |
| - | set(HAVE_DIRENT_H 1) |
| set(HAVE_GETTIMEOFDAY 1) | |
| set(HAVE_LIBGEN_H 1) | |
| - | set(HAVE_OPENDIR 1) |
| set(HAVE_STDBOOL_H 1) | |
| set(HAVE_STDDEF_H 1) # detected by CMake internally in check_type_size() | |
| set(HAVE_STDINT_H 1) # detected by CMake internally in check_type_size() | |
| @@ -40,10 +38,8 @@ if(MINGW) | |
| set(HAVE_UNISTD_H 1) | |
| set(HAVE_UTIME_H 1) # wrapper to sys/utime.h | |
| else() | |
| - | set(HAVE_DIRENT_H 0) |
| set(HAVE_GETTIMEOFDAY 0) | |
| set(HAVE_LIBGEN_H 0) | |
| - | set(HAVE_OPENDIR 0) |
| set(HAVE_STRINGS_H 0) | |
| set(HAVE_SYS_PARAM_H 0) | |
| set(HAVE_UTIME_H 0) | |
| @@ -1554,7 +1554,6 @@ check_include_file("sys/un.h" HAVE_SYS_UN_H) | |
| check_include_file_concat_curl("sys/utime.h" HAVE_SYS_UTIME_H) # sys/types.h (AmigaOS) | |
| check_include_file_concat_curl("arpa/inet.h" HAVE_ARPA_INET_H) | |
| - | check_include_file("dirent.h" HAVE_DIRENT_H) |
| check_include_file("fcntl.h" HAVE_FCNTL_H) | |
| check_include_file_concat_curl("ifaddrs.h" HAVE_IFADDRS_H) | |
| check_include_file("io.h" HAVE_IO_H) | |
| @@ -1635,7 +1634,6 @@ endif() | |
| check_function_exists("accept4" HAVE_ACCEPT4) | |
| check_function_exists("fnmatch" HAVE_FNMATCH) | |
| check_symbol_exists("basename" "${CURL_INCLUDES};string.h" HAVE_BASENAME) # libgen.h unistd.h | |
| - | check_symbol_exists("opendir" "dirent.h" HAVE_OPENDIR) |
| check_function_exists("poll" HAVE_POLL) # poll.h | |
| check_symbol_exists("socket" "${CURL_INCLUDES}" HAVE_SOCKET) # winsock2.h sys/socket.h | |
| check_symbol_exists("socketpair" "${CURL_INCLUDES}" HAVE_SOCKETPAIR) # sys/socket.h | |
| @@ -1688,10 +1686,13 @@ else() | |
| endif() | |
| if(NOT WIN32) | |
| + | check_include_file("dirent.h" HAVE_DIRENT_H) |
| + | |
| check_function_exists("if_nametoindex" HAVE_IF_NAMETOINDEX) # net/if.h | |
| check_function_exists("realpath" HAVE_REALPATH) | |
| check_function_exists("sched_yield" HAVE_SCHED_YIELD) | |
| + | check_symbol_exists("opendir" "dirent.h" HAVE_OPENDIR) |
| check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP) | |
| check_symbol_exists("stricmp" "string.h" HAVE_STRICMP) | |
| check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI) | |
| @@ -4380,11 +4380,13 @@ elif test "$USE_ARES" = "1"; then | |
| curl_res_msg="c-ares" | |
| fi | |
| - | AC_CHECK_HEADER(dirent.h, |
| - | [ AC_DEFINE(HAVE_DIRENT_H, 1, [if you have <dirent.h>]) |
| - | AC_CHECK_FUNC(opendir, AC_DEFINE(HAVE_OPENDIR, 1, [if you have opendir]) ) |
| - | ] |
| - | ) |
| + | if test "$curl_cv_native_windows" != "yes"; then |
| + | AC_CHECK_HEADER(dirent.h, |
| + | [ AC_DEFINE(HAVE_DIRENT_H, 1, [if you have <dirent.h>]) |
| + | AC_CHECK_FUNC(opendir, AC_DEFINE(HAVE_OPENDIR, 1, [if you have opendir]) ) |
| + | ] |
| + | ) |
| + | fi |
| CURL_CONVERT_INCLUDE_TO_ISYSTEM | |