chiark
/
gitweb
/
~ian
/
userv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cdda6e7
)
setenv emulation using putenv works properly (previously you would get wrong environm...
author
ian
<ian>
Wed, 19 May 1999 21:03:33 +0000
(21:03 +0000)
committer
ian
<ian>
Wed, 19 May 1999 21:03:33 +0000
(21:03 +0000)
debian/changelog
patch
|
blob
|
history
lib.c
patch
|
blob
|
history
diff --git
a/debian/changelog
b/debian/changelog
index 8f118328ec6113dd7df2577ee472c80acddf6c2d..e2f0b35b7f49d91e436a8fc31709c466118e5ef0 100644
(file)
--- a/
debian/changelog
+++ b/
debian/changelog
@@
-1,3
+1,10
@@
+userv (0.63) unstable; urgency=low
+
+ * setenv emulation using putenv works properly (previously you would get
+ wrong environment variable settings). (Thanks to Ben Harris.)
+
+ --
+
userv (0.62) unstable; urgency=low
* New builtin service `help' lists builtin services.
userv (0.62) unstable; urgency=low
* New builtin service `help' lists builtin services.
diff --git
a/lib.c
b/lib.c
index bd40ee08ab77376f74b1ce5715b9740a16c82e71..22c8cd1750a52af1855b242104191d6abb3028a1 100644
(file)
--- a/
lib.c
+++ b/
lib.c
@@
-116,14
+116,10
@@
void snytprintfcat(char *buffer, size_t size, const char *fmt, ...) {
#ifndef HAVE_SETENV
int setenv(const char *name, const char *value, int overwrite) {
#ifndef HAVE_SETENV
int setenv(const char *name, const char *value, int overwrite) {
- static char *buffer= 0;
- static int avail= 0;
-
- int r;
+ char *buffer= 0;
assert(overwrite==1);
assert(overwrite==1);
- r= makeroom(&buffer,&avail,strlen(name)+strlen(value)+2);
- if (r) { errno= EINVAL; return -1; }
+ buffer= xmalloc(strlen(name)+strlen(value)+2);
sprintf(buffer,"%s=%s",name,value);
return putenv(buffer);
sprintf(buffer,"%s=%s",name,value);
return putenv(buffer);