+
+#ifndef HAVE_SETENV
+int setenv(const char *name, const char *value, int overwrite) {
+ static char *buffer= 0;
+ static int avail= 0;
+
+ int r;
+
+ assert(overwrite==1);
+ r= makeroom(&buffer,&avail,strlen(name)+strlen(value)+2);
+ if (r) { errno= EINVAL; return -1; }
+
+ sprintf(buffer,"%s=%s",name,value);
+ return putenv(buffer);
+}
+#endif /* HAVE_SETENV */