Debian Codegraph @

m4/fstat.m4

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