Add tests for non-POSIX lstat() struct members

This commit is contained in:
Riccardo Mottola 2020-04-09 09:05:46 +02:00
parent 958dec0db2
commit 624140d0fc
3 changed files with 59 additions and 0 deletions

View file

@ -570,6 +570,18 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if `st_birthtimespec' is a member of `struct stat64'. */
#undef HAVE_STRUCT_STAT64_ST_BIRTHTIMESPEC
/* Define to 1 if `st_birthtim' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BIRTHTIM
/* Define to 1 if `st_birthtime' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BIRTHTIME
/* Define to 1 if `st_birthtimespec' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC
/* Define to 1 if you have the `symlink' function. */
#undef HAVE_SYMLINK

43
configure vendored
View file

@ -9454,6 +9454,49 @@ fi
fi
# Look for file creation date on NetBSD, FreeBSD, Darwin
ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "#include <sys/stat.h>
"
if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
_ACEOF
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec" "ac_cv_member_struct_stat_st_birthtimespec" "#include <sys/stat.h>
"
if test "x$ac_cv_member_struct_stat_st_birthtimespec" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC 1
_ACEOF
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim" "ac_cv_member_struct_stat_st_birthtim" "#include <sys/stat.h>
"
if test "x$ac_cv_member_struct_stat_st_birthtim" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_BIRTHTIM 1
_ACEOF
fi
ac_fn_c_check_member "$LINENO" "struct stat64" "st_birthtimespec" "ac_cv_member_struct_stat64_st_birthtimespec" "#include <sys/stat.h>
"
if test "x$ac_cv_member_struct_stat64_st_birthtimespec" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT64_ST_BIRTHTIMESPEC 1
_ACEOF
fi
#--------------------------------------------------------------------
# This function needed by gdomap.c
#--------------------------------------------------------------------

View file

@ -2389,6 +2389,10 @@ fi
AC_CHECK_FUNCS(getcwd)
AC_HEADER_DIRENT
# Look for file creation date on NetBSD, FreeBSD, Darwin
AC_CHECK_MEMBERS([struct stat.st_birthtime, struct stat.st_birthtimespec, struct stat.st_birthtim, struct stat64.st_birthtimespec],
,,[#include <sys/stat.h>])
#--------------------------------------------------------------------
# This function needed by gdomap.c
#--------------------------------------------------------------------