diff options
author | Eric Blake <ebb9@byu.net> | 2009-12-10 12:18:31 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-12-11 13:57:28 -0700 |
commit | 91e21656de5ae1e87d23465ce46e738be45a7254 (patch) | |
tree | 26245d771735e0a0ae14408abcdce507cff8e7ee /doc/posix-functions/unsetenv.texi | |
parent | a3255b1b9848874572e0df9d0609e263da50de4b (diff) | |
download | gnulib-91e21656de5ae1e87d23465ce46e738be45a7254.tar.gz |
setenv: relax requirement in light of POSIX ruling
Requiring that {un,}setenv gracefully reject NULL is just a waste
of processing power; POSIX agreed to this argument in
http://austingroupbugs.net/view.php?id=185
so we no longer worry whether a native implementation handles NULL.
* m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Test handling of "" but
not NULL.
* tests/test-setenv.c (main): Relax test.
* tests/test-unsetenv.c (main): Likewise.
* doc/posix-functions/setenv.texi (setenv): Document this.
* doc/posix-functions/unsetenv.texi (unsetenv): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'doc/posix-functions/unsetenv.texi')
-rw-r--r-- | doc/posix-functions/unsetenv.texi | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/posix-functions/unsetenv.texi b/doc/posix-functions/unsetenv.texi index 99a5e69527..80b17048cb 100644 --- a/doc/posix-functions/unsetenv.texi +++ b/doc/posix-functions/unsetenv.texi @@ -17,7 +17,7 @@ platforms: MacOS X 10.3, FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8, OSF/1 5.1. @item On some platforms, this function does not fail with @samp{EINVAL} when -passed a null pointer, an empty string, or a string containing @samp{=}: +passed an empty string or a string containing @samp{=}: FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8. @item This function removes only the first value association for the given @@ -27,4 +27,8 @@ Solaris 10. Portability problems not fixed by Gnulib: @itemize +@item +Older versions of POSIX required that @code{unsetenv(NULL)} gracefully +fail with @code{EINVAL}, but not all implementations guarantee this, +and the requirement was removed. @end itemize |