.
[gnulib.git] / lib / putenv.c
index 4c161a4..b39fb64 100644 (file)
@@ -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