3544 |
This is because @code{exit} predates @code{void}, and there was a long |
This is because @code{exit} predates @code{void}, and there was a long |
3545 |
tradition of it returning @code{int}. |
tradition of it returning @code{int}. |
3546 |
|
|
3547 |
|
@item @code{putenv} |
3548 |
|
@c @fuindex putenv |
3549 |
|
@prindex @code{putenv} |
3550 |
|
POSIX specifies that @code{putenv} puts the given string directly in |
3551 |
|
@code{environ}, but some systems make a copy of it instead (eg.@: |
3552 |
|
glibc 2.0, or BSD). And when a copy is made, @code{unsetenv} might |
3553 |
|
not free it, causing a memory leak (eg.@: FreeBSD 4). |
3554 |
|
|
3555 |
|
POSIX specifies that @code{putenv("FOO")} removes @samp{FOO} from the |
3556 |
|
environment, but on some systems (eg.@: FreeBSD 4) this is not the |
3557 |
|
case and instead @code{unsetenv} must be used. |
3558 |
|
|
3559 |
|
On MINGW, a call @code{putenv("FOO=")} removes @samp{FOO} from the |
3560 |
|
environment, rather than inserting it with an empty value. |
3561 |
|
|
3562 |
@item @code{snprintf} |
@item @code{snprintf} |
3563 |
@c @fuindex snprintf |
@c @fuindex snprintf |
3564 |
@prindex @code{snprintf} |
@prindex @code{snprintf} |
3624 |
on DOS it could even lead to file system corruption, as the file might end |
on DOS it could even lead to file system corruption, as the file might end |
3625 |
up being written to after the OS has removed it. |
up being written to after the OS has removed it. |
3626 |
|
|
3627 |
|
@item @code{unsetenv} |
3628 |
|
@c @fuindex unsetenv |
3629 |
|
@prindex @code{unsetenv} |
3630 |
|
On MINGW, @code{unsetenv} is not available, but a variable @samp{FOO} |
3631 |
|
can be removed with a call @code{putenv("FOO=")}, as described under |
3632 |
|
@code{putenv} above. |
3633 |
|
|
3634 |
@item @code{va_copy} |
@item @code{va_copy} |
3635 |
@c @fuindex va_copy |
@c @fuindex va_copy |
3636 |
@prindex @code{va_copy} |
@prindex @code{va_copy} |