summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-02-28 12:08:03 +0000
committerJim Meyering <jim@meyering.net>1995-02-28 12:08:03 +0000
commitb53cae84920f6acb8f71eb1e65fbbfd06745adc7 (patch)
tree74b34ee75f00cb01aec75eadbf2a14a51fc48793 /lib
parent861ff7f26cb8432a0ccada947e6cfae73a666e4a (diff)
downloadcoreutils-b53cae84920f6acb8f71eb1e65fbbfd06745adc7.tar.xz
Always include system headers, but define-away any putenv prototype.
Diffstat (limited to 'lib')
-rw-r--r--lib/putenv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/putenv.c b/lib/putenv.c
index 4c161a420..b39fb6482 100644
--- a/lib/putenv.c
+++ b/lib/putenv.c
@@ -24,6 +24,10 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <config.h>
#endif
+/* Define-away any (possibly conflicting) prototype of putenv.
+ Many systems omit the `const' attribute on the argument. */
+#define putenv _sys_putenv
+
#if defined (__GNU_LIBRARY__) || defined (HAVE_STDLIB_H)
#include <stdlib.h>
#endif
@@ -34,6 +38,8 @@ Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <unistd.h>
#endif
+#undef putenv
+
#if !defined (__GNU_LIBRARY__) && !defined (HAVE_STRCHR)
#define strchr index
#endif