aboutsummaryrefslogtreecommitdiffstats
path: root/lib/acl-internal.h
diff options
context:
space:
mode:
authorPaul Eggert2018-10-08 18:21:47 -0700
committerPaul Eggert2018-10-08 18:22:22 -0700
commitcf1ebfa055fcd0749aa4ed2fc4c399470b9eb3de (patch)
tree8af8b5c52560c91b2094dae951b082c370496aea /lib/acl-internal.h
parentfc6004e61760d3bd3e27b593c318e634a221652c (diff)
downloademacs-cf1ebfa055fcd0749aa4ed2fc4c399470b9eb3de.tar.gz
emacs-cf1ebfa055fcd0749aa4ed2fc4c399470b9eb3de.zip
Update from Gnulib
This incorporates: 2018-10-05 explicit_bzero: make it possible to namespace 2018-10-04 fcntl: make it possible to namespace 2018-10-01 mkostemp, mkostemps: fix C++ compilation on Mac OS X 2018-09-19 maint: mktime.c now shared with glibc 2018-09-18 file-has-acl: fix test failure on Cygwin 2.9 2018-09-18 gettime: nanotime never existed * admin/merge-gnulib (AVOIDED_MODULES): Add mkdir. * doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h: * lib/acl_entries.c, lib/explicit_bzero.c, lib/fcntl.c: * lib/get-permissions.c, lib/gettime.c, lib/mktime.c: * lib/set-permissions.c, lib/stdlib.in.h, m4/acl.m4, m4/gettime.m4: Copy from Gnulib. * lib/gnulib.mk.in: Regenerate.
Diffstat (limited to 'lib/acl-internal.h')
-rw-r--r--lib/acl-internal.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index 0669d83c469..2da7c5a0366 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -30,7 +30,8 @@
30# define GETACLCNT ACL_CNT 30# define GETACLCNT ACL_CNT
31#endif 31#endif
32 32
33/* On Linux, additional ACL related API is available in <acl/libacl.h>. */ 33/* On Linux and Cygwin >= 2.5, additional ACL related API is available in
34 <acl/libacl.h>. */
34#ifdef HAVE_ACL_LIBACL_H 35#ifdef HAVE_ACL_LIBACL_H
35# include <acl/libacl.h> 36# include <acl/libacl.h>
36#endif 37#endif
@@ -72,7 +73,7 @@ _GL_INLINE_HEADER_BEGIN
72 73
73# if HAVE_ACL_GET_FILE 74# if HAVE_ACL_GET_FILE
74/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */ 75/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
75/* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */ 76/* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
76 77
77# ifndef MIN_ACL_ENTRIES 78# ifndef MIN_ACL_ENTRIES
78# define MIN_ACL_ENTRIES 4 79# define MIN_ACL_ENTRIES 4
@@ -122,7 +123,10 @@ rpl_acl_set_fd (int fd, acl_t acl)
122# endif 123# endif
123 124
124/* Linux-specific */ 125/* Linux-specific */
125# ifndef HAVE_ACL_EXTENDED_FILE 126/* Cygwin >= 2.5 implements this function, but it returns 1 for all
127 directories, thus is unusable. */
128# if !defined HAVE_ACL_EXTENDED_FILE || defined __CYGWIN__
129# undef HAVE_ACL_EXTENDED_FILE
126# define HAVE_ACL_EXTENDED_FILE false 130# define HAVE_ACL_EXTENDED_FILE false
127# define acl_extended_file(name) (-1) 131# define acl_extended_file(name) (-1)
128# endif 132# endif
@@ -163,7 +167,7 @@ extern int acl_access_nontrivial (acl_t);
163extern int acl_default_nontrivial (acl_t); 167extern int acl_default_nontrivial (acl_t);
164# endif 168# endif
165 169
166# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */ 170# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin < 2.5, not HP-UX */
167 171
168/* Set to 0 if a file's mode is stored independently from the ACL. */ 172/* Set to 0 if a file's mode is stored independently from the ACL. */
169# if defined __CYGWIN__ /* Cygwin */ 173# if defined __CYGWIN__ /* Cygwin */
@@ -256,14 +260,14 @@ extern int acl_nontrivial (int count, struct acl *entries);
256struct permission_context { 260struct permission_context {
257 mode_t mode; 261 mode_t mode;
258#if USE_ACL 262#if USE_ACL
259# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */ 263# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
260 acl_t acl; 264 acl_t acl;
261# if !HAVE_ACL_TYPE_EXTENDED 265# if !HAVE_ACL_TYPE_EXTENDED
262 acl_t default_acl; 266 acl_t default_acl;
263# endif 267# endif
264 bool acls_not_supported; 268 bool acls_not_supported;
265 269
266# elif defined GETACL /* Solaris, Cygwin */ 270# elif defined GETACL /* Solaris, Cygwin < 2.5 */
267 int count; 271 int count;
268 aclent_t *entries; 272 aclent_t *entries;
269# ifdef ACE_GETACL 273# ifdef ACE_GETACL