fstat.m4 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # fstat.m4 serial 7
  2. dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
  3. dnl This file is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6. AC_DEFUN([gl_FUNC_FSTAT],
  7. [
  8. AC_REQUIRE([AC_CANONICAL_HOST])
  9. AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
  10. case "$host_os" in
  11. mingw* | solaris*)
  12. dnl On MinGW, the original stat() returns st_atime, st_mtime,
  13. dnl st_ctime values that are affected by the time zone.
  14. dnl Solaris stat can return a negative tv_nsec.
  15. REPLACE_FSTAT=1
  16. ;;
  17. esac
  18. dnl Replace fstat() for supporting the gnulib-defined open() on directories.
  19. m4_ifdef([gl_FUNC_FCHDIR], [
  20. gl_TEST_FCHDIR
  21. if test $HAVE_FCHDIR = 0; then
  22. case "$gl_cv_func_open_directory_works" in
  23. *yes) ;;
  24. *)
  25. REPLACE_FSTAT=1
  26. ;;
  27. esac
  28. fi
  29. ])
  30. ])
  31. # Prerequisites of lib/fstat.c and lib/stat-w32.c.
  32. AC_DEFUN([gl_PREREQ_FSTAT], [
  33. AC_REQUIRE([gl_HEADER_SYS_STAT_H])
  34. AC_REQUIRE([gl_PREREQ_STAT_W32])
  35. :
  36. ])