Debian Codegraph @

tools/gnulib/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
8 AC_DEFUN([gl_FUNC_FSTAT],
9 [
10 AC_REQUIRE([AC_CANONICAL_HOST])
11 AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
12
13 case "$host_os" in
14 darwin* | mingw* | windows* | solaris*)
15 dnl macOS and Solaris stat can return a negative tv_nsec.
16 dnl On MinGW, the original stat() returns st_atime, st_mtime,
17 dnl st_ctime values that are affected by the time zone.
18 REPLACE_FSTAT=1
19 ;;
20 esac
21
22 dnl Replace fstat() for supporting the gnulib-defined open() on directories.
23 m4_ifdef([gl_FUNC_FCHDIR], [
24 gl_TEST_FCHDIR
25 if test $HAVE_FCHDIR = 0; then
26 case "$gl_cv_func_open_directory_works" in
27 *yes) ;;
28 *)
29 REPLACE_FSTAT=1
30 ;;
31 esac
32 fi
33 ])
34 ])
35
36 # Prerequisites of lib/fstat.c and lib/stat-w32.c.
37 AC_DEFUN([gl_PREREQ_FSTAT], [
38 AC_REQUIRE([gl_SYS_STAT_H])
39 AC_REQUIRE([gl_PREREQ_STAT_W32])
40 :
41 ])