changeset 10891:da1e292eb1e0

environ is supposed to be declared by <unistd.h>.
author Bruno Haible <bruno@clisp.org>
date Wed, 17 Dec 2008 01:56:49 +0100
parents 195c41817bd2
children 67a8f53c94f0
files ChangeLog lib/unistd.in.h tests/test-environ.c
diffstat 3 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Dec 17 00:02:40 2008 +0100
+++ b/ChangeLog	Wed Dec 17 01:56:49 2008 +0100
@@ -1,3 +1,8 @@
+2008-12-16  Bruno Haible  <bruno@clisp.org>
+
+	* lib/unistd.in.h: Add comment.
+	* tests/test-environ.c: Don't include <stdlib.h>.
+
 2008-12-16  Bruno Haible  <bruno@clisp.org>
 
 	* lib/parse-duration.h (parse_duration): Document return value
--- a/lib/unistd.in.h	Wed Dec 17 00:02:40 2008 +0100
+++ b/lib/unistd.in.h	Wed Dec 17 01:56:49 2008 +0100
@@ -35,6 +35,7 @@
 #endif
 
 /* mingw fails to declare _exit in <unistd.h>.  */
+/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
 #include <stdlib.h>
 
 #if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
--- a/tests/test-environ.c	Wed Dec 17 00:02:40 2008 +0100
+++ b/tests/test-environ.c	Wed Dec 17 01:56:49 2008 +0100
@@ -20,7 +20,6 @@
 
 #include <unistd.h>
 
-#include <stdlib.h>
 #include <string.h>
 
 int