lcd wrote:

> On 3 February 2014, LCD 47 <[email protected]> wrote:
> > On 3 February 2014, ZyX <[email protected]> wrote:
> > > >     IIRC, SysV had putenv(3), while BSD had setenv(3).  The latter
> > > > had a corresponding unsetenv(3), while the former didn't.
> > > >
> > > > > On my Ubuntu Linux system, the unsetenv(3) man page says that it
> > > > > conforms to 4.3BSD and POSIX.1-2001.
> > > >
> > > >     POSIX?  As Wietse Venema used to put it, you're young and
> > > > impatient. ;)
> > >
> > > You mean SysV does not have C function for unsetting environment?
> > [...]
> >
> >     Well, historically yes.  OSF/1 2.0 (some 20+ years ago) didn't
> > have any way to unset environment, then OSF/1 3.2 had unsetenv(3), but
> > it wasn't declared by default, or something like that.  Sadly I don't
> > remember anything about Solaris.
> 
>     A quick search reveals this:
> 
>       http://www.greenend.org.uk/rjk/tech/putenv.html
> 
>     According to this guy unsetenv() was added in Solaris 5.10, which is
> now ~10 years old.  On Solaris you could modify *environment directly,
> but IIRC on OSF/1 that was explicitly forbidden.

Yeah, so we could use unsetenv() if a configure check says it exists on
the system.  This also means how it works depends on the version of Vim
you have.  Thus, when you "unlet" an environment variable it may have a
slightly different effect on different versions of Vim.  We better
document that properly and hope script writers don't make assumptions.

-- 
hundred-and-one symptoms of being an internet addict:
256. You are able to write down over 250 symptoms of being an internet
     addict, even though they only asked for 101.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui