changeset 14866:0d4d726862ca

setenv: Avoid gcc warning. * lib/setenv.c (setenv): Provide declaration if system lacks it.
author Bruno Haible <bruno@clisp.org>
date Sun, 05 Jun 2011 14:31:51 +0200
parents a2e884bebbb5
children 355e7137b2de
files ChangeLog lib/setenv.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-05  Bruno Haible  <bruno@clisp.org>
+
+	setenv: Avoid gcc warning.
+	* lib/setenv.c (setenv): Provide declaration if system lacks it.
+
 2011-06-05  Bruno Haible  <bruno@clisp.org>
 
 	sys_select: Ensure memset is declared also on AIX 7.
--- a/lib/setenv.c
+++ b/lib/setenv.c
@@ -350,6 +350,9 @@
 #if HAVE_SETENV
 
 # undef setenv
+# if !HAVE_DECL_SETENV
+extern int setenv (const char *, const char *, int);
+# endif
 # define STREQ(a, b) (strcmp (a, b) == 0)
 
 int