[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
setenv, unsetenv warnings
From: |
Bruno Haible |
Subject: |
setenv, unsetenv warnings |
Date: |
Sun, 5 Jun 2011 14:33:35 +0200 |
User-agent: |
KMail/1.9.9 |
On OSF/1 5.1 with gcc, I'm seeing these warnings:
setenv.c:366: warning: implicit declaration of function 'setenv'
unsetenv.c:116: warning: implicit declaration of function 'unsetenv'
This fixes it.
2011-06-05 Bruno Haible <address@hidden>
setenv: Avoid gcc warning.
* lib/setenv.c (setenv): Provide declaration if system lacks it.
--- lib/setenv.c.orig Sun Jun 5 14:31:26 2011
+++ lib/setenv.c Sun Jun 5 14:28:26 2011
@@ -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
2011-06-05 Bruno Haible <address@hidden>
unsetenv: Avoid gcc warning.
* lib/unsetenv.c (unsetenv): Provide declaration if system lacks it.
--- lib/unsetenv.c.orig Sun Jun 5 14:32:23 2011
+++ lib/unsetenv.c Sun Jun 5 14:29:09 2011
@@ -97,6 +97,13 @@
#else /* HAVE_UNSETENV */
# undef unsetenv
+# if !HAVE_DECL_UNSETENV
+# if VOID_UNSETENV
+extern void unsetenv (const char *);
+# else
+extern int unsetenv (const char *);
+# endif
+# endif
/* Call the underlying unsetenv, in case there is hidden bookkeeping
that needs updating beyond just modifying environ. */
--
In memoriam Eduard Lederer <http://de.wikipedia.org/wiki/Eduard_Lederer>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- setenv, unsetenv warnings,
Bruno Haible <=