Hi Joachim, > I know, it's been a while... but I think I found a problem in ACL support for > NonStop. There are file systems and OS version that don't support them, and > gnu-lib code thows an error for these. The code I'm referring to is in > file-has-acl.c and goes like this: > > … > # elif HAVE_ACLSORT /* NonStop Kernel */ > > int count; > struct acl entries[NACLENTRIES]; > > for (;;) > { > count = acl ((char *) name, ACL_CNT, NACLENTRIES, NULL); > > if (count < 0) > return -1; > > if (count == 0) > return 0; > … > > I think this could/should get changed to the following (which is very similar > to how HPUX does it): > > … > # elif HAVE_ACLSORT /* NonStop Kernel */ > > int count; > struct acl entries[NACLENTRIES]; > > for (;;) > { > count = acl ((char *) name, ACL_CNT, NACLENTRIES, NULL); > > if (count < 0) > return (errno == ENOSYS || errno == ENOTSUP ? 0 : -1); > > if (count == 0) > return 0;
Makes sense. I've applied it as follows: 2011-09-05 Joachim Schmitz <schm...@hp.com> (tiny change) Bruno Haible <br...@clisp.org> acl: Avoid errors on NonStop Kernel. * lib/file-has-acl.c (file_has_acl) [NonStop Kernel]: Ignore ENOSYS and ENOTSUP errors. --- lib/file-has-acl.c.orig Tue Sep 6 00:31:09 2011 +++ lib/file-has-acl.c Tue Sep 6 00:31:01 2011 @@ -810,7 +810,12 @@ count = acl ((char *) name, ACL_CNT, NACLENTRIES, NULL); if (count < 0) - return -1; + { + if (errno == ENOSYS || errno == ENOTSUP) + break; + else + return -1; + } if (count == 0) return 0; -- In memoriam Moshe Weinberg <http://en.wikipedia.org/wiki/Moshe_Weinberg>