@var is intended for placeholders (such as function parameters).
Actual variables need to use @code because @var causes upper-case
output, resulting in a different C identifier.
+2019-01-07 Florian Weimer <fweimer@redhat.com>
+
+ [BZ #24063]
+ * manual/arith.texi (Math Error Reporting): Use @code{errno}
+ instead of @var{errno}.
+ (Parsing of Integers): Likewise.
+ (Parsing of Floats): Likewise.
+ * manual/filesys.texi (Working with Directory Trees): Likewise.
+ (Temporary Files): Likewise.
+ * manual/job.texi (Terminal Access Functions): Likewise.
+ * manual/llio.texi (Synchronizing I/O): Likewise.
+ * manual/math.texi (SVID Random): Likewise.
+ * manual/message.texi (The catgets Functions): Likewise.
+ (Translation with gettext): Likewise.
+ (Locating gettext catalog): Likewise.
+ (Charset conversion in gettext): Likewise.
+ * manual/nss.texi (NSS Module Function Internals): Likewise.
+ * manual/search.texi (Hash Search Function): Likewise.
+ * manual/setjmp.texi (System V contexts): Likewise.
+ * manual/time.texi (Sleeping): Likewise.
+ * manual/users.texi (Lookup User): Likewise.
+ (Lookup Group): Likewise.
+
2019-01-05 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* posix/tst-spawn.c (do_test): Extend spargv to new required size and
underflow.
When a math function suffers a domain error, it raises the invalid
-exception and returns NaN. It also sets @var{errno} to @code{EDOM};
+exception and returns NaN. It also sets @code{errno} to @code{EDOM};
this is for compatibility with old systems that do not support @w{IEEE
754} exception handling. Likewise, when overflow occurs, math
functions raise the overflow exception and, in the default rounding
mode, return @math{@infinity{}} or @math{-@infinity{}} as appropriate
(in other rounding modes, the largest finite value of the appropriate
sign is returned when appropriate for that rounding mode). They also
-set @var{errno} to @code{ERANGE} if returning @math{@infinity{}} or
-@math{-@infinity{}}; @var{errno} may or may not be set to
+set @code{errno} to @code{ERANGE} if returning @math{@infinity{}} or
+@math{-@infinity{}}; @code{errno} may or may not be set to
@code{ERANGE} when a finite value is returned on overflow. When
underflow occurs, the underflow exception is raised, and zero
(appropriately signed) or a subnormal value, as appropriate for the
mathematical result of the function and the rounding mode, is
-returned. @var{errno} may be set to @code{ERANGE}, but this is not
+returned. @code{errno} may be set to @code{ERANGE}, but this is not
guaranteed; it is intended that @theglibc{} should set it when the
underflow is to an appropriately signed zero, but not necessarily for
other underflows.
@code{0l}, @code{LONG_MAX}, or @code{LONG_MIN}. Instead, check whether
@var{tailptr} points to what you expect after the number
(e.g. @code{'\0'} if the string should end after the number). You also
-need to clear @var{errno} before the call and check it afterward, in
+need to clear @code{errno} before the call and check it afterward, in
case there was overflow.
There is an example at the end of this section.
and an input more negative than @code{LONG_MIN} returns
(@code{ULONG_MAX} + 1) / 2.
-@code{strtoul} sets @var{errno} to @code{EINVAL} if @var{base} is out of
+@code{strtoul} sets @code{errno} to @code{EINVAL} if @var{base} is out of
range, or @code{ERANGE} on overflow.
@end deftypefun
Since zero is a valid result as well as the value returned on error, you
should check for errors in the same way as for @code{strtol}, by
-examining @var{errno} and @var{tailptr}.
+examining @code{errno} and @var{tailptr}.
@end deftypefun
@deftypefun float strtof (const char *@var{string}, char **@var{tailptr})
The return value is computed in the same way as for @code{ftw}.
@code{nftw} returns @math{0} if no failures occurred and all callback
functions returned @math{0}. In case of internal errors, such as memory
-problems, the return value is @math{-1} and @var{errno} is set
+problems, the return value is @math{-1} and @code{errno} is set
accordingly. If the return value of a callback invocation was non-zero
then that value is returned.
@samp{XXXXXX}.
If @code{mkdtemp} cannot create an uniquely named directory, it returns
-@code{NULL} and sets @var{errno} appropriately. If @var{template} does
+@code{NULL} and sets @code{errno} appropriately. If @var{template} does
not end with @samp{XXXXXX}, @code{mkdtemp} returns @code{NULL} and does
-not modify @var{template}. @var{errno} will be set to @code{EINVAL} in
+not modify @var{template}. @code{errno} will be set to @code{EINVAL} in
this case.
The directory is created using mode @code{0700}.
This function is used to obtain the process group ID of the session
for which the terminal specified by @var{fildes} is the controlling terminal.
If the call is successful the group ID is returned. Otherwise the
-return value is @code{(pid_t) -1} and the global variable @var{errno}
+return value is @code{(pid_t) -1} and the global variable @code{errno}
is set to the following value:
@table @code
@item EBADF
@c ref pthread_cleanup_push / pthread_cleanup_pop
The return value of the function is zero if no error occurred. Otherwise
-it is @math{-1} and the global variable @var{errno} is set to the
+it is @math{-1} and the global variable @code{errno} is set to the
following values:
@table @code
@item EBADF
The prototype for @code{fdatasync} is in @file{unistd.h}.
The return value of the function is zero if no error occurred. Otherwise
-it is @math{-1} and the global variable @var{errno} is set to the
+it is @math{-1} and the global variable @code{errno} is set to the
following values:
@table @code
@item EBADF
pointed to by @var{result}.
The return value of the function indicates whether the call succeeded.
-If the value is less than @code{0} an error occurred and @var{errno} is
+If the value is less than @code{0} an error occurred and @code{errno} is
set to indicate the problem.
This function is a GNU extension and should not be used in portable
this loaded catalog.
The return value is @code{(nl_catd) -1} in case the function failed and
-no catalog was loaded. The global variable @var{errno} contains a code
+no catalog was loaded. The global variable @code{errno} contains a code
for the error causing the failure. But even if the function call
succeeded this does not mean that all messages can be translated.
@end smallexample
@noindent
-When an error occurs the global variable @var{errno} is set to
+When an error occurs the global variable @code{errno} is set to
@table @var
@item EBADF
associated with a message catalog which previously was opened by a call
to @code{catopen}. If the resources can be successfully freed the
function returns @code{0}. Otherwise it returns @code{@minus{}1} and the
-global variable @var{errno} is set. Errors can occur if the catalog
-descriptor @var{catalog_desc} is not valid in which case @var{errno} is
+global variable @code{errno} is set. Errors can occur if the catalog
+descriptor @var{catalog_desc} is not valid in which case @code{errno} is
set to @code{EBADF}.
@end deftypefun
selected (@pxref{Locating gettext catalog}).
The @code{gettext} function does not modify the value of the global
-@var{errno} variable. This is necessary to make it possible to write
+@code{errno} variable. This is necessary to make it possible to write
something like
@smallexample
printf (gettext ("Operation failed: %m\n"));
@end smallexample
-Here the @var{errno} value is used in the @code{printf} function while
+Here the @code{errno} value is used in the @code{printf} function while
processing the @code{%m} format element and if the @code{gettext}
function would change this value (it is called before @code{printf} is
called) we would get a wrong message.
The function returns the value which is from now on taken as the default
domain. If the system went out of memory the returned value is
-@code{NULL} and the global variable @var{errno} is set to @code{ENOMEM}.
+@code{NULL} and the global variable @code{errno} is set to @code{ENOMEM}.
Despite the return value type being @code{char *} the return string must
not be changed. It is allocated internally by the @code{textdomain}
function.
allocated internally in the function and must not be changed by the
user. If the system went out of core during the execution of
@code{bindtextdomain} the return value is @code{NULL} and the global
-variable @var{errno} is set accordingly.
+variable @code{errno} is set accordingly.
@end deftypefun
allocated internally in the function and must not be changed by the
user. If the system went out of core during the execution of
@code{bind_textdomain_codeset}, the return value is @code{NULL} and the
-global variable @var{errno} is set accordingly.
+global variable @code{errno} is set accordingly.
@end deftypefun
information from one call to another.
Before the function returns with a failure code, the implementation
-should store the value of the local @var{errno} variable in the variable
+should store the value of the local @code{errno} variable in the variable
pointed to be @var{errnop}. This is important to guarantee the module
working in statically linked programs. The stored value must not be
zero.
flag set by the @code{set@var{DB}ent} function whenever this makes sense.
Before the function returns, the implementation should store the value of
-the local @var{errno} variable in the variable pointed to by
+the local @code{errno} variable in the variable pointed to by
@var{errnop}. This is important to guarantee the module works in
statically linked programs.
returned by storing it in a pointer variable pointed to by the
@var{retval} parameter. The return value of the function is an integer
value indicating success if it is non-zero and failure if it is zero.
-In the latter case the global variable @var{errno} signals the reason for
+In the latter case the global variable @code{errno} signals the reason for
the failure.
@table @code
architecture-specific subfields of the @code{uc_mcontext} field.
The function returns @code{0} if successful. Otherwise it returns
-@code{-1} and sets @var{errno} accordingly.
+@code{-1} and sets @code{errno} accordingly.
@end deftypefun
The @code{getcontext} function is similar to @code{setjmp} but it does
If @code{swapcontext} succeeds the function does not return unless the
context @var{oucp} is used without prior modification by
@code{makecontext}. The return value in this case is @code{0}. If the
-function fails it returns @code{-1} and sets @var{errno} accordingly.
+function fails it returns @code{-1} and sets @code{errno} accordingly.
@end deftypefun
@heading Example for SVID Context Handling
@code{struct timespec} is described in @xref{Elapsed Time}.
If the function returns because the interval is over the return value is
-zero. If the function returns @math{-1} the global variable @var{errno}
+zero. If the function returns @math{-1} the global variable @code{errno}
is set to the following values:
@table @code
or if an error occurred, the pointer returned in @var{result} is a null
pointer. The function returns zero or an error code. If the buffer
@var{buffer} is too small to contain all the needed information, the
-error code @code{ERANGE} is returned and @var{errno} is set to
+error code @code{ERANGE} is returned and @code{errno} is set to
@code{ERANGE}.
@end deftypefun
or if an error occurred, the pointer returned in @var{result} is a null
pointer. The function returns zero or an error code. If the buffer
@var{buffer} is too small to contain all the needed information, the
-error code @code{ERANGE} is returned and @var{errno} is set to
+error code @code{ERANGE} is returned and @code{errno} is set to
@code{ERANGE}.
@end deftypefun