bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

header for 'environ'


From: Bruno Haible
Subject: header for 'environ'
Date: Wed, 17 Dec 2008 01:57:33 +0100
User-agent: KMail/1.9.9

In gnulib, following many Unix systems, environ is declared in <unistd.h>.
There is no need to explicitly include <stdlib.h> in order to get it.
I'm applying this:


2008-12-16  Bruno Haible  <address@hidden>

        * lib/unistd.in.h: Add comment.
        * tests/test-environ.c: Don't include <stdlib.h>.

--- lib/unistd.in.h.orig        2008-12-17 01:51:46.000000000 +0100
+++ lib/unistd.in.h     2008-12-17 01:51:14.000000000 +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@
--- tests/test-environ.c.orig   2008-12-17 01:51:46.000000000 +0100
+++ tests/test-environ.c        2008-12-17 00:08:11.000000000 +0100
@@ -20,7 +20,6 @@
 
 #include <unistd.h>
 
-#include <stdlib.h>
 #include <string.h>
 
 int




reply via email to

[Prev in Thread] Current Thread [Next in Thread]