projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(getuidbyname) [__DJGPP__]: Make function know about
[gnulib.git]
/
lib
/
chown.c
diff --git
a/lib/chown.c
b/lib/chown.c
index
1d3346d
..
dc351d2
100644
(file)
--- a/
lib/chown.c
+++ b/
lib/chown.c
@@
-19,7
+19,14
@@
/* written by Jim Meyering */
#include <config.h>
/* written by Jim Meyering */
#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
+
#include <sys/types.h>
#include <sys/types.h>
+#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
@@
-27,10
+34,10
@@
/* FIXME: describe. */
int
/* FIXME: describe. */
int
-
chown (file, gid, u
id)
+
rpl_chown (file, uid, g
id)
const char *file;
const char *file;
-
gid_t git
;
-
uid_t uit
;
+
uid_t uid
;
+
gid_t gid
;
{
if (gid == (gid_t) -1 || uid == (uid_t) -1)
{
{
if (gid == (gid_t) -1 || uid == (uid_t) -1)
{
@@
-47,7
+54,5
@@
chown (file, gid, uid)
uid = file_stats.st_uid;
}
uid = file_stats.st_uid;
}
-#undef chown
-
- return chown (file, gid, uid);
+ return chown (file, uid, gid);
}
}