/* provide consistent interface to chown for systems that don't interpret
an ID of -1 as meaning `don't change the corresponding ID'.
- Copyright (C) 1997, 2004, 2005 Free Software Foundation, Inc.
+
+ Copyright (C) 1997, 2004, 2005, 2006, 2007 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 Jim Meyering */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
-/* Disable the definition of chown to rpl_chown (from config.h) in this
- file. Otherwise, we'd get conflicting prototypes for rpl_chown on
- most systems. */
-#undef chown
+/* Specification. */
+#include <unistd.h>
#include <stdbool.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
-#include "stat-macros.h"
+/* Below we refer to the system's chown(). */
+#undef chown
+
+/* The results of open() in this file are not used with fchdir,
+ therefore save some unnecessary work in fchdir.c. */
+#undef open
+#undef close
/* Provide a more-closely POSIX-conforming version of chown on
systems with one or both of the following problems: