X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fsys_stat_h.m4;h=eaa7642ba311bd74570887f5a8d6b9bead70a9b2;hb=6a0fd2e2d7d6a7e787ada21ffbe5f8ac0e3a06f1;hp=4cec9cdfcc7465e40390623556d9d1e5d382b15c;hpb=8d8eda4eab3d2801251daf4eb31756c3595e2fc6;p=gnulib.git diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4 index 4cec9cdfc..eaa7642ba 100644 --- a/m4/sys_stat_h.m4 +++ b/m4/sys_stat_h.m4 @@ -1,5 +1,5 @@ -# sys_stat_h.m4 serial 21 -*- Autoconf -*- -dnl Copyright (C) 2006-2010 Free Software Foundation, Inc. +# sys_stat_h.m4 serial 28 -*- Autoconf -*- +dnl Copyright (C) 2006-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,14 +11,27 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - dnl For the mkdir substitute. - AC_REQUIRE([AC_C_INLINE]) - dnl Check for broken stat macros. AC_REQUIRE([AC_HEADER_STAT]) gl_CHECK_NEXT_HEADERS([sys/stat.h]) + dnl Ensure the type mode_t gets defined. + AC_REQUIRE([AC_TYPE_MODE_T]) + + dnl Whether to override 'struct stat'. + m4_ifdef([gl_LARGEFILE], [ + AC_REQUIRE([gl_LARGEFILE]) + ], [ + WINDOWS_64_BIT_ST_SIZE=0 + ]) + AC_SUBST([WINDOWS_64_BIT_ST_SIZE]) + if test $WINDOWS_64_BIT_ST_SIZE = 1; then + AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1], + [Define to 1 if Gnulib overrides 'struct stat' on Windows so that + struct stat.st_size becomes 64-bit.]) + fi + dnl Define types that are supposed to be defined in or dnl . AC_CHECK_TYPE([nlink_t], [], @@ -27,19 +40,27 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H], [#include #include ]) + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[#include + ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat + mknod mknodat stat utimensat]) ]) # gl_HEADER_SYS_STAT_H AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 + gl_MODULE_INDICATOR_SET_VARIABLE([$1]) + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) + GNULIB_FSTAT=0; AC_SUBST([GNULIB_FSTAT]) GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD])