.\" (bsdgroups versus sysvgroups, and the effect of the parent
.\" directory's set-group-ID permission bit).
.\"
-.TH CHOWN 2 2008-06-16 "Linux" "Linux Programmer's Manual"
+.TH CHOWN 2 2010-09-26 "Linux" "Linux Programmer's Manual"
.SH NAME
chown, fchown, lchown \- change ownership of a file
.SH SYNOPSIS
.sp
.BR fchown (),
.BR lchown ():
-_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500
+.PD 0
+.ad l
+.RS 4
+_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
+_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+.br
+|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
+.RE
+.ad
+.PD
.SH DESCRIPTION
These system calls change the owner and group of a file.
The differ only in how the file is specified:
if (chown(argv[2], uid, \-1) == \-1) {
perror("chown");
exit(EXIT_FAILURE);
- } /* if */
+ }
exit(EXIT_SUCCESS);
-} /* main */
+}
.fi
.SH "SEE ALSO"
.BR chmod (2),