-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
.\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.\" Modified by Michael Haardt <michael@moria.de>
.\" Modified 1993-07-21 by Rik Faith <faith@cs.unc.edu>
.\" <michael@cantor.informatik.rwth-aachen.de>: NFS details
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH CHMOD 2 2008-05-26 "Linux" "Linux Programmer's Manual"
+.TH CHMOD 2 2010-09-26 "Linux" "Linux Programmer's Manual"
.SH NAME
chmod, fchmod \- change permissions of a file
.SH SYNOPSIS
.BR feature_test_macros (7)):
.in
.sp
+.ad l
+.PD 0
.BR fchmod ():
-_BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500
+.RS 4
+_BSD_SOURCE ||
+_XOPEN_SOURCE\ >=\ 500 ||
+_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+.br
+|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L
+.RE
+.PD
+.ad
.SH DESCRIPTION
These system calls change the permissions of a file.
They differ only in how the file is specified:
open files are maintained by the client.
Widening the permissions may be
delayed for other clients if attribute caching is enabled on them.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
On success, zero is returned.
On error, \-1 is returned, and
.I errno
.TP
.B EROFS
See above.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
4.4BSD, SVr4, POSIX.1-2001.
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR chown (2),
.BR execve (2),
.BR fchmodat (2),