summary refs log tree commit diff
path: root/manual/lang.texi
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-04-02 22:06:24 +0000
committerUlrich Drepper <drepper@redhat.com>1997-04-02 22:06:24 +0000
commitfe7bdd630fab35270a88b0731cd0fc10de062046 (patch)
tree61ccfe100af44cfbb4ac1790a430743ce846c7d0 /manual/lang.texi
parent22d57dd3690a0fe623de1a56036306a93fa9a945 (diff)
downloadglibc-fe7bdd630fab35270a88b0731cd0fc10de062046.tar.gz
glibc-fe7bdd630fab35270a88b0731cd0fc10de062046.tar.xz
glibc-fe7bdd630fab35270a88b0731cd0fc10de062046.zip
1997-04-02 16:55  Ulrich Drepper  <drepper@cygnus.com>

	* manual/socket.texi: Document behaviour of inet_ntoa in multi-
	threaded programs.
	* manual/stdio.texi: Change wording for snprintf description a bit.
	Correct typo in example.
	* manual/lang.texi: Add documentation of __va_copy.

	* Makefile: Add rule to easily generate dir-add.texi file.
	* manual/Makefile: Likewise.

	* manual/arith.texi: Add description of lldiv_t, lldiv, and atoll.
	Change description of strtoll and strtoull to make clear these
	are the preferred names.
	Describe `inf', `inifinity', `nan', `nan(...)' inputs for strtod
	and friends.
	Change references to HUGE_VALf and HUGE_VALl to HUGE_VALF and
	HUGE_VALL.

	* sysdeps/libm-ieee754/s_nan.c: Use strtod if parameter is not empty
	* sysdeps/libm-ieee754/s_nanl.c: Likewise.
Diffstat (limited to 'manual/lang.texi')
-rw-r--r--manual/lang.texi38
1 files changed, 38 insertions, 0 deletions
diff --git a/manual/lang.texi b/manual/lang.texi
index 39bba83540..7520da2fbe 100644
--- a/manual/lang.texi
+++ b/manual/lang.texi
@@ -462,6 +462,44 @@ use it except for reasons of portability.
 @refill
 @end deftypefn
 
+Sometimes it is necessary to parse the list of parameters more than once
+or one wants to remember a certain position in the parameter list.  To
+do this one will have to make a copy of the current value of the
+argument.  But @code{va_list} is an opaque type and it is not guaranteed
+that one can simply assign the value of a variable to another one of
+type @code{va_list}
+
+@comment stdarg.h
+@comment GNU
+@deftypefn {Macro} void __va_copy (va_list @var{dest}, va_list @var{src})
+The @code{__va_copy} macro allows copying of objects of type
+@code{va_list} even if this is no integral type.  The argument pointer
+in @var{dest} is initialized to point to the same argument as the
+pointer in @var{src}.
+
+This macro is a GNU extension but it will hopefully also be available in
+the next update of the ISO C standard.
+@end deftypefn
+
+If you want to use @code{__va_copy} you should always be prepared that
+this macro is not available.  On architectures where a simple assignment
+is invalid it hopefully is and so one should always write something like
+this:
+
+@smallexample
+@{
+  va_list ap, save;
+  @dots{}
+#ifdef __va_copy
+  __va_copy (save, ap);
+#else
+  save = ap;
+#endif
+  @dots{}
+@}
+@end smallexample
+
+
 @node Variadic Example
 @subsection Example of a Variadic Function