Merge from gnulib for 'inline'.
2012-11-29 snippet/warn-on-use: no 'static inline'
2012-11-29 ftruncate, fts, lstat, openat, raise: no 'static inline'
2012-11-29 arctwo, md4, md5, sha1, sha256, sha512: no 'static inline'
2012-11-29 fflush, stat: no 'static inline'
2012-11-29 stdio: better 'inline'
2012-11-29 sys_stat: no 'static inline'
2012-11-29 unistd: better 'inline'
2012-11-29 c-strtod, memcoll, readutmp: no 'static inline'
2012-11-29 extern-inline: no 'static inline'
2012-11-29 sys_socket: better 'inline'
* lib/stdio.c, lib/unistd.c: New files, from gnulib.
* build-aux/snippet/warn-on-use.h, lib/gnulib.mk, lib/lstat.c:
* lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c, lib/stat.c:
* lib/stdio.in.h, lib/sys_stat.in.h, lib/unistd.in.h, m4/c-strtod.m4:
* m4/extern-inline.m4, m4/gnulib-comp.m4, m4/lstat.m4, m4/md5.m4:
* m4/sha1.m4, m4/sha256.m4, m4/sha512.m4, m4/stat.m4, m4/stdio_h.m4:
* m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/unistd_h.m4:
Update from gnulib.
Fixes: debbugs:13040
2012-11-30 18:25:59 +00:00
|
|
|
# sys_stat_h.m4 serial 28 -*- Autoconf -*-
|
2015-01-01 19:05:24 +00:00
|
|
|
dnl Copyright (C) 2006-2015 Free Software Foundation, Inc.
|
Import filemode module from gnulib.
* .bzrignore: Add lib/sys/.
* Makefile.in (GNULIB_MODULES): Add filemode.
* lib/Makefile.am (MOSTLYCLEANDIRS): New macro.
* lib/filemode.c: Renamed from src/filemode.c and regenerated
from gnulib. This adds support for some more file types, e.g.,
Cray DMF migrated files.
* lisp/emacs-lisp/find-gc.el (find-gc-source-files): Remove filemode.c.
* lib/filemode.h, lib/sys_stat.in.h, m4/filemode.m4, m4/st_dm_mode.m4:
* m4/sys_stat_h.m4: New files, generated from gnulib.
* aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4:
Regenerate.
2011-02-20 Paul Eggert <eggert@cs.ucla.edu>
2011-02-20 10:51:50 +00:00
|
|
|
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.
|
|
|
|
|
|
|
|
dnl From Eric Blake.
|
|
|
|
dnl Provide a GNU-like <sys/stat.h>.
|
|
|
|
|
|
|
|
AC_DEFUN([gl_HEADER_SYS_STAT_H],
|
|
|
|
[
|
|
|
|
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
|
|
|
|
|
|
|
|
dnl Check for broken stat macros.
|
|
|
|
AC_REQUIRE([AC_HEADER_STAT])
|
|
|
|
|
|
|
|
gl_CHECK_NEXT_HEADERS([sys/stat.h])
|
|
|
|
|
Merge from gnulib, improving some licensing wording.
This clarifies and fixes some licensing issues raised by Glenn Morris
<http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00397.html>.
It also merges the latest version of texinfo.tex and has some
MSVC-related changes that don't affect Emacs.
* Makefile.in (GNULIB_TOOL_FLAGS): Avoid msvc-inval, msvc-nothrow,
pathmax, and raise, since these are needed only to address
MSVC-related issues that Emacs doesn't have.
* doc/misc/texinfo.tex, lib/dup2.c, lib/gnulib.mk, lib/signal.in.h:
* lib/sigprocmask.c, lib/stat.c, lib/stdio.in.h, lib/sys_stat.in.h:
* lib/unistd.in.h, m4/dup2.m4, m4/getloadavg.m4, m4/gl-comp.m4:
* m4/include_next.m4, m4/signal_h.m4, m4/signalblocking.m4:
* m4/stdint.m4, m4/stdio_h.m4, m4/sys_stat_h.m4, m4/time_h.m4:
* m4/unistd_h.m4: Merge from gnulib.
2011-09-26 21:30:18 +00:00
|
|
|
dnl Ensure the type mode_t gets defined.
|
|
|
|
AC_REQUIRE([AC_TYPE_MODE_T])
|
|
|
|
|
2012-05-26 23:14:36 +00:00
|
|
|
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
|
|
|
|
|
Import filemode module from gnulib.
* .bzrignore: Add lib/sys/.
* Makefile.in (GNULIB_MODULES): Add filemode.
* lib/Makefile.am (MOSTLYCLEANDIRS): New macro.
* lib/filemode.c: Renamed from src/filemode.c and regenerated
from gnulib. This adds support for some more file types, e.g.,
Cray DMF migrated files.
* lisp/emacs-lisp/find-gc.el (find-gc-source-files): Remove filemode.c.
* lib/filemode.h, lib/sys_stat.in.h, m4/filemode.m4, m4/st_dm_mode.m4:
* m4/sys_stat_h.m4: New files, generated from gnulib.
* aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4:
Regenerate.
2011-02-20 Paul Eggert <eggert@cs.ucla.edu>
2011-02-20 10:51:50 +00:00
|
|
|
dnl Define types that are supposed to be defined in <sys/types.h> or
|
|
|
|
dnl <sys/stat.h>.
|
|
|
|
AC_CHECK_TYPE([nlink_t], [],
|
|
|
|
[AC_DEFINE([nlink_t], [int],
|
|
|
|
[Define to the type of st_nlink in struct stat, or a supertype.])],
|
|
|
|
[#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>])
|
|
|
|
|
|
|
|
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 <sys/stat.h>
|
Merge from gnulib, improving some licensing wording.
This clarifies and fixes some licensing issues raised by Glenn Morris
<http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00397.html>.
It also merges the latest version of texinfo.tex and has some
MSVC-related changes that don't affect Emacs.
* Makefile.in (GNULIB_TOOL_FLAGS): Avoid msvc-inval, msvc-nothrow,
pathmax, and raise, since these are needed only to address
MSVC-related issues that Emacs doesn't have.
* doc/misc/texinfo.tex, lib/dup2.c, lib/gnulib.mk, lib/signal.in.h:
* lib/sigprocmask.c, lib/stat.c, lib/stdio.in.h, lib/sys_stat.in.h:
* lib/unistd.in.h, m4/dup2.m4, m4/getloadavg.m4, m4/gl-comp.m4:
* m4/include_next.m4, m4/signal_h.m4, m4/signalblocking.m4:
* m4/stdint.m4, m4/stdio_h.m4, m4/sys_stat_h.m4, m4/time_h.m4:
* m4/unistd_h.m4: Merge from gnulib.
2011-09-26 21:30:18 +00:00
|
|
|
]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
|
Import filemode module from gnulib.
* .bzrignore: Add lib/sys/.
* Makefile.in (GNULIB_MODULES): Add filemode.
* lib/Makefile.am (MOSTLYCLEANDIRS): New macro.
* lib/filemode.c: Renamed from src/filemode.c and regenerated
from gnulib. This adds support for some more file types, e.g.,
Cray DMF migrated files.
* lisp/emacs-lisp/find-gc.el (find-gc-source-files): Remove filemode.c.
* lib/filemode.h, lib/sys_stat.in.h, m4/filemode.m4, m4/st_dm_mode.m4:
* m4/sys_stat_h.m4: New files, generated from gnulib.
* aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4:
Regenerate.
2011-02-20 Paul Eggert <eggert@cs.ucla.edu>
2011-02-20 10:51:50 +00:00
|
|
|
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])
|
|
|
|
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])
|
Merge from gnulib, improving some licensing wording.
This clarifies and fixes some licensing issues raised by Glenn Morris
<http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00397.html>.
It also merges the latest version of texinfo.tex and has some
MSVC-related changes that don't affect Emacs.
* Makefile.in (GNULIB_TOOL_FLAGS): Avoid msvc-inval, msvc-nothrow,
pathmax, and raise, since these are needed only to address
MSVC-related issues that Emacs doesn't have.
* doc/misc/texinfo.tex, lib/dup2.c, lib/gnulib.mk, lib/signal.in.h:
* lib/sigprocmask.c, lib/stat.c, lib/stdio.in.h, lib/sys_stat.in.h:
* lib/unistd.in.h, m4/dup2.m4, m4/getloadavg.m4, m4/gl-comp.m4:
* m4/include_next.m4, m4/signal_h.m4, m4/signalblocking.m4:
* m4/stdint.m4, m4/stdio_h.m4, m4/sys_stat_h.m4, m4/time_h.m4:
* m4/unistd_h.m4: Merge from gnulib.
2011-09-26 21:30:18 +00:00
|
|
|
GNULIB_FSTAT=0; AC_SUBST([GNULIB_FSTAT])
|
Import filemode module from gnulib.
* .bzrignore: Add lib/sys/.
* Makefile.in (GNULIB_MODULES): Add filemode.
* lib/Makefile.am (MOSTLYCLEANDIRS): New macro.
* lib/filemode.c: Renamed from src/filemode.c and regenerated
from gnulib. This adds support for some more file types, e.g.,
Cray DMF migrated files.
* lisp/emacs-lisp/find-gc.el (find-gc-source-files): Remove filemode.c.
* lib/filemode.h, lib/sys_stat.in.h, m4/filemode.m4, m4/st_dm_mode.m4:
* m4/sys_stat_h.m4: New files, generated from gnulib.
* aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4:
Regenerate.
2011-02-20 Paul Eggert <eggert@cs.ucla.edu>
2011-02-20 10:51:50 +00:00
|
|
|
GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT])
|
|
|
|
GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS])
|
|
|
|
GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD])
|
|
|
|
GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT])
|
|
|
|
GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT])
|
|
|
|
GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO])
|
|
|
|
GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT])
|
|
|
|
GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD])
|
|
|
|
GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT])
|
|
|
|
GNULIB_STAT=0; AC_SUBST([GNULIB_STAT])
|
|
|
|
GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT])
|
|
|
|
dnl Assume proper GNU behavior unless another module says otherwise.
|
|
|
|
HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT])
|
|
|
|
HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT])
|
|
|
|
HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS])
|
|
|
|
HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD])
|
|
|
|
HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT])
|
|
|
|
HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT])
|
|
|
|
HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO])
|
|
|
|
HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT])
|
|
|
|
HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD])
|
|
|
|
HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT])
|
|
|
|
HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT])
|
|
|
|
REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT])
|
|
|
|
REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT])
|
|
|
|
REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS])
|
|
|
|
REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT])
|
|
|
|
REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR])
|
|
|
|
REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO])
|
|
|
|
REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD])
|
|
|
|
REPLACE_STAT=0; AC_SUBST([REPLACE_STAT])
|
|
|
|
REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT])
|
|
|
|
])
|