diff options
author | Jim Meyering <jim@meyering.net> | 1997-06-29 20:12:52 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-06-29 20:12:52 +0000 |
commit | 551c02f7b6036641a7fd700b809e01a189aa85be (patch) | |
tree | a3cd24f39b42eba1823fd23ec9ad141a7d4ea838 /lib/putenv.c | |
parent | 90c131fa21d2d85deaf9dce1cf8d2156f8183311 (diff) | |
download | coreutils-551c02f7b6036641a7fd700b809e01a189aa85be.tar.xz |
Define-away putenv only if it's not already defined.
Diffstat (limited to 'lib/putenv.c')
-rw-r--r-- | lib/putenv.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/putenv.c b/lib/putenv.c index df2f39fe5..5e9a8631e 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 <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 |