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 <br...@clisp.org> 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 <br...@clisp.org> 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>