zsh-workers
 help / color / mirror / code / Atom feed
* putenv()/environ bug
@ 2007-07-25 15:09 Sean C. Farley
  2007-07-25 20:53 ` Peter Stephenson
  0 siblings, 1 reply; 11+ messages in thread
From: Sean C. Farley @ 2007-07-25 15:09 UTC (permalink / raw)
  To: zsh-workers

As noticed here[1] following a change[2] in FreeBSD's *env() functions,
zsh is mixing *env() (putenv() in this case) functions with direct
access to the environ variable's contents against the IEEE Std 1003.1
specification.  For the FreeBSD port, there is an easy solution in the
thread to tell configure that putenv() does not exist.  I just wanted to
let the zsh development team know about this issue.

Regarding FreeBSD, if you replace the environ pointer, a call to
setenv(), putenv() or unsetenv() will detect this and update itself
internally.  getenv() will use environ until one of the other *env()
functions is called.  If you manipulate environ values after a call to
setenv(), putenv() or unsetenv() is made, then the change will go
unnoticed.

BTW, is there a particular reason the standard *env() functions cannot
be used for all operations to environ if found?

Sean
   1. http://lists.freebsd.org/pipermail/freebsd-current/2007-July/075541.html
   2. http://lists.freebsd.org/pipermail/freebsd-ports/2007-May/041577.html
-- 
scf@FreeBSD.org


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-07-31 18:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-25 15:09 putenv()/environ bug Sean C. Farley
2007-07-25 20:53 ` Peter Stephenson
2007-07-26  0:14   ` Sean C. Farley
2007-07-28 18:46     ` Andrey Borzenkov
2007-07-29 19:08       ` Sean C. Farley
2007-07-30 20:39         ` Peter Stephenson
2007-07-30 20:52           ` Peter Stephenson
2007-07-30 22:44             ` Sean C. Farley
2007-07-31  9:00               ` Peter Stephenson
2007-07-31 18:09                 ` Sean C. Farley
2007-07-30 22:39           ` Sean C. Farley

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).