Commit 5fa4ac76 authored by Paul Eggert's avatar Paul Eggert

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>
parent 61353ac8
2011-02-20 Paul Eggert <eggert@cs.ucla.edu>
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>
Import crypto/md5 and stdint modules from gnulib.
......
......@@ -331,7 +331,8 @@ DOS_gnulib_comp.m4 = gl-comp.m4
# $(gnulib_srcdir) (relative to $(srcdir) and should have build tools
# as per $(gnulib_srcdir)/DEPENDENCIES.
GNULIB_MODULES = \
crypto/md5 dtoastr getloadavg getopt-gnu ignore-value mktime strftime
crypto/md5 dtoastr filemode getloadavg getopt-gnu \
ignore-value mktime strftime
GNULIB_TOOL_FLAGS = \
--import --no-changelog --no-vc-files --makefile-name=gnulib.mk
sync-from-gnulib: $(gnulib_srcdir)
......
......@@ -987,6 +987,7 @@ AC_SUBST([am__untar])
m4_include([m4/00gnulib.m4])
m4_include([m4/c-strtod.m4])
m4_include([m4/extensions.m4])
m4_include([m4/filemode.m4])
m4_include([m4/getloadavg.m4])
m4_include([m4/getopt.m4])
m4_include([m4/gl-comp.m4])
......@@ -996,11 +997,13 @@ m4_include([m4/longlong.m4])
m4_include([m4/md5.m4])
m4_include([m4/mktime.m4])
m4_include([m4/multiarch.m4])
m4_include([m4/st_dm_mode.m4])
m4_include([m4/stdbool.m4])
m4_include([m4/stddef_h.m4])
m4_include([m4/stdint.m4])
m4_include([m4/stdlib_h.m4])
m4_include([m4/strftime.m4])
m4_include([m4/sys_stat_h.m4])
m4_include([m4/time_h.m4])
m4_include([m4/time_r.m4])
m4_include([m4/tm_gmtoff.m4])
......
......@@ -677,6 +677,40 @@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
TIME_H_DEFINES_STRUCT_TIMESPEC
NEXT_AS_FIRST_DIRECTIVE_TIME_H
NEXT_TIME_H
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
NEXT_SYS_STAT_H
REPLACE_UTIMENSAT
REPLACE_STAT
REPLACE_MKNOD
REPLACE_MKFIFO
REPLACE_MKDIR
REPLACE_LSTAT
REPLACE_FUTIMENS
REPLACE_FSTATAT
REPLACE_FSTAT
HAVE_UTIMENSAT
HAVE_MKNODAT
HAVE_MKNOD
HAVE_MKFIFOAT
HAVE_MKFIFO
HAVE_MKDIRAT
HAVE_LSTAT
HAVE_LCHMOD
HAVE_FUTIMENS
HAVE_FSTATAT
HAVE_FCHMODAT
GNULIB_UTIMENSAT
GNULIB_STAT
GNULIB_MKNODAT
GNULIB_MKNOD
GNULIB_MKFIFOAT
GNULIB_MKFIFO
GNULIB_MKDIRAT
GNULIB_LSTAT
GNULIB_LCHMOD
GNULIB_FUTIMENS
GNULIB_FSTATAT
GNULIB_FCHMODAT
NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
NEXT_STDLIB_H
STDINT_H
......@@ -2926,6 +2960,7 @@ as_fn_append ac_func_list " alarm"
as_fn_append ac_header_list " wchar.h"
as_fn_append ac_header_list " stdint.h"
as_fn_append ac_func_list " tzset"
as_fn_append ac_header_list " sys/stat.h"
as_fn_append ac_header_list " sys/time.h"
as_fn_append ac_func_list " localtime_r"
# Check that the precious variables saved in the cache have kept the same
......@@ -6089,6 +6124,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
# Code from module dtoastr:
# Code from module extensions:
# Code from module filemode:
# Code from module getloadavg:
# Code from module getopt-gnu:
# Code from module getopt-posix:
......@@ -6103,6 +6139,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
# Code from module stdint:
# Code from module stdlib:
# Code from module strftime:
# Code from module sys_stat:
# Code from module time:
# Code from module time_r:
# Code from module unistd:
......@@ -13718,6 +13755,52 @@ $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
if ${ac_cv_struct_st_dm_mode+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/stat.h>
int
main ()
{
struct stat s; s.st_dm_mode;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_struct_st_dm_mode=yes
else
ac_cv_struct_st_dm_mode=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
if test $ac_cv_struct_st_dm_mode = yes; then
$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
fi
ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
if test "x$ac_cv_have_decl_strmode" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_STRMODE $ac_have_decl
_ACEOF
GNULIB__EXIT=0;
GNULIB_ATOLL=0;
......@@ -14770,6 +14853,84 @@ fi
GNULIB_FCHMODAT=0;
GNULIB_FSTATAT=0;
GNULIB_FUTIMENS=0;
GNULIB_LCHMOD=0;
GNULIB_LSTAT=0;
GNULIB_MKDIRAT=0;
GNULIB_MKFIFO=0;
GNULIB_MKFIFOAT=0;
GNULIB_MKNOD=0;
GNULIB_MKNODAT=0;
GNULIB_STAT=0;
GNULIB_UTIMENSAT=0;
HAVE_FCHMODAT=1;
HAVE_FSTATAT=1;
HAVE_FUTIMENS=1;
HAVE_LCHMOD=1;
HAVE_LSTAT=1;
HAVE_MKDIRAT=1;
HAVE_MKFIFO=1;
HAVE_MKFIFOAT=1;
HAVE_MKNOD=1;
HAVE_MKNODAT=1;
HAVE_UTIMENSAT=1;
REPLACE_FSTAT=0;
REPLACE_FSTATAT=0;
REPLACE_FUTIMENS=0;
REPLACE_LSTAT=0;
REPLACE_MKDIR=0;
REPLACE_MKFIFO=0;
REPLACE_MKNOD=0;
REPLACE_STAT=0;
REPLACE_UTIMENSAT=0;
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
if ${ac_cv_header_stat_broken+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/stat.h>
#if defined S_ISBLK && defined S_IFDIR
extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
#endif
#if defined S_ISBLK && defined S_IFCHR
extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
#endif
#if defined S_ISLNK && defined S_IFREG
extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
#endif
#if defined S_ISSOCK && defined S_IFREG
extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
#endif
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_header_stat_broken=no
else
ac_cv_header_stat_broken=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
$as_echo "$ac_cv_header_stat_broken" >&6; }
if test $ac_cv_header_stat_broken = yes; then
$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
if ${ac_cv_c_restrict+:} false; then :
......@@ -15033,6 +15194,21 @@ fi
# Code from module dtoastr:
# Code from module extensions:
# Code from module filemode:
gl_LIBOBJS="$gl_LIBOBJS filemode.$ac_objext"
# Code from module getloadavg:
......@@ -16783,6 +16959,90 @@ $as_echo "#define my_strftime nstrftime" >>confdefs.h
# Code from module sys_stat:
if test $gl_cv_have_include_next = yes; then
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
if ${gl_cv_next_sys_stat_h+:} false; then :
$as_echo_n "(cached) " >&6
else
if test $ac_cv_header_sys_stat_h = yes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/stat.h>
_ACEOF
case "$host_os" in
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
sed -n '\#/sys/stat.h#{
s#.*"\(.*/sys/stat.h\)".*#\1#
s#^/[^/]#//&#
p
q
}'`'"'
else
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
$as_echo "$gl_cv_next_sys_stat_h" >&6; }
fi
NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
gl_next_as_first_directive='<'sys/stat.h'>'
else
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
gl_next_as_first_directive=$gl_cv_next_sys_stat_h
fi
NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
#include <sys/stat.h>
"
if test "x$ac_cv_type_nlink_t" = xyes; then :
else
$as_echo "#define nlink_t int" >>confdefs.h
fi
# Code from module time:
......
BUILT_SOURCES =
EXTRA_DIST =
MOSTLYCLEANDIRS =
MOSTLYCLEANFILES =
noinst_LIBRARIES =
......
This diff is collapsed.
/* filemode.c -- make a string describing file modes
Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2011 Free
Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include "filemode.h"
/* The following is for Cray DMF (Data Migration Facility), which is a
HSM file system. A migrated file has a `st_dm_mode' that is
different from the normal `st_mode', so any tests for migrated
files should use the former. */
#if HAVE_ST_DM_MODE
# define IS_MIGRATED_FILE(statp) \
(S_ISOFD (statp->st_dm_mode) || S_ISOFL (statp->st_dm_mode))
#else
# define IS_MIGRATED_FILE(statp) 0
#endif
#if ! HAVE_DECL_STRMODE
/* Return a character indicating the type of file described by
file mode BITS:
'-' regular file
'b' block special file
'c' character special file
'C' high performance ("contiguous data") file
'd' directory
'D' door
'l' symbolic link
'm' multiplexed file (7th edition Unix; obsolete)
'n' network special file (HP-UX)
'p' fifo (named pipe)
'P' port
's' socket
'w' whiteout (4.4BSD)
'?' some other file type */
static char
ftypelet (mode_t bits)
{
/* These are the most common, so test for them first. */
if (S_ISREG (bits))
return '-';
if (S_ISDIR (bits))
return 'd';
/* Other letters standardized by POSIX 1003.1-2004. */
if (S_ISBLK (bits))
return 'b';
if (S_ISCHR (bits))
return 'c';
if (S_ISLNK (bits))
return 'l';
if (S_ISFIFO (bits))
return 'p';
/* Other file types (though not letters) standardized by POSIX. */
if (S_ISSOCK (bits))
return 's';
/* Nonstandard file types. */
if (S_ISCTG (bits))
return 'C';
if (S_ISDOOR (bits))
return 'D';
if (S_ISMPB (bits) || S_ISMPC (bits))
return 'm';
if (S_ISNWK (bits))
return 'n';
if (S_ISPORT (bits))
return 'P';
if (S_ISWHT (bits))
return 'w';
return '?';
}
/* Like filemodestring, but rely only on MODE. */
void
strmode (mode_t mode, char *str)
{
str[0] = ftypelet (mode);
str[1] = mode & S_IRUSR ? 'r' : '-';
str[2] = mode & S_IWUSR ? 'w' : '-';
str[3] = (mode & S_ISUID
? (mode & S_IXUSR ? 's' : 'S')
: (mode & S_IXUSR ? 'x' : '-'));
str[4] = mode & S_IRGRP ? 'r' : '-';
str[5] = mode & S_IWGRP ? 'w' : '-';
str[6] = (mode & S_ISGID
? (mode & S_IXGRP ? 's' : 'S')
: (mode & S_IXGRP ? 'x' : '-'));
str[7] = mode & S_IROTH ? 'r' : '-';
str[8] = mode & S_IWOTH ? 'w' : '-';
str[9] = (mode & S_ISVTX
? (mode & S_IXOTH ? 't' : 'T')
: (mode & S_IXOTH ? 'x' : '-'));
str[10] = ' ';
str[11] = '\0';
}
#endif /* ! HAVE_DECL_STRMODE */
/* filemodestring - fill in string STR with an ls-style ASCII
representation of the st_mode field of file stats block STATP.
12 characters are stored in STR.
The characters stored in STR are:
0 File type, as in ftypelet above, except that other letters are used
for files whose type cannot be determined solely from st_mode:
'F' semaphore
'M' migrated file (Cray DMF)
'Q' message queue
'S' shared memory object
'T' typed memory object
1 'r' if the owner may read, '-' otherwise.
2 'w' if the owner may write, '-' otherwise.
3 'x' if the owner may execute, 's' if the file is
set-user-id, '-' otherwise.
'S' if the file is set-user-id, but the execute
bit isn't set.
4 'r' if group members may read, '-' otherwise.
5 'w' if group members may write, '-' otherwise.
6 'x' if group members may execute, 's' if the file is
set-group-id, '-' otherwise.
'S' if it is set-group-id but not executable.
7 'r' if any user may read, '-' otherwise.
8 'w' if any user may write, '-' otherwise.
9 'x' if any user may execute, 't' if the file is "sticky"
(will be retained in swap space after execution), '-'
otherwise.
'T' if the file is sticky but not executable.
10 ' ' for compatibility with 4.4BSD strmode,
since this interface does not support ACLs.
11 '\0'. */
void
filemodestring (struct stat const *statp, char *str)
{
strmode (statp->st_mode, str);
if (S_TYPEISSEM (statp))
str[0] = 'F';
else if (IS_MIGRATED_FILE (statp))
str[0] = 'M';
else if (S_TYPEISMQ (statp))
str[0] = 'Q';
else if (S_TYPEISSHM (statp))
str[0] = 'S';
else if (S_TYPEISTMO (statp))
str[0] = 'T';
}
/* Make a string describing file modes.
Copyright (C) 1998-1999, 2003, 2006, 2009-2011 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef FILEMODE_H_
# include <sys/types.h>
# include <sys/stat.h>
/* Get the declaration of strmode. */
# if HAVE_DECL_STRMODE
# include <string.h> /* MacOS X, FreeBSD, OpenBSD */
# include <unistd.h> /* NetBSD */
# endif
# ifdef __cplusplus
extern "C" {
# endif
# if !HAVE_DECL_STRMODE
extern void strmode (mode_t mode, char *str);
# endif
extern void filemodestring (struct stat const *statp, char *str);
# ifdef __cplusplus
}
# endif
#endif
......@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr getloadavg getopt-gnu ignore-value mktime strftime
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value mktime strftime
MOSTLYCLEANFILES += core *.stackdump
......@@ -88,6 +88,15 @@ EXTRA_libgnu_a_SOURCES += ftoastr.c
## end gnulib module dtoastr
## begin gnulib module filemode
EXTRA_DIST += filemode.c filemode.h
EXTRA_libgnu_a_SOURCES += filemode.c
## end gnulib module filemode
## begin gnulib module getloadavg
......@@ -331,6 +340,65 @@ EXTRA_libgnu_a_SOURCES += strftime.c
## end gnulib module strftime
## begin gnulib module sys_stat
BUILT_SOURCES += sys/stat.h
# We need the following in order to create <sys/stat.h> when the system
# has one that is incomplete.
sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
-e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
-e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
-e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \
-e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
-e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
-e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \
-e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \
-e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \
-e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \
-e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \
-e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \
-e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \
-e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
-e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
-e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
-e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
-e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
-e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
-e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
-e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
-e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
-e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
-e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
-e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
-e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
-e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
-e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
-e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
-e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
-e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
-e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
-e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/sys_stat.in.h; \
} > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
MOSTLYCLEANDIRS += sys
EXTRA_DIST += sys_stat.in.h
## end gnulib module sys_stat
## begin gnulib module time
BUILT_SOURCES += time.h
......
This diff is collapsed.
......@@ -55,7 +55,7 @@ Each entry has the form (FUNCTION . FUNCTIONS-IT-CALLS).")
"term.c" "cm.c" "emacs.c" "keyboard.c" "macros.c"
"keymap.c" "sysdep.c" "buffer.c" "filelock.c"
"insdel.c" "marker.c" "minibuf.c" "fileio.c"
"dired.c" "filemode.c" "cmds.c" "casefiddle.c"
"dired.c" "cmds.c" "casefiddle.c"
"indent.c" "search.c" "regex.c" "undo.c"
"alloc.c" "data.c" "doc.c" "editfns.c"
"callint.c" "eval.c" "fns.c" "print.c" "lread.c"
......
# filemode.m4 serial 7
dnl Copyright (C) 2002, 2005-2006, 2009-2011 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.
AC_DEFUN([gl_FILEMODE],
[
AC_REQUIRE([AC_STRUCT_ST_DM_MODE])
AC_LIBOBJ([filemode])
AC_CHECK_DECLS_ONCE([strmode])
])
......@@ -32,6 +32,7 @@ AC_DEFUN([gl_EARLY],
# Code from module dtoastr:
# Code from module extensions:
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
# Code from module filemode:
# Code from module getloadavg:
# Code from module getopt-gnu:
# Code from module getopt-posix:
......@@ -46,6 +47,7 @@ AC_DEFUN([gl_EARLY],
# Code from module stdint:
# Code from module stdlib:
# Code from module strftime:
# Code from module sys_stat:
# Code from module time:
# Code from module time_r:
# Code from module unistd:
......@@ -75,6 +77,8 @@ AC_DEFUN([gl_INIT],
# Code from module dtoastr:
AC_REQUIRE([gl_C99_STRTOLD])
# Code from module extensions:
# Code from module filemode:
gl_FILEMODE
# Code from module getloadavg:
gl_GETLOADAVG([$gl_source_base])
gl_STDLIB_MODULE_INDICATOR([getloadavg])
......@@ -105,6 +109,9 @@ AC_DEFUN([gl_INIT],
gl_STDLIB_H
# Code from module strftime:
gl_FUNC_GNU_STRFTIME
# Code from module sys_stat:
gl_HEADER_SYS_STAT_H
AC_PROG_MKDIR_P
# Code from module time:
gl_HEADER_TIME_H
# Code from module time_r:
......@@ -257,6 +264,8 @@ AC_DEFUN([gl_FILE_LIST], [
build-aux/c++defs.h
build-aux/warn-on-use.h
lib/dtoastr.c
lib/filemode.c
lib/filemode.h