-# serial 22
+# serial 24
# Determine whether we need the chown wrapper.
-dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2010 Free Software
+dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2011 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl Solaris 9 ignores trailing slash.
dnl FreeBSD 7.2 mishandles trailing slash on symlinks.
+ dnl Likewise for AIX 7.1.
AC_CACHE_CHECK([whether chown honors trailing slash],
[gl_cv_func_chown_slash_works],
[touch conftest.file && rm -f conftest.link
int
main ()
{
+ int result = 0;
char const *dangling_symlink = "conftest.dangle";
unlink (dangling_symlink);
/* Exit successfully on a conforming system,
i.e., where chown must fail with ENOENT. */
- exit ( ! (chown (dangling_symlink, getuid (), getgid ()) != 0
- && errno == ENOENT));
+ if (chown (dangling_symlink, getuid (), getgid ()) == 0)
+ result |= 1;
+ if (errno != ENOENT)
+ result |= 2;
+ return result;
}
]])],
[gl_cv_func_chown_follows_symlink=yes],