changeset 5580:19f7545b3c2b

Declare environ; not all systems declare it.
author Bruno Haible <bruno@clisp.org>
date Mon, 17 Jan 2005 12:55:00 +0000
parents 3c00c96d8e0f
children c8676e66b5da
files lib/ChangeLog lib/execute.c lib/pipe.c
diffstat 3 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,9 @@
+2004-05-27  Bruno Haible  <bruno@clisp.org>
+
+	* execute.c (environ): Declare if needed.
+	* pipe.c (environ): Likewise.
+	Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
+
 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
 
 	* human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
--- a/lib/execute.c
+++ b/lib/execute.c
@@ -1,5 +1,5 @@
 /* Creation of autonomous subprocesses.
-   Copyright (C) 2001-2003 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -61,6 +61,10 @@
 
 #endif
 
+#ifndef HAVE_ENVIRON_DECL
+extern char **environ;
+#endif
+
 #ifndef STDIN_FILENO
 # define STDIN_FILENO 0
 #endif
--- a/lib/pipe.c
+++ b/lib/pipe.c
@@ -60,6 +60,10 @@
 
 #endif
 
+#ifndef HAVE_ENVIRON_DECL
+extern char **environ;
+#endif
+
 #ifndef STDIN_FILENO
 # define STDIN_FILENO 0
 #endif