+2008-05-22 Bruno Haible <bruno@clisp.org>
+
+ * lib/acl.h: Don't include <sys/acl.h>.
+ (GETACLCNT): Move fallback to lib/acl-internal.h.
+ * lib/acl-internal.h: Include <sys/acl.h> here.
+ (GETACLCNT): New macro fallback, moved here from lib/acl.h.
+
2008-05-22 Bruno Haible <bruno@clisp.org>
Split off copy_acl function to separate file.
/* Internal implementation of access control lists.
- Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdbool.h>
#include <stdlib.h>
+/* All systems define the ACL related API in <sys/acl.h>. */
+#if HAVE_SYS_ACL_H
+# include <sys/acl.h>
+#endif
+#if defined HAVE_ACL && ! defined GETACLCNT && defined ACL_CNT
+# define GETACLCNT ACL_CNT
+#endif
+
+/* On Linux, additional ACL related API is available in <acl/libacl.h>. */
#ifdef HAVE_ACL_LIBACL_H
# include <acl/libacl.h>
#endif
/* acl.c - access control lists
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Written by Paul Eggert. */
#include <sys/types.h>
-
-#if HAVE_SYS_ACL_H
-# include <sys/acl.h>
-#endif
-#if defined HAVE_ACL && ! defined GETACLCNT && defined ACL_CNT
-# define GETACLCNT ACL_CNT
-#endif
-
#include <sys/stat.h>
int file_has_acl (char const *, struct stat const *);