unsetenv: work around Solaris bug
authorEric Blake <ebb9@byu.net>
Tue, 17 Nov 2009 13:31:34 +0000 (06:31 -0700)
committerEric Blake <ebb9@byu.net>
Tue, 17 Nov 2009 13:31:34 +0000 (06:31 -0700)
commit41d42744e7a191342b71e4fe21517679b6a02a5e
tree3b80bbd0078051b67df4bae07251932a42562e9c
parented893045a0d0f3c48d3f562075d15905452b94e5
unsetenv: work around Solaris bug

unsetenv(name) only cleared the first instance, even if (ab)use of
putenv, or assignment to environ, included duplicates of name.

* m4/setenv.m4 (gl_FUNC_UNSETENV): Check for bug.
* lib/unsetenv.c (rpl_unsetenv): Work around it.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/unsetenv.c
m4/setenv.m4