bug-gnulib
[Top][All Lists]
Advanced

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

Re: add limited support for Solaris 10 ZFS-style ACLs to gnulib


From: Paul Eggert
Subject: Re: add limited support for Solaris 10 ZFS-style ACLs to gnulib
Date: Mon, 19 Mar 2007 22:48:50 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Bruno Haible <address@hidden> writes:

> This can be abbreviated to
>   #include "gettext.h"
> ...
> Here I would parenthesize (Errno).

Thanks, I installed the patch enclosed below.

> It may be faster to use the libc's optimized strchr() function. (Untested.)

Thanks.  For the typical case I suspect strchr is no faster here, but
if someone times the two versions we can put in the more-complicated
one if it turns out to be measurably faster.

2007-03-19  Paul Eggert  <address@hidden>

        Suggestions by Bruno Haible:
        * lib/acl-internal.h: Include "gettext.h" rather than rolling
        our own.
        (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
        * modules/acl (Depends-on): Add gettext.

Index: lib/acl-internal.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/acl-internal.h,v
retrieving revision 1.1
diff -u -p -r1.1 acl-internal.h
--- lib/acl-internal.h  19 Mar 2007 21:58:57 -0000      1.1
+++ lib/acl-internal.h  20 Mar 2007 05:46:35 -0000
@@ -40,12 +40,8 @@
 # define ENOTSUP (-1)
 #endif

-#if ENABLE_NLS
-# include <libintl.h>
-# define _(Text) gettext (Text)
-#else
-# define _(Text) Text
-#endif
+#include "gettext.h"
+#define _(msgid) gettext (msgid)

 #ifndef HAVE_FCHMOD
 # define HAVE_FCHMOD false
@@ -81,7 +77,7 @@
 #endif

 #define ACL_NOT_WELL_SUPPORTED(Errno) \
-  (Errno == ENOTSUP || Errno == ENOSYS || Errno == EINVAL)
+  ((Errno) == ENOTSUP || (Errno) == ENOSYS || (Errno) == EINVAL)

 /* Define a replacement for acl_entries if needed.  */
 #if USE_ACL && HAVE_ACL_GET_FILE && HAVE_ACL_FREE && !HAVE_ACL_ENTRIES
Index: modules/acl
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/acl,v
retrieving revision 1.11
diff -u -p -r1.11 acl
--- modules/acl 19 Mar 2007 21:58:57 -0000      1.11
+++ modules/acl 20 Mar 2007 05:46:35 -0000
@@ -11,6 +11,7 @@ m4/acl.m4

 Depends-on:
 error
+gettext
 quote
 sys_stat





reply via email to

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