emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 6eaa9a5: Merge from gnulib


From: Paul Eggert
Subject: [Emacs-diffs] master 6eaa9a5: Merge from gnulib
Date: Thu, 30 Apr 2015 03:12:29 +0000

branch: master
commit 6eaa9a57a172181f866d9c50f3e5880601551932
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Merge from gnulib
    
    This incorporates:
    2015-04-29 extern-inline: no need for workaround in GCC 5.1
    2015-04-26 file-has-acl: port to CentOS 6
    * m4/acl.m4, m4/extern-inline.m4: Update from gnulib.
---
 m4/acl.m4           |   24 +++++++++++++++++++-----
 m4/extern-inline.m4 |    5 +++--
 2 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/m4/acl.m4 b/m4/acl.m4
index 186353c..b8f4660 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,5 +1,5 @@
 # acl.m4 - check for access control list (ACL) primitives
-# serial 18
+# serial 19
 
 # 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_header_linux_xattr_h,$ac_cv_func_getxattr" = 
yes,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/extern-inline.m4 b/m4/extern-inline.m4
index e74339a..7280065 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -74,12 +74,13 @@ AC_DEFUN([gl_EXTERN_INLINE],
 # define _GL_EXTERN_INLINE static _GL_UNUSED
 #endif
 
-/* In GCC, suppress bogus "no previous prototype for 'FOO'"
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+   suppress bogus "no previous prototype for 'FOO'"
    and "no previous declaration for 'FOO'" diagnostics,
    when FOO is an inline function in the header; see
    <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
    <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>.  */
-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
 # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
 #  define _GL_INLINE_HEADER_CONST_PRAGMA
 # else



reply via email to

[Prev in Thread] Current Thread [Next in Thread]