utimens: cache whether utimensat syscall works
[pspp] / lib / lchown.c
index 5bc7074f819cf56e6763d3ad106946c65beb4e1c..8cf10dd0c2e6ee82e2da61a6d9492d609655ee07 100644 (file)
 #include <errno.h>
 #include <sys/stat.h>
 
-/* Some systems don't have EOPNOTSUPP.  */
-#ifndef EOPNOTSUPP
-# ifdef ENOTSUP
-#  define EOPNOTSUPP ENOTSUP
-# else
-/* Some systems don't have ENOTSUP either.  */
-#  define EOPNOTSUPP EINVAL
-# endif
-#endif
-
 /* Work just like chown, except when FILE is a symbolic link.
    In that case, set errno to EOPNOTSUPP and return -1.
    But if autoconf tests determined that chown modifies
@@ -62,7 +52,7 @@ lchown (const char *file, uid_t uid, gid_t gid)
   return chown (file, uid, gid);
 
 #else /* !HAVE_CHOWN */
-  errno = EOPNOTSUPP;
+  errno = ENOSYS;
   return -1;
 #endif
 }