setenv: Avoid gcc warning.
authorBruno Haible <bruno@clisp.org>
Sun, 5 Jun 2011 12:31:51 +0000 (14:31 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 5 Jun 2011 12:31:51 +0000 (14:31 +0200)
* lib/setenv.c (setenv): Provide declaration if system lacks it.

ChangeLog
lib/setenv.c

index 599c20d..5fdf8a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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.
        * lib/sys_select.in.h: Include <string.h> also on AIX.
        * doc/posix-headers/sys_select.texi: Mention that <sys/select.h> is not
index 173d95f..0a5f67d 100644 (file)
@@ -350,6 +350,9 @@ weak_alias (__clearenv, clearenv)
 #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