diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-05-27 17:46:15 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-05-27 17:55:06 -0700 |
commit | 6c52e9b93b68795d1876718d8f3c1d57bf7f6d91 (patch) | |
tree | b2d93b1121c05cfffa59df9325139cdf56eed6c0 /m4 | |
parent | cc41938ae0f5694d657f360f19dd9ac166271db2 (diff) | |
download | emacs-6c52e9b93b68795d1876718d8f3c1d57bf7f6d91.tar.gz |
Merge from gnulib
This incorporates:
2015-05-27 qacl: Reimplement qset_acl and qcopy_acl (Bug#20666)
2015-05-27 file-has-acl: Split feature tests again (Bug#20667)
2015-05-27 string: fix build failure on BSD/OSX with FORTIFY_SOURCE
2015-05-26 stdio: limit __gnu_printf__ witness to gcc 4.4+
2015-05-26 inttypes: force correct mingw PRIdMAX even without <stdio.h>
2015-05-26 stdio: fix probe on mingw under gcc 5.1
* admin/merge-gnulib (GNULIB_MODULES):
Replace qacl with qcopy-acl, since we don't need the rest of qacl.
* doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h:
* lib/inttypes.in.h, lib/qcopy-acl.c, lib/qset-acl.c:
* lib/string.in.h, m4/acl.m4, m4/stdio_h.m4:
Get latest versions from gnulib.
* lib/get-permissions.c, lib/set-permissions.c: New files.
* lib/gnulib.mk, m4/gnulib-comp.m4:
Regenerate.
* nt/gnulib.mk: Merge lib/gnulib.mk changes by hand.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/acl.m4 | 24 | ||||
-rw-r--r-- | m4/gnulib-comp.m4 | 8 | ||||
-rw-r--r-- | m4/stdio_h.m4 | 20 |
3 files changed, 23 insertions, 29 deletions
diff --git a/m4/acl.m4 b/m4/acl.m4 index b8f4660f7e3..5da6a43ab6a 100644 --- a/m4/acl.m4 +++ b/m4/acl.m4 @@ -1,5 +1,5 @@ # acl.m4 - check for access control list (ACL) primitives -# serial 19 +# serial 20 # Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -181,26 +181,12 @@ AC_DEFUN([gl_FILE_HAS_ACL], [ AC_REQUIRE([gl_FUNC_ACL_ARG]) if test "$enable_acl" != no; then - AC_CACHE_CHECK([for getxattr with XATTR_NAME_POSIX_ACL macros], - [gl_cv_getxattr_with_posix_acls], - [gl_cv_getxattr_with_posix_acls=no - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include <sys/types.h> - #include <sys/xattr.h> - #include <linux/xattr.h> - ]], - [[ssize_t a = getxattr (".", XATTR_NAME_POSIX_ACL_ACCESS, 0, 0); - ssize_t b = getxattr (".", XATTR_NAME_POSIX_ACL_DEFAULT, 0, 0); - return a < 0 || b < 0; - ]])], - [gl_cv_getxattr_with_posix_acls=yes])]) + AC_CHECK_HEADERS([linux/xattr.h]) + AC_CHECK_HEADERS([sys/xattr.h], + [AC_CHECK_FUNCS([getxattr])]) fi - if test "$gl_cv_getxattr_with_posix_acls" = yes; then + if test "$ac_cv_header_sys_xattr_h,$ac_cv_func_getxattr" = yes,yes; then LIB_HAS_ACL= - AC_DEFINE([GETXATTR_WITH_POSIX_ACLS], 1, - [Define to 1 if getxattr works with XATTR_NAME_POSIX_ACL_ACCESS - and XATTR_NAME_POSIX_ACL_DEFAULT.]) else dnl Set gl_need_lib_has_acl to a nonempty value, so that any dnl later gl_FUNC_ACL call will set LIB_HAS_ACL=$LIB_ACL. diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 06636cfe76c..0425d02241a 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -39,6 +39,7 @@ AC_DEFUN([gl_EARLY], m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable AC_REQUIRE([gl_PROG_AR_RANLIB]) # Code from module absolute-header: + # Code from module acl-permissions: # Code from module alloca-opt: # Code from module allocator: # Code from module at-internal: @@ -105,7 +106,7 @@ AC_DEFUN([gl_EARLY], # Code from module pselect: # Code from module pthread_sigmask: # Code from module putenv: - # Code from module qacl: + # Code from module qcopy-acl: # Code from module readlink: # Code from module readlinkat: # Code from module root-uid: @@ -172,6 +173,7 @@ AC_DEFUN([gl_INIT], m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='lib' + gl_FUNC_ACL gl_FUNC_ALLOCA gl_BYTESWAP AC_CHECK_FUNCS_ONCE([readlinkat]) @@ -317,7 +319,6 @@ AC_DEFUN([gl_INIT], gl_PREREQ_PUTENV fi gl_STDLIB_MODULE_INDICATOR([putenv]) - gl_FUNC_ACL gl_FUNC_READLINK if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then AC_LIBOBJ([readlink]) @@ -865,6 +866,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/fsync.c lib/ftoastr.c lib/ftoastr.h + lib/get-permissions.c lib/getdtablesize.c lib/getgroups.c lib/getloadavg.c @@ -895,11 +897,11 @@ AC_DEFUN([gl_FILE_LIST], [ lib/pthread_sigmask.c lib/putenv.c lib/qcopy-acl.c - lib/qset-acl.c lib/readlink.c lib/readlinkat.c lib/root-uid.h lib/secure_getenv.c + lib/set-permissions.c lib/sha1.c lib/sha1.h lib/sha256.c diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index e0c4bde1f8e..f60cc2156e0 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -1,4 +1,4 @@ -# stdio_h.m4 serial 44 +# stdio_h.m4 serial 46 dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -15,15 +15,21 @@ AC_DEFUN([gl_STDIO_H], dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and dnl inttypes.h behave like gnu instead of system; we must give our dnl printf wrapper the right attribute to match. - AC_CACHE_CHECK([whether inttypes macros match system or gnu printf], + AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros], [gl_cv_func_printf_attribute_flavor], - [AC_EGREP_CPP([findme .(ll|j)d. findme], - [#define __STDC_FORMAT_MACROS 1 + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #define __STDC_FORMAT_MACROS 1 #include <stdio.h> #include <inttypes.h> - findme PRIdMAX findme - ], [gl_cv_func_printf_attribute_flavor=gnu], - [gl_cv_func_printf_attribute_flavor=system])]) + /* For non-mingw systems, compilation will trivially succeed. + For mingw, compilation will succeed for older mingw (system + printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ + #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ + (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) + extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; + #endif + ]])], [gl_cv_func_printf_attribute_flavor=system], + [gl_cv_func_printf_attribute_flavor=gnu])]) if test "$gl_cv_func_printf_attribute_flavor" = gnu; then AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1], [Define to 1 if printf and friends should be labeled with |