Mercurial > hg > octave-lyh > gnulib-hg
changeset 954:e5fd4dda85bb
Define-away putenv only if it's not already defined.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Sun, 29 Jun 1997 20:12:52 +0000 |
parents | 736b31b01672 |
children | 8afe46e6ea6a |
files | lib/putenv.c |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 <stdlib.h> @@ -37,7 +40,9 @@ # include <unistd.h> #endif -#undef putenv +#ifndef putenv +# undef putenv +#endif #if !defined (__GNU_LIBRARY__) && !defined (HAVE_STRCHR) # define strchr index