Annotation of embedaddon/libiconv/srcm4/sys_stat_h.m4, revision 1.1.1.2
1.1.1.2 ! misho 1: # sys_stat_h.m4 serial 31 -*- Autoconf -*-
! 2: dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
1.1 misho 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:
7: dnl From Eric Blake.
8: dnl Provide a GNU-like <sys/stat.h>.
9:
10: AC_DEFUN([gl_HEADER_SYS_STAT_H],
11: [
12: AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
13:
14: dnl Check for broken stat macros.
15: AC_REQUIRE([AC_HEADER_STAT])
16:
17: gl_CHECK_NEXT_HEADERS([sys/stat.h])
18:
1.1.1.2 ! misho 19: dnl Ensure the type mode_t gets defined.
! 20: AC_REQUIRE([AC_TYPE_MODE_T])
! 21:
! 22: dnl Whether to enable precise timestamps in 'struct stat'.
! 23: m4_ifdef([gl_WINDOWS_STAT_TIMESPEC], [
! 24: AC_REQUIRE([gl_WINDOWS_STAT_TIMESPEC])
! 25: ], [
! 26: WINDOWS_STAT_TIMESPEC=0
! 27: ])
! 28: AC_SUBST([WINDOWS_STAT_TIMESPEC])
! 29:
! 30: dnl Whether to ensure that struct stat.st_size is 64-bit wide.
! 31: m4_ifdef([gl_LARGEFILE], [
! 32: AC_REQUIRE([gl_LARGEFILE])
! 33: ], [
! 34: WINDOWS_64_BIT_ST_SIZE=0
! 35: ])
! 36: AC_SUBST([WINDOWS_64_BIT_ST_SIZE])
! 37:
1.1 misho 38: dnl Define types that are supposed to be defined in <sys/types.h> or
39: dnl <sys/stat.h>.
40: AC_CHECK_TYPE([nlink_t], [],
41: [AC_DEFINE([nlink_t], [int],
42: [Define to the type of st_nlink in struct stat, or a supertype.])],
43: [#include <sys/types.h>
44: #include <sys/stat.h>])
45:
46: dnl Check for declarations of anything we want to poison if the
47: dnl corresponding gnulib module is not in use.
48: gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
1.1.1.2 ! misho 49: ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
1.1 misho 50: mknod mknodat stat utimensat])
51: ]) # gl_HEADER_SYS_STAT_H
52:
53: AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
54: [
55: dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
56: AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
57: gl_MODULE_INDICATOR_SET_VARIABLE([$1])
58: dnl Define it also as a C macro, for the benefit of the unit tests.
59: gl_MODULE_INDICATOR_FOR_TESTS([$1])
60: ])
61:
62: AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
63: [
64: AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
65: GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT])
1.1.1.2 ! misho 66: GNULIB_FSTAT=0; AC_SUBST([GNULIB_FSTAT])
1.1 misho 67: GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT])
68: GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS])
69: GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD])
70: GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT])
71: GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT])
72: GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO])
73: GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT])
74: GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD])
75: GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT])
76: GNULIB_STAT=0; AC_SUBST([GNULIB_STAT])
77: GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT])
1.1.1.2 ! misho 78: GNULIB_OVERRIDES_STRUCT_STAT=0; AC_SUBST([GNULIB_OVERRIDES_STRUCT_STAT])
1.1 misho 79: dnl Assume proper GNU behavior unless another module says otherwise.
80: HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT])
81: HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT])
82: HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS])
83: HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD])
84: HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT])
85: HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT])
86: HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO])
87: HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT])
88: HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD])
89: HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT])
90: HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT])
91: REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT])
92: REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT])
93: REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS])
94: REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT])
95: REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR])
96: REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO])
97: REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD])
98: REPLACE_STAT=0; AC_SUBST([REPLACE_STAT])
99: REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT])
100: ])
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>