]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
build: stop checking for `sys/stat.h`
authorViktor Szakats <commit@vsz.me>
Mon, 23 Jun 2025 17:48:19 +0000 (19:48 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 24 Jun 2025 07:44:28 +0000 (09:44 +0200)
It has been used unconditionally in `src` and `tests` since at least
2011-09-19 via fdecb56cbfcafe5b770c4181133655b89973f41e. There are
earlier unguarded references in `tests`.

Also de-duplicate to include it just once.

Ref: https://github.com/curl/curl/pull/17717#issuecomment-2996631026

Closes #17724

19 files changed:
.github/scripts/cmp-config.pl
CMake/unix-cache.cmake
CMake/win32-cache.cmake
CMakeLists.txt
configure.ac
lib/config-mac.h
lib/config-os400.h
lib/config-plan9.h
lib/config-riscos.h
lib/config-win32.h
lib/curl_config.h.cmake
lib/curl_setup_once.h
lib/vssh/libssh.c
lib/vtls/vtls.c
lib/vtls/vtls_scache.c
src/tool_cb_wrt.c
src/tool_dirhie.c
src/tool_findfile.c
src/tool_main.c

index f6dee00f9bbb894f8efa4d64a82e1e948071afbe..930168c812478b766414dc063658c70f64967520 100755 (executable)
@@ -73,6 +73,7 @@ my %remove = (
     '#define HAVE_STDIO_H 1' => 1,
     '#define HAVE_STDLIB_H 1' => 1,
     '#define HAVE_STRING_H 1' => 1,
+    '#define HAVE_SYS_STAT_H 1' => 1,
     '#define HAVE_SYS_XATTR_H 1' => 1,
     '#define HAVE_UNICODE_UIDNA_H 1' => 1,
     '#define HAVE_WOLFSSH_SSH_H 1' => 1,
index 2f0da667552ea15ad38a03c763e2d1878c98d861..2c85626a49574b2cea9abad9567498a51305c050 100644 (file)
@@ -286,7 +286,6 @@ if(CYGWIN OR
 else()
   set(HAVE_SYS_SOCKIO_H 1)
 endif()
-set(HAVE_SYS_STAT_H 1)
 set(HAVE_SYS_TYPES_H 1)
 set(HAVE_SYS_UN_H 1)
 if(CYGWIN)
index 3bf77bb840944360bbe183c2d8d26c134213f4ad..4fe9eb1139f54a7c845acc0cfab98f93938ce833 100644 (file)
@@ -169,7 +169,6 @@ set(HAVE_SYS_POLL_H 0)
 set(HAVE_SYS_RESOURCE_H 0)
 set(HAVE_SYS_SELECT_H 0)
 set(HAVE_SYS_SOCKIO_H 0)
-set(HAVE_SYS_STAT_H 1)
 set(HAVE_SYS_TYPES_H 1)
 set(HAVE_SYS_UN_H 0)
 set(HAVE_SYS_UTIME_H 1)
index 08c6632669545054dc812c51d6abb03c05510c7a..d3c91e2f3fb37b0ebd83e9f1ce62ee97b2f738f4 100644 (file)
@@ -1638,7 +1638,6 @@ check_include_file("sys/poll.h"       HAVE_SYS_POLL_H)
 check_include_file("sys/resource.h"   HAVE_SYS_RESOURCE_H)
 check_include_file_concat_curl("sys/select.h"     HAVE_SYS_SELECT_H)
 check_include_file("sys/sockio.h"     HAVE_SYS_SOCKIO_H)
-check_include_file("sys/stat.h"       HAVE_SYS_STAT_H)
 check_include_file_concat_curl("sys/types.h"      HAVE_SYS_TYPES_H)
 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)
index 0d5da0073e742c59c2dc169e1cbe00b6c1fa4cba..f027cae0ecb1dd0e369f33da91f34892dd55956b 100644 (file)
@@ -3912,7 +3912,6 @@ AC_CHECK_HEADERS(
   netinet/udp.h \
   netdb.h \
   sys/sockio.h \
-  sys/stat.h \
   sys/param.h \
   termios.h \
   termio.h \
index 435e1293e036b15233b223e66fcefe8c07d1c5b2..6da544fe8fa1f1d0d5648c47f6074c5e3b61faec 100644 (file)
@@ -50,7 +50,6 @@
 #define HAVE_SYS_TYPES_H        1
 #define HAVE_GETTIMEOFDAY       1
 #define HAVE_FCNTL_H            1
-#define HAVE_SYS_STAT_H         1
 #define HAVE_UTIME_H            1
 #define HAVE_SYS_UTIME_H        1
 #define HAVE_SYS_IOCTL_H        1
index ec7fc9129d92546cdcd7f16931edb4268b75b0eb..064338ed2abdd84c86f21b8d863001b05083562b 100644 (file)
 /* Define if you have the <sys/sockio.h> header file. */
 #undef HAVE_SYS_SOCKIO_H
 
-/* Define if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H
-
 /* Define if you have the <sys/types.h> header file. */
 #define HAVE_SYS_TYPES_H
 
index 8d19925993d199bdc6690d0cc2405dea61948f8a..68d0cf7f569fac7d93dc8f23d33454c5ff819b1d 100644 (file)
 #define HAVE_SYS_IOCTL_H 1
 #define HAVE_SYS_PARAM_H 1
 #define HAVE_SYS_RESOURCE_H 1
-#define HAVE_SYS_STAT_H 1
 #define HAVE_SYS_TYPES_H 1
 #define HAVE_SYS_UN_H 1
 #define HAVE_TERMIOS_H 1
index 03a3cde074d8ce576f4a5080eff20d583b3ce0d8..3158c984ee3615e31d7a302a3648da8d2865323e 100644 (file)
 /* Define if you have the <sys/sockio.h> header file. */
 #undef HAVE_SYS_SOCKIO_H
 
-/* Define if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
 /* Define if you have the <sys/types.h> header file. */
 #define HAVE_SYS_TYPES_H
 
index 176f65a3b73379bb22827d3a0a64c651cc869ab0..363e7d85bf8607e852459728d3e4a5671a1d1c04 100644 (file)
@@ -77,9 +77,6 @@
 /* Define if you have the <sys/sockio.h> header file. */
 /* #define HAVE_SYS_SOCKIO_H 1 */
 
-/* Define if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
 /* Define if you have the <sys/types.h> header file. */
 #define HAVE_SYS_TYPES_H 1
 
index 3a9abaf1e9bae39d58b558ee090cf1dbec1a8456..0838ddccfba3fe98ba40e4ecc25d98d450185ab3 100644 (file)
 /* Define to 1 if you have the <sys/sockio.h> header file. */
 #cmakedefine HAVE_SYS_SOCKIO_H 1
 
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#cmakedefine HAVE_SYS_STAT_H 1
-
 /* Define to 1 if you have the <sys/types.h> header file. */
 #cmakedefine HAVE_SYS_TYPES_H 1
 
index 8d0cfcb3875818954a5e1f1a7e5a1803a31e30e6..bec45de88880bf1358eb6d876a2a6a81f3149386 100644 (file)
@@ -41,9 +41,7 @@
 #include <sys/types.h>
 #endif
 
-#ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
-#endif
 
 #if !defined(_WIN32) || defined(__MINGW32__)
 #include <sys/time.h>
index 643b8f4987f7a0bea212f2ca70f35fd0719ef1d3..ca0c5d09b28c0754e29d8c0650147c915e85ca19 100644 (file)
@@ -70,9 +70,6 @@
 #include "../curlx/warnless.h"
 #include "curl_path.h"
 
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 53fc329d077870ec7dc560616dc75f872d5d37b9..43f251a0a97acdfcd0f9f07376e59444a1db309f 100644 (file)
@@ -43,9 +43,6 @@
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index 1fe4b5bbdee64168c671679420ebc4cac751a381..15104294e2223fc851f2eb8a00122f9a4972085c 100644 (file)
@@ -29,9 +29,6 @@
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index 9babd54cf70a4fcc3e368eee43fbbcdef0ffe526..17574c6ecad6f9ece897b66719f447ae95aae5ac 100644 (file)
@@ -28,8 +28,6 @@
 #include <fcntl.h>
 #endif
 
-#include <sys/stat.h>
-
 #include "tool_cfgable.h"
 #include "tool_msgs.h"
 #include "tool_cb_wrt.h"
index de4bdcef647f10ed37273e9fd1dd1251df5dcf00..e4e3e859e7b417bc4cab1226edd54e66a60069b0 100644 (file)
@@ -23,8 +23,6 @@
  ***************************************************************************/
 #include "tool_setup.h"
 
-#include <sys/stat.h>
-
 #if defined(_WIN32) && !defined(UNDER_CE)
 #  include <direct.h>
 #endif
index 4b09d0f708a114770fc26fa86d7cc7fd7a22c96b..72868f4b4f7344d20baeb020390ddfa6524dea59 100644 (file)
@@ -29,9 +29,6 @@
 #define __NO_NET_API
 #endif
 
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index 6c994d971f30750d2174183f09db66471fb04334..b1135f86283a27c79389cd33a7b296575db16db2 100644 (file)
@@ -23,8 +23,6 @@
  ***************************************************************************/
 #include "tool_setup.h"
 
-#include <sys/stat.h>
-
 #ifdef _WIN32
 #include <tchar.h>
 #endif