OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / original / man2 / brk.2
index 5c024c3..b0fa241 100644 (file)
@@ -1,9 +1,8 @@
-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
 .\" Copyright (c) 1993 Michael Haardt
 .\" (michael@moria.de),
 .\" Fri Apr  2 11:32:09 MET DST 1993
 .\"
 .\" Copyright (c) 1993 Michael Haardt
 .\" (michael@moria.de),
 .\" Fri Apr  2 11:32:09 MET DST 1993
 .\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License as
 .\" published by the Free Software Foundation; either version 2 of
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License as
 .\" published by the Free Software Foundation; either version 2 of
 .\" GNU General Public License for more details.
 .\"
 .\" You should have received a copy of the GNU General Public
 .\" GNU General Public License for more details.
 .\"
 .\" You should have received a copy of the GNU General Public
-.\" License along with this manual; if not, write to the Free
-.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
-.\" USA.
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
 .\"
 .\" Modified Wed Jul 21 19:52:58 1993 by Rik Faith <faith@cs.unc.edu>
 .\" Modified Sun Aug 21 17:40:38 1994 by Rik Faith <faith@cs.unc.edu>
 .\"
 .\"
 .\" Modified Wed Jul 21 19:52:58 1993 by Rik Faith <faith@cs.unc.edu>
 .\" Modified Sun Aug 21 17:40:38 1994 by Rik Faith <faith@cs.unc.edu>
 .\"
-.TH BRK 2 2008-06-18 "Linux" "Linux Programmer's Manual"
+.TH BRK 2 2014-08-19 "Linux" "Linux Programmer's Manual"
 .SH NAME
 brk, sbrk \- change data segment size
 .SH SYNOPSIS
 .SH NAME
 brk, sbrk \- change data segment size
 .SH SYNOPSIS
@@ -42,10 +41,25 @@ Feature Test Macro Requirements for glibc (see
 .BR feature_test_macros (7)):
 .in
 .sp
 .BR feature_test_macros (7)):
 .in
 .sp
-.ad l
 .BR brk (),
 .BR sbrk ():
 .BR brk (),
 .BR sbrk ():
-_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500
+.ad l
+.RS 4
+.PD 0
+.TP 4
+Since glibc 2.12:
+.nf
+_BSD_SOURCE || _SVID_SOURCE ||
+    (_XOPEN_SOURCE\ >=\ 500 ||
+        _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED) &&
+    !(_POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 600)
+.TP 4
+.fi
+Before glibc 2.12:
+_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
+_XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
+.PD
+.RE
 .ad b
 .SH DESCRIPTION
 .BR brk ()
 .ad b
 .SH DESCRIPTION
 .BR brk ()
@@ -76,7 +90,7 @@ Calling
 with an
 .I increment
 of 0 can be used to find the current location of the program break.
 with an
 .I increment
 of 0 can be used to find the current location of the program break.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 On success,
 .BR brk ()
 returns zero.
 On success,
 .BR brk ()
 returns zero.
@@ -84,7 +98,6 @@ On error, \-1 is returned, and
 .I errno
 is set to
 .BR ENOMEM .
 .I errno
 is set to
 .BR ENOMEM .
-(But see \fILinux Notes\fP below.)
 
 On success,
 .BR sbrk ()
 
 On success,
 .BR sbrk ()
@@ -97,7 +110,7 @@ is returned, and
 .I errno
 is set to
 .BR ENOMEM .
 .I errno
 is set to
 .BR ENOMEM .
-.SH "CONFORMING TO"
+.SH CONFORMING TO
 4.3BSD; SUSv1, marked LEGACY in SUSv2, removed in POSIX.1-2001.
 .\"
 .\" .BR brk ()
 4.3BSD; SUSv1, marked LEGACY in SUSv2, removed in POSIX.1-2001.
 .\"
 .\" .BR brk ()
@@ -124,7 +137,7 @@ Common are \fIint\fP, \fIssize_t\fP, \fIptrdiff_t\fP, \fIintptr_t\fP.
 .\" \fIptrdiff_t\fP (libc4, libc5, ulibc, glibc 2.0, 2.1),
 .\" \fIintptr_t\fP (e.g., XPGv5, AIX, SunOS 5.8, 5.9, FreeBSD 4.7, NetBSD 1.6,
 .\" Tru64 5.1, glibc2.2).
 .\" \fIptrdiff_t\fP (libc4, libc5, ulibc, glibc 2.0, 2.1),
 .\" \fIintptr_t\fP (e.g., XPGv5, AIX, SunOS 5.8, 5.9, FreeBSD 4.7, NetBSD 1.6,
 .\" Tru64 5.1, glibc2.2).
-.SS Linux Notes
+.SS C library/kernel ABI differences
 The return value described above for
 .BR brk ()
 is the behavior provided by the glibc wrapper function for the Linux
 The return value described above for
 .BR brk ()
 is the behavior provided by the glibc wrapper function for the Linux
@@ -147,8 +160,17 @@ is implemented as a library function that uses the
 .BR brk ()
 system call, and does some internal bookkeeping so that it can
 return the old break value.
 .BR brk ()
 system call, and does some internal bookkeeping so that it can
 return the old break value.
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR execve (2),
 .BR getrlimit (2),
 .BR end (3),
 .BR malloc (3)
 .BR execve (2),
 .BR getrlimit (2),
 .BR end (3),
 .BR malloc (3)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.