.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
-.TH POSIX_FALLOCATE 3 2015-12-05 "GNU" "Linux Programmer's Manual"
+.TH POSIX_FALLOCATE 3 2017-09-15 "GNU" "Linux Programmer's Manual"
.SH NAME
posix_fallocate \- allocate file space
.SH SYNOPSIS
.nf
.B #include <fcntl.h>
-.sp
+.PP
.BI "int posix_fallocate(int " fd ", off_t " offset ", off_t " len );
.fi
-.sp
+.PP
.ad l
.in -4n
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.in
-.sp
+.PP
.BR posix_fallocate ():
.RS 4
-_XOPEN_SOURCE\ >=\ 600 || _POSIX_C_SOURCE\ >=\ 200112L
+_POSIX_C_SOURCE\ >=\ 200112L
.RE
.ad
.SH DESCRIPTION
The function
.BR posix_fallocate ()
ensures that disk space is allocated for the file referred to by the
-descriptor
+file descriptor
.I fd
for the bytes in the range starting at
.I offset
.BR posix_fallocate (),
subsequent writes to bytes in the specified range are
guaranteed not to fail because of lack of disk space.
-
+.PP
If the size of the file is less than
.IR offset + len ,
then the file is increased to this size;
.I offset+len
exceeds the maximum file size.
.TP
+.B EINTR
+A signal was caught during execution.
+.TP
.B EINVAL
.I offset
was less than 0, or
.TE
.SH CONFORMING TO
POSIX.1-2001.
-
+.PP
POSIX.1-2008 says that an implementation
.I shall
give the
.B O_APPEND
or
.B O_WRONLY
-flags, the function will fail with the error
-.B EBADF.
+flags, the function fails with the error
+.BR EBADF .
.PP
In general, the emulation is not MT-safe.
On Linux, applications may use