]> Savannah Git Hosting - gnulib.git/commitdiff
acl-permissions: port to USE_ACL==0 platforms
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Jan 2016 19:10:28 +0000 (11:10 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Jan 2016 19:11:09 +0000 (11:11 -0800)
I ran into this problem when building bleeding-edge GNU Emacs
with gcc -fsanitize=address on Fedora 23.  On this platform
the ACL library does not pass the 'configure' test and Emacs
then does not build due in part to what appear to be typos in the
ACL part of Gnulib.
* lib/acl-internal.c (free_permission_context):
* lib/acl-internal.h (struct permission_context):
Test whether USE_ACL is nonzero, not whether it is defined.

ChangeLog
lib/acl-internal.c
lib/acl-internal.h

index 1434b3d1502e9d72381a620d0346fc040d630504..858615ae4ff90727da01206646818c15b3079f62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2016-01-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       acl-permissions: port to USE_ACL==0 platforms
+       I ran into this problem when building bleeding-edge GNU Emacs
+       with gcc -fsanitize=address on Fedora 23.  On this platform
+       the ACL library does not pass the 'configure' test and Emacs
+       then does not build due in part to what appear to be typos in the
+       ACL part of Gnulib.
+       * lib/acl-internal.c (free_permission_context):
+       * lib/acl-internal.h (struct permission_context):
+       Test whether USE_ACL is nonzero, not whether it is defined.
+
 2016-01-12  Martin Sebor  <msebor@redhat.com>
 
        mktime: rename macro to avoid glibc clash
index 569e2f9c9e21c22f23bf86f852921e1f0a4f21ca..4de60c30ec11194c076dab5aed400854bc8dd02a 100644 (file)
@@ -478,7 +478,7 @@ acl_nontrivial (int count, struct acl *entries)
 void
 free_permission_context (struct permission_context *ctx)
 {
-#ifdef USE_ACL
+#if USE_ACL
 # if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
   if (ctx->acl)
     acl_free (ctx->acl);
index 526e9f07788129e570b6794f94564369e64b1761..636273e0fb4762808c6e8c7d2645a4be20218914 100644 (file)
@@ -255,7 +255,7 @@ extern int acl_nontrivial (int count, struct acl *entries);
 
 struct permission_context {
   mode_t mode;
-#ifdef USE_ACL
+#if USE_ACL
 # if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
   acl_t acl;
 #  if !HAVE_ACL_TYPE_EXTENDED