diff options
| author | Paul Eggert | 2011-02-20 02:51:50 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-02-20 02:51:50 -0800 |
| commit | 5fa4ac767c6aaf9203d2ec6ff2f90a061b401930 (patch) | |
| tree | c433fefa9db8edd699775cbd61cf21bc2883cd10 /m4 | |
| parent | 61353ac8cdbdda53d75f5ab9aa7f0b637aee5a00 (diff) | |
| download | emacs-5fa4ac767c6aaf9203d2ec6ff2f90a061b401930.tar.gz emacs-5fa4ac767c6aaf9203d2ec6ff2f90a061b401930.zip | |
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>
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/filemode.m4 | 12 | ||||
| -rw-r--r-- | m4/gl-comp.m4 | 13 | ||||
| -rw-r--r-- | m4/st_dm_mode.m4 | 23 | ||||
| -rw-r--r-- | m4/sys_stat_h.m4 | 82 |
4 files changed, 130 insertions, 0 deletions
diff --git a/m4/filemode.m4 b/m4/filemode.m4 new file mode 100644 index 00000000000..4147fd01e28 --- /dev/null +++ b/m4/filemode.m4 | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | # filemode.m4 serial 7 | ||
| 2 | dnl Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc. | ||
| 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 | AC_DEFUN([gl_FILEMODE], | ||
| 8 | [ | ||
| 9 | AC_REQUIRE([AC_STRUCT_ST_DM_MODE]) | ||
| 10 | AC_LIBOBJ([filemode]) | ||
| 11 | AC_CHECK_DECLS_ONCE([strmode]) | ||
| 12 | ]) | ||
diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4 index 43ff36558b5..10ec34da386 100644 --- a/m4/gl-comp.m4 +++ b/m4/gl-comp.m4 | |||
| @@ -32,6 +32,7 @@ AC_DEFUN([gl_EARLY], | |||
| 32 | # Code from module dtoastr: | 32 | # Code from module dtoastr: |
| 33 | # Code from module extensions: | 33 | # Code from module extensions: |
| 34 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | 34 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) |
| 35 | # Code from module filemode: | ||
| 35 | # Code from module getloadavg: | 36 | # Code from module getloadavg: |
| 36 | # Code from module getopt-gnu: | 37 | # Code from module getopt-gnu: |
| 37 | # Code from module getopt-posix: | 38 | # Code from module getopt-posix: |
| @@ -46,6 +47,7 @@ AC_DEFUN([gl_EARLY], | |||
| 46 | # Code from module stdint: | 47 | # Code from module stdint: |
| 47 | # Code from module stdlib: | 48 | # Code from module stdlib: |
| 48 | # Code from module strftime: | 49 | # Code from module strftime: |
| 50 | # Code from module sys_stat: | ||
| 49 | # Code from module time: | 51 | # Code from module time: |
| 50 | # Code from module time_r: | 52 | # Code from module time_r: |
| 51 | # Code from module unistd: | 53 | # Code from module unistd: |
| @@ -75,6 +77,8 @@ AC_DEFUN([gl_INIT], | |||
| 75 | # Code from module dtoastr: | 77 | # Code from module dtoastr: |
| 76 | AC_REQUIRE([gl_C99_STRTOLD]) | 78 | AC_REQUIRE([gl_C99_STRTOLD]) |
| 77 | # Code from module extensions: | 79 | # Code from module extensions: |
| 80 | # Code from module filemode: | ||
| 81 | gl_FILEMODE | ||
| 78 | # Code from module getloadavg: | 82 | # Code from module getloadavg: |
| 79 | gl_GETLOADAVG([$gl_source_base]) | 83 | gl_GETLOADAVG([$gl_source_base]) |
| 80 | gl_STDLIB_MODULE_INDICATOR([getloadavg]) | 84 | gl_STDLIB_MODULE_INDICATOR([getloadavg]) |
| @@ -105,6 +109,9 @@ AC_DEFUN([gl_INIT], | |||
| 105 | gl_STDLIB_H | 109 | gl_STDLIB_H |
| 106 | # Code from module strftime: | 110 | # Code from module strftime: |
| 107 | gl_FUNC_GNU_STRFTIME | 111 | gl_FUNC_GNU_STRFTIME |
| 112 | # Code from module sys_stat: | ||
| 113 | gl_HEADER_SYS_STAT_H | ||
| 114 | AC_PROG_MKDIR_P | ||
| 108 | # Code from module time: | 115 | # Code from module time: |
| 109 | gl_HEADER_TIME_H | 116 | gl_HEADER_TIME_H |
| 110 | # Code from module time_r: | 117 | # Code from module time_r: |
| @@ -257,6 +264,8 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 257 | build-aux/c++defs.h | 264 | build-aux/c++defs.h |
| 258 | build-aux/warn-on-use.h | 265 | build-aux/warn-on-use.h |
| 259 | lib/dtoastr.c | 266 | lib/dtoastr.c |
| 267 | lib/filemode.c | ||
| 268 | lib/filemode.h | ||
| 260 | lib/ftoastr.c | 269 | lib/ftoastr.c |
| 261 | lib/ftoastr.h | 270 | lib/ftoastr.h |
| 262 | lib/getloadavg.c | 271 | lib/getloadavg.c |
| @@ -277,12 +286,14 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 277 | lib/stdlib.in.h | 286 | lib/stdlib.in.h |
| 278 | lib/strftime.c | 287 | lib/strftime.c |
| 279 | lib/strftime.h | 288 | lib/strftime.h |
| 289 | lib/sys_stat.in.h | ||
| 280 | lib/time.in.h | 290 | lib/time.in.h |
| 281 | lib/time_r.c | 291 | lib/time_r.c |
| 282 | lib/unistd.in.h | 292 | lib/unistd.in.h |
| 283 | m4/00gnulib.m4 | 293 | m4/00gnulib.m4 |
| 284 | m4/c-strtod.m4 | 294 | m4/c-strtod.m4 |
| 285 | m4/extensions.m4 | 295 | m4/extensions.m4 |
| 296 | m4/filemode.m4 | ||
| 286 | m4/getloadavg.m4 | 297 | m4/getloadavg.m4 |
| 287 | m4/getopt.m4 | 298 | m4/getopt.m4 |
| 288 | m4/gnulib-common.m4 | 299 | m4/gnulib-common.m4 |
| @@ -291,11 +302,13 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 291 | m4/md5.m4 | 302 | m4/md5.m4 |
| 292 | m4/mktime.m4 | 303 | m4/mktime.m4 |
| 293 | m4/multiarch.m4 | 304 | m4/multiarch.m4 |
| 305 | m4/st_dm_mode.m4 | ||
| 294 | m4/stdbool.m4 | 306 | m4/stdbool.m4 |
| 295 | m4/stddef_h.m4 | 307 | m4/stddef_h.m4 |
| 296 | m4/stdint.m4 | 308 | m4/stdint.m4 |
| 297 | m4/stdlib_h.m4 | 309 | m4/stdlib_h.m4 |
| 298 | m4/strftime.m4 | 310 | m4/strftime.m4 |
| 311 | m4/sys_stat_h.m4 | ||
| 299 | m4/time_h.m4 | 312 | m4/time_h.m4 |
| 300 | m4/time_r.m4 | 313 | m4/time_r.m4 |
| 301 | m4/tm_gmtoff.m4 | 314 | m4/tm_gmtoff.m4 |
diff --git a/m4/st_dm_mode.m4 b/m4/st_dm_mode.m4 new file mode 100644 index 00000000000..84f74638f12 --- /dev/null +++ b/m4/st_dm_mode.m4 | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # serial 6 | ||
| 2 | |||
| 3 | # Copyright (C) 1998-1999, 2001, 2009-2011 Free Software Foundation, Inc. | ||
| 4 | # This file is free software; the Free Software Foundation | ||
| 5 | # gives unlimited permission to copy and/or distribute it, | ||
| 6 | # with or without modifications, as long as this notice is preserved. | ||
| 7 | |||
| 8 | # Define HAVE_ST_DM_MODE if struct stat has an st_dm_mode member. | ||
| 9 | |||
| 10 | AC_DEFUN([AC_STRUCT_ST_DM_MODE], | ||
| 11 | [AC_CACHE_CHECK([for st_dm_mode in struct stat], [ac_cv_struct_st_dm_mode], | ||
| 12 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
| 13 | #include <sys/types.h> | ||
| 14 | #include <sys/stat.h>]], [[struct stat s; s.st_dm_mode;]])], | ||
| 15 | [ac_cv_struct_st_dm_mode=yes], | ||
| 16 | [ac_cv_struct_st_dm_mode=no])]) | ||
| 17 | |||
| 18 | if test $ac_cv_struct_st_dm_mode = yes; then | ||
| 19 | AC_DEFINE([HAVE_ST_DM_MODE], [1], | ||
| 20 | [Define if struct stat has an st_dm_mode member. ]) | ||
| 21 | fi | ||
| 22 | ] | ||
| 23 | ) | ||
diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4 new file mode 100644 index 00000000000..fc419129e98 --- /dev/null +++ b/m4/sys_stat_h.m4 | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | # sys_stat_h.m4 serial 24 -*- Autoconf -*- | ||
| 2 | dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. | ||
| 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 For the mkdir substitute. | ||
| 15 | AC_REQUIRE([AC_C_INLINE]) | ||
| 16 | |||
| 17 | dnl Check for broken stat macros. | ||
| 18 | AC_REQUIRE([AC_HEADER_STAT]) | ||
| 19 | |||
| 20 | gl_CHECK_NEXT_HEADERS([sys/stat.h]) | ||
| 21 | |||
| 22 | dnl Define types that are supposed to be defined in <sys/types.h> or | ||
| 23 | dnl <sys/stat.h>. | ||
| 24 | AC_CHECK_TYPE([nlink_t], [], | ||
| 25 | [AC_DEFINE([nlink_t], [int], | ||
| 26 | [Define to the type of st_nlink in struct stat, or a supertype.])], | ||
| 27 | [#include <sys/types.h> | ||
| 28 | #include <sys/stat.h>]) | ||
| 29 | |||
| 30 | dnl Check for declarations of anything we want to poison if the | ||
| 31 | dnl corresponding gnulib module is not in use. | ||
| 32 | gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h> | ||
| 33 | ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat | ||
| 34 | mknod mknodat stat utimensat]) | ||
| 35 | ]) # gl_HEADER_SYS_STAT_H | ||
| 36 | |||
| 37 | AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], | ||
| 38 | [ | ||
| 39 | dnl Use AC_REQUIRE here, so that the default settings are expanded once only. | ||
| 40 | AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) | ||
| 41 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) | ||
| 42 | dnl Define it also as a C macro, for the benefit of the unit tests. | ||
| 43 | gl_MODULE_INDICATOR_FOR_TESTS([$1]) | ||
| 44 | ]) | ||
| 45 | |||
| 46 | AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], | ||
| 47 | [ | ||
| 48 | AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR | ||
| 49 | GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) | ||
| 50 | GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) | ||
| 51 | GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) | ||
| 52 | GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) | ||
| 53 | GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) | ||
| 54 | GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT]) | ||
| 55 | GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO]) | ||
| 56 | GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT]) | ||
| 57 | GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) | ||
| 58 | GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) | ||
| 59 | GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) | ||
| 60 | GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) | ||
| 61 | dnl Assume proper GNU behavior unless another module says otherwise. | ||
| 62 | HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) | ||
| 63 | HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) | ||
| 64 | HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS]) | ||
| 65 | HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) | ||
| 66 | HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT]) | ||
| 67 | HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT]) | ||
| 68 | HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO]) | ||
| 69 | HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT]) | ||
| 70 | HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) | ||
| 71 | HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) | ||
| 72 | HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) | ||
| 73 | REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) | ||
| 74 | REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) | ||
| 75 | REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS]) | ||
| 76 | REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) | ||
| 77 | REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) | ||
| 78 | REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO]) | ||
| 79 | REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD]) | ||
| 80 | REPLACE_STAT=0; AC_SUBST([REPLACE_STAT]) | ||
| 81 | REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT]) | ||
| 82 | ]) | ||