setenv: Avoid gcc warning.
authorBruno Haible <bruno@clisp.org>
Sun, 5 Jun 2011 12:31:51 +0000 (14:31 +0200)
committerIan Beckwith <ianb@erislabs.net>
Thu, 9 Jun 2011 23:36:12 +0000 (00:36 +0100)
* lib/setenv.c (setenv): Provide declaration if system lacks it.
(cherry picked from commit c00787b642cb499896ae03a918f13546d24b6552)

ChangeLog
lib/setenv.c

index dd2b6ca..b8bfb2b 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