From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1985 invoked by alias); 24 Jul 2015 14:53:54 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 1458 invoked by uid 9795); 24 Jul 2015 14:53:54 -0000 Date: Fri, 24 Jul 2015 14:53:00 -0000 Message-ID: <20150724145354.1452.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jon TURNEY To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Use makedoc generated texinfo documentation for reentrant syscalls X-Act-Checkin: newlib-cygwin X-Git-Author: Jon TURNEY X-Git-Refname: refs/heads/master X-Git-Oldrev: 1c19a13fd119480a8974427f3b4e27cc3ad25234 X-Git-Newrev: 6c2b18427783aeed47287a61a03721da2604f503 X-SW-Source: 2015-q3/txt/msg00015.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6c2b18427783aeed47287a61a03721da2604f503 commit 6c2b18427783aeed47287a61a03721da2604f503 Author: Jon TURNEY Date: Tue Jul 21 13:41:46 2015 +0100 Use makedoc generated texinfo documentation for reentrant syscalls We use texinfo nodes beginning with an underscore in several other places, so revert this ancient workaround for a no longer existing bug, and use the makedoc generated texinfo for reentrant versions of syscalls, rather than handwritten documentation. Also alphabetically sort these functions. Also add documentation for _execve_r, _getpid_r, _kill_r and _times_r functions, whose non-reentrant versions are documented as stubs v2: Keep _open64_r, _lseek64_r and _fstat64_r functions under texinfo conditional STDIO64 Add _stat64_r function likewise. Notes: 1. The handwritten prototypes give the reentrancy structure pointer as of type void *, rather than the presumably more correct struct __reent * 2. The fcntl, gettimeofday, mkdir and rename functions are not documented as stubs, so I haven't added the reentrant versions either Signed-off-by: Jon TURNEY Diff: --- newlib/libc/sys.tex | 193 +++++++++++++++------------------------------------- 1 file changed, 54 insertions(+), 139 deletions(-) diff --git a/newlib/libc/sys.tex b/newlib/libc/sys.tex index 3b04c15..1b3cc32 100644 --- a/newlib/libc/sys.tex +++ b/newlib/libc/sys.tex @@ -306,171 +306,86 @@ routines are consistent with the other reentrant subroutines in this library, and achieve reentrancy by using a reserved global data block (@pxref{Reentrancy,,Reentrancy}). -@c FIXME!!! The following ignored text specifies how this section ought -@c to work; however, both standalone info and Emacs info mode fail when -@c confronted with nodes beginning `_' as of 24may93. Restore when Info -@c readers fixed! -@ignore @menu -* _open_r:: Reentrant version of open * _close_r:: Reentrant version of close +* _execve_r:: Reentrant version of execve +* _fork_r:: Reentrant version of fork +* _fstat64_r:: Reentrant version of fstat64 +* _fstat_r:: Reentrant version of fstat +* _getpid_r:: Reentrant version of getpid +* _kill_r:: Reentrant version of kill +* _link_r:: Reentrant version of link +* _lseek64_r:: Reentrant version of lseek64 * _lseek_r:: Reentrant version of lseek +* _open64_r:: Reentrant version of open64 +* _open_r:: Reentrant version of open * _read_r:: Reentrant version of read -* _write_r:: Reentrant version of write -* _link_r:: Reentrant version of link -* _unlink_r:: Reentrant version of unlink -* _stat_r:: Reentrant version of stat -* _fstat_r:: Reentrant version of fstat -* _sbrk_r:: Reentrant version of sbrk -* _fork_r:: Reentrant version of fork +* _sbrk_r:: Reentrant version of sbrk +* _stat64_r:: Reentrant version of stat64 +* _stat_r:: Reentrant version of stat +* _times_r:: Reentrant version of times +* _unlink_r:: Reentrant version of unlink * _wait_r:: Reentrant version of wait +* _write_r:: Reentrant version of write @end menu -@down -@include reent/filer.def -@include reent/execr.def -@include reent/statr.def -@include reent/fstatr.def -@include reent/linkr.def -@include reent/unlinkr.def -@include reent/sbrkr.def -@up -@end ignore - -@ftable @code -@item _open_r -A reentrant version of @code{open}. It takes a pointer -to the global data block, which holds @code{errno}. +@lowersections +@page +@include reent/closer.def -@example -int _open_r(void *@var{reent}, - const char *@var{file}, int @var{flags}, int @var{mode}); -@end example +@page +@include reent/execr.def @ifset STDIO64 -@item _open64_r -A reentrant version of @code{open64}. It takes a pointer -to the global data block, which holds @code{errno}. - -@example -int _open64_r(void *@var{reent}, - const char *@var{file}, int @var{flags}, int @var{mode}); -@end example +@page +@include reent/fstat64r.def @end ifset -@item _close_r -A reentrant version of @code{close}. It takes a pointer to the global -data block, which holds @code{errno}. - -@example -int _close_r(void *@var{reent}, int @var{fd}); -@end example - -@item _lseek_r -A reentrant version of @code{lseek}. It takes a pointer to the global -data block, which holds @code{errno}. +@page +@include reent/fstatr.def -@example -off_t _lseek_r(void *@var{reent}, - int @var{fd}, off_t @var{pos}, int @var{whence}); -@end example +@page +@include reent/linkr.def @ifset STDIO64 -@item _lseek64_r -A reentrant version of @code{lseek64}. It takes a pointer to the global -data block, which holds @code{errno}. - -@example -off_t _lseek64_r(void *@var{reent}, - int @var{fd}, off_t @var{pos}, int @var{whence}); -@end example +@page +@include reent/lseek64r.def @end ifset -@item _read_r -A reentrant version of @code{read}. It takes a pointer to the global -data block, which holds @code{errno}. - -@example -long _read_r(void *@var{reent}, - int @var{fd}, void *@var{buf}, size_t @var{cnt}); -@end example - -@item _write_r -A reentrant version of @code{write}. It takes a pointer to the global -data block, which holds @code{errno}. - -@example -long _write_r(void *@var{reent}, - int @var{fd}, const void *@var{buf}, size_t @var{cnt}); -@end example - -@item _fork_r -A reentrant version of @code{fork}. It takes a pointer to the global -data block, which holds @code{errno}. - -@example -int _fork_r(void *@var{reent}); -@end example - -@item _wait_r -A reentrant version of @code{wait}. It takes a pointer to the global -data block, which holds @code{errno}. +@page +@include reent/lseekr.def -@example -int _wait_r(void *@var{reent}, int *@var{status}); -@end example +@ifset STDIO64 +@page +@include reent/open64r.def +@end ifset -@item _stat_r -A reentrant version of @code{stat}. It takes a pointer to the global -data block, which holds @code{errno}. +@page +@include reent/openr.def -@example -int _stat_r(void *@var{reent}, - const char *@var{file}, struct stat *@var{pstat}); -@end example +@page +@include reent/readr.def -@item _fstat_r -A reentrant version of @code{fstat}. It takes a pointer to the global -data block, which holds @code{errno}. +@page +@include reent/sbrkr.def -@example -int _fstat_r(void *@var{reent}, - int @var{fd}, struct stat *@var{pstat}); -@end example +@page +@include reent/signalr.def @ifset STDIO64 -@item _fstat64_r -A reentrant version of @code{fstat64}. It takes a pointer to the global -data block, which holds @code{errno}. - -@example -int _fstat64_r(void *@var{reent}, - int @var{fd}, struct stat *@var{pstat}); -@end example +@page +@include reent/stat64r.def @end ifset -@item _link_r -A reentrant version of @code{link}. It takes a pointer to the global -data block, which holds @code{errno}. - -@example -int _link_r(void *@var{reent}, - const char *@var{old}, const char *@var{new}); -@end example - -@item _unlink_r -A reentrant version of @code{unlink}. It takes a pointer to the global -data block, which holds @code{errno}. +@page +@include reent/statr.def -@example -int _unlink_r(void *@var{reent}, const char *@var{file}); -@end example +@page +@include reent/timesr.def -@item _sbrk_r -A reentrant version of @code{sbrk}. It takes a pointer to the global -data block, which holds @code{errno}. +@page +@include reent/unlinkr.def -@example -char *_sbrk_r(void *@var{reent}, size_t @var{incr}); -@end example -@end ftable +@page +@include reent/writer.def +@raisesections