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
'#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,
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)
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)
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)
netinet/udp.h \
netdb.h \
sys/sockio.h \
- sys/stat.h \
sys/param.h \
termios.h \
termio.h \
#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
/* 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
#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
/* 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
/* 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
/* 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
#include <sys/types.h>
#endif
-#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
-#endif
#if !defined(_WIN32) || defined(__MINGW32__)
#include <sys/time.h>
#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
#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
#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
#include <fcntl.h>
#endif
-#include <sys/stat.h>
-
#include "tool_cfgable.h"
#include "tool_msgs.h"
#include "tool_cb_wrt.h"
***************************************************************************/
#include "tool_setup.h"
-#include <sys/stat.h>
-
#if defined(_WIN32) && !defined(UNDER_CE)
# include <direct.h>
#endif
#define __NO_NET_API
#endif
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
***************************************************************************/
#include "tool_setup.h"
-#include <sys/stat.h>
-
#ifdef _WIN32
#include <tchar.h>
#endif