[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Environment variables
- From: David Jones <drj@...>
- Date: Sun, 09 Feb 2003 00:33:19 +0000
In message <200302090008.WAA31048@lua.tecgraf.puc-rio.br>, Luiz Henrique de Fig
ueiredo writes:
>
> >Another question: why is there no setenv() in the
> >std. lib???
>
> Because it's not ANSI C. The man page in my Linyx box says that setenv is
> only in BSD 4.3, not even in POSIX, which seems to have putenv.
Of course, you are quite right, setenv is not in ANSI C.
Your Linux man pages are incorrect (surprise!).
setenv is in POSIX, see
http://www.opengroup.org/onlinepubs/007904875/toc.htm (or in IEEE
Std 1003.1-2001 which passes for POSIX these days at any rate).
putenv is in the same standard, but is XSI shaded (IE not part of
the core and only supported on XSI conformant systems). Also, the
same standard says in the Application Usage section: "The setenv()
function is preferred over this function". See
http://www.opengroup.org/onlinepubs/007904875/toc.htm
Cheers,
drj