[PATCH 2/6] Use makedoc generated texinfo documentation for reentrant syscalls

Jon TURNEY jon.turney@dronecode.org.uk
Wed Jul 29 18:29:00 GMT 2015

On 29/07/2015 11:50, Andre Vieira wrote:
> On 23/07/15 13:47, Jon TURNEY wrote:
>> 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.
> This is failing for our 32-bit build. The menu entries for _fstat64_r,
> _lseek64_r, _open64_r and _stat64_r are included regardless of whether
> STDIO64 is set, so if it's not, the nodes they reference will not be
> created. This yields errors such as:
> ./reent/statr.def:1: Prev reference to nonexistent node `_stat64_r'
> (perhaps incorrect sectioning?).

Oh dear.  Sorry about that.

I guess the attached is the fix?

-------------- next part --------------
From 05cc34a2542cbcec94238af76a3b248e364fc580 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Wed, 29 Jul 2015 16:48:00 +0100
Subject: [PATCH] Don't include stdio64 functions in reentrant syscalls menu
 when not bulding stdio64.

Fix documentation build since 6c2b1842 by not included stdio64 functions in the
reent syscalls menu if the node itself isn't going to be included because it's
under the STDIO64 flag.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
 newlib/libc/sys.tex | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/newlib/libc/sys.tex b/newlib/libc/sys.tex
index 1b3cc32..a88b098 100644
--- a/newlib/libc/sys.tex
+++ b/newlib/libc/sys.tex
@@ -310,18 +310,26 @@ library, and achieve reentrancy by using a reserved global data block
 * _close_r::	Reentrant version of close
 * _execve_r::	Reentrant version of execve
 * _fork_r::	Reentrant version of fork
+@ifset STDIO64
 * _fstat64_r::	Reentrant version of fstat64
+@end ifset
 * _fstat_r::	Reentrant version of fstat
 * _getpid_r::	Reentrant version of getpid
 * _kill_r::	Reentrant version of kill
 * _link_r::	Reentrant version of link
+@ifset STDIO64
 * _lseek64_r::	Reentrant version of lseek64
+@end ifset
 * _lseek_r::	Reentrant version of lseek
+@ifset STDIO64
 * _open64_r::	Reentrant version of open64
+@end ifset
 * _open_r::	Reentrant version of open
 * _read_r::	Reentrant version of read
 * _sbrk_r::	Reentrant version of sbrk
+@ifset STDIO64
 * _stat64_r::	Reentrant version of stat64
+@end ifset
 * _stat_r::	Reentrant version of stat
 * _times_r::	Reentrant version of times
 * _unlink_r::	Reentrant version of unlink

More information about the Newlib mailing list