(Environment Access): Adjust comment about setenv() being BSD-only.

This commit is contained in:
Ulrich Drepper 2001-01-27 08:32:08 +00:00
parent 344be96af4
commit 0423ee1769
2 changed files with 15 additions and 12 deletions

View File

@ -1360,14 +1360,15 @@ The prototypes for these functions are in @file{stdlib.h}.
@comment stdlib.h @comment stdlib.h
@comment BSD @comment BSD
@deftypefun {int32_t} random (void) @deftypefun {long int} random (void)
This function returns the next pseudo-random number in the sequence. This function returns the next pseudo-random number in the sequence.
The value returned ranges from @code{0} to @code{RAND_MAX}. The value returned ranges from @code{0} to @code{RAND_MAX}.
@strong{Note:} Historically this function returned a @code{long int} @strong{Note:} Temporarily this function was defined to return a
value. On 64-bit systems @code{long int} would have been larger than @code{int32_t} value to indicate that the return value always contains
programs expected, so @code{random} is now defined to return exactly 32 32 bits even if @code{long int} is wider. The standard demands it
bits. differently. Users must always be aware of the 32-bit limitation,
though.
@end deftypefun @end deftypefun
@comment stdlib.h @comment stdlib.h

View File

@ -364,23 +364,25 @@ the old entry is replaced by the new one.
Please note that you cannot remove an entry completely using this function. Please note that you cannot remove an entry completely using this function.
This function is part of the BSD library. The GNU C Library provides This function was originally part of the BSD library but is now part of
this function for compatibility but it may not be available on other the Unix standard.
systems.
@end deftypefun @end deftypefun
@comment stdlib.h @comment stdlib.h
@comment BSD @comment BSD
@deftypefun void unsetenv (const char *@var{name}) @deftypefun int unsetenv (const char *@var{name})
Using this function one can remove an entry completely from the Using this function one can remove an entry completely from the
environment. If the environment contains an entry with the key environment. If the environment contains an entry with the key
@var{name} this whole entry is removed. A call to this function is @var{name} this whole entry is removed. A call to this function is
equivalent to a call to @code{putenv} when the @var{value} part of the equivalent to a call to @code{putenv} when the @var{value} part of the
string is empty. string is empty.
This function is part of the BSD library. The GNU C Library provides The function return @code{-1} if @var{name} is a null pointer, points to
this function for compatibility but it may not be available on other an empty string, or points to a string containing a @code{=} character.
systems. It returns @code{0} if the call succeeded.
This function was originall part of the BSD library but is now part of
the Unix standard. The BSD version had no return value, though.
@end deftypefun @end deftypefun
There is one more function to modify the whole environment. This There is one more function to modify the whole environment. This