From: Jim Meyering Date: Sun, 29 Jun 1997 20:12:52 +0000 (+0000) Subject: Define-away putenv only if it's not already defined. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d912e60a8e6b13c0a9b1dd111a8a6d236ff083a;p=pspp Define-away putenv only if it's not already defined. --- diff --git a/lib/putenv.c b/lib/putenv.c index df2f39fe5d..5e9a8631ef 100644 --- a/lib/putenv.c +++ b/lib/putenv.c @@ -24,8 +24,11 @@ #endif /* Define-away any (possibly conflicting) prototype of putenv. - Many systems omit the `const' attribute on the argument. */ -#define putenv _sys_putenv + Many systems omit the `const' attribute on the argument. + Define-away only if it's not already defined (e.g. to rpl_putenv). */ +#ifndef putenv +# define putenv _sys_putenv +#endif #if defined (__GNU_LIBRARY__) || defined (HAVE_STDLIB_H) # include @@ -37,7 +40,9 @@ # include #endif -#undef putenv +#ifndef putenv +# undef putenv +#endif #if !defined (__GNU_LIBRARY__) && !defined (HAVE_STRCHR) # define strchr index