diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-06-06 18:37:45 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-06-06 18:38:30 -0700 |
commit | 325bf192ae281046834884b12705d6c522871b24 (patch) | |
tree | 4faf44a87bd0fde9ea9134e7cb928b629d8558e1 /m4 | |
parent | 6fec047e9470731d588e52f516c1c704a7a55411 (diff) |
Merge from gnulib
This incorporates:
2015-06-06 acl-permissions: pacify -Wsuggest-attribute=const
2015-06-05 stdio: Don't redefine gets when using C++
2015-06-05 acl-permissions: port to AIX, C89 HP-UX
2015-06-02 file-has-acl: fix build on Mac OS X 10
2015-06-01 gnulib-tool: concatenate lib_SOURCES to a single line
2015-06-01 pthread_sigmask: discount system version if a simple macro
2015-05-31 readlinkat: avoid OS X 10.10 trailing slash bug
* doc/misc/texinfo.tex, lib/acl-internal.h, lib/get-permissions.c:
* lib/readlinkat.c, lib/set-permissions.c, lib/stdio.in.h:
* m4/acl.m4, m4/pthread_sigmask.m4, m4/readlinkat.m4: Copy from gnulib.
* lib/gnulib.mk: Regenerate.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/acl.m4 | 24 | ||||
-rw-r--r-- | m4/pthread_sigmask.m4 | 26 | ||||
-rw-r--r-- | m4/readlinkat.m4 | 18 |
3 files changed, 58 insertions, 10 deletions
@@ -1,5 +1,5 @@ # acl.m4 - check for access control list (ACL) primitives -# serial 20 +# serial 21 # Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -181,12 +181,26 @@ AC_DEFUN([gl_FILE_HAS_ACL], [ AC_REQUIRE([gl_FUNC_ACL_ARG]) if test "$enable_acl" != no; then - AC_CHECK_HEADERS([linux/xattr.h]) - AC_CHECK_HEADERS([sys/xattr.h], - [AC_CHECK_FUNCS([getxattr])]) + 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])]) fi - if test "$ac_cv_header_sys_xattr_h,$ac_cv_func_getxattr" = yes,yes; then + if test "$gl_cv_getxattr_with_posix_acls" = 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/pthread_sigmask.m4 b/m4/pthread_sigmask.m4 index 5c17dfcd85..2598856646 100644 --- a/m4/pthread_sigmask.m4 +++ b/m4/pthread_sigmask.m4 @@ -1,4 +1,4 @@ -# pthread_sigmask.m4 serial 15 +# pthread_sigmask.m4 serial 16 dnl Copyright (C) 2011-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, @@ -40,6 +40,30 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK], LIBS="$gl_save_LIBS" ]) if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then + AC_CACHE_CHECK([whether pthread_sigmask is only a macro], + [gl_cv_func_pthread_sigmask_is_macro], + [gl_save_LIBS="$LIBS" + LIBS="$LIBS $LIBMULTITHREAD" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include <pthread.h> + #include <signal.h> + #undef pthread_sigmask + ]], + [[return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);]]) + ], + [gl_cv_func_pthread_sigmask_is_macro=no], + [gl_cv_func_pthread_sigmask_is_macro=yes]) + LIBS="$gl_save_LIBS" + ]) + if test $gl_cv_func_pthread_sigmask_is_macro = yes; then + dnl On MinGW pthread_sigmask is just a macro which always returns 0. + dnl It does not exist as a real function, which is required by POSIX. + REPLACE_PTHREAD_SIGMASK=1 + gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no + fi + fi + if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then dnl pthread_sigmask is available with -pthread or -lpthread. LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD" else diff --git a/m4/readlinkat.m4 b/m4/readlinkat.m4 index d0f5e69274..3477602a14 100644 --- a/m4/readlinkat.m4 +++ b/m4/readlinkat.m4 @@ -1,4 +1,4 @@ -# serial 4 +# serial 5 # See if we need to provide readlinkat replacement. dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. @@ -13,6 +13,7 @@ AC_DEFUN([gl_FUNC_READLINKAT], AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS_ONCE([readlinkat]) + AC_REQUIRE([gl_FUNC_READLINK]) if test $ac_cv_func_readlinkat = no; then HAVE_READLINKAT=0 else @@ -25,8 +26,17 @@ AC_DEFUN([gl_FUNC_READLINKAT], ssize_t readlinkat (int, char const *, char *, size_t);]])], [gl_cv_decl_readlinkat_works=yes], [gl_cv_decl_readlinkat_works=no])]) - if test "$gl_cv_decl_readlink_works" != yes; then - REPLACE_READLINKAT=1 - fi + # Assume readinkat has the same trailing slash bug as readlink, + # as is the case on Mac Os X 10.10 + case "$gl_cv_func_readlink_works" in + *yes) + if test "$gl_cv_decl_readlinkat_works" != yes; then + REPLACE_READLINKAT=1 + fi + ;; + *) + REPLACE_READLINKAT=1 + ;; + esac fi ]) |