#if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
#include <malloc.h>
#endif /* HAVE_MALLOC_H && !STDC_HEADERS */
-#include <errno.h>
-#include <sys/param.h>
#include "compat.h"
#endif /* !STDC_HEADERS && !gcc */
-/*
- * Since we can't count on this being defined...
- */
-extern int errno;
-
-
-int putenv __P((const char *));
-
-
/******************************************************************
*
* putenv()
* find out how much of str to match when searching
* for a string to replace.
*/
- if ((tmp = index(str, '=')) == NULL || tmp == str)
+ if ((tmp = strchr(str, '=')) == NULL || tmp == str)
matchlen = strlen(str);
else
matchlen = (int) (tmp - str);