From: Bruno Haible Date: Sun, 5 Jun 2011 12:32:56 +0000 (+0200) Subject: unsetenv: Avoid gcc warning. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f88ff35bd7cbf4d48212a0eda501613c595904d;p=pspp unsetenv: Avoid gcc warning. * lib/unsetenv.c (unsetenv): Provide declaration if system lacks it. --- diff --git a/ChangeLog b/ChangeLog index 5fdf8a49f5..d41786cb96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-06-05 Bruno Haible + + unsetenv: Avoid gcc warning. + * lib/unsetenv.c (unsetenv): Provide declaration if system lacks it. + 2011-06-05 Bruno Haible setenv: Avoid gcc warning. diff --git a/lib/unsetenv.c b/lib/unsetenv.c index 215bba0646..16b50d15e3 100644 --- a/lib/unsetenv.c +++ b/lib/unsetenv.c @@ -97,6 +97,13 @@ weak_alias (__unsetenv, unsetenv) #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. */