1 /* Test whether ACLs are well supported on this system.
3 Copyright 2013-2018 Free Software Foundation, Inc.
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
18 Written by Paul Eggert. */
26 /* Return true if errno value ERRNUM indicates that ACLs are well
27 supported on this system. ERRNUM should be an errno value obtained
28 after an ACL-related system call fails. */
30 acl_errno_valid (int errnum
)
32 /* Recognize some common errors such as from an NFS mount that does
33 not support ACLs, even when local drives do. */
36 case EBUSY
: return false;
37 case EINVAL
: return false;
38 #if defined __APPLE__ && defined __MACH__
39 case ENOENT
: return false;
41 case ENOSYS
: return false;
43 #if defined ENOTSUP && ENOTSUP != EOPNOTSUPP
44 # if ENOTSUP != ENOSYS /* Needed for the MS-Windows port of GNU Emacs. */
45 case ENOTSUP
: return false;
49 case EOPNOTSUPP
: return false;