*** src/libc/compat/stdlib/putenv.c~0 Sun Oct 1 04:41:00 1995
--- src/libc/compat/stdlib/putenv.c Mon Jan 8 17:35:30 1996
***************
*** 2,7 ****
--- 2,8 ----
#include <libc/stubs.h>
#include <stdlib.h>
#include <string.h>
+ #include <libc/bss.h>
/*
***************
*** 14,19 ****
--- 15,21 ----
extern char **environ;
static int ecount = -1;
static int emax = -1;
+ static int putenv_bss_count = -1;
int
putenv(const char *val)
***************
*** 26,33 ****
if (epos == 0)
return -1;
! if (ecount == -1)
{
for (ecount=0; environ[ecount]; ecount++);
emax = ecount;
}
--- 28,36 ----
if (epos == 0)
return -1;
! if (putenv_bss_count != __bss_count)
{
+ putenv_bss_count = __bss_count;
for (ecount=0; environ[ecount]; ecount++);
emax = ecount;
}