1 /* This implementation of setenv has a space leak, but I don't see how to avoid
2 * it, since the specification of putenv is that it uses the memory for its arg.
4 int setenv (const char *name
, const char *value
, int overwrite
) {
8 if (!overwrite
&& getenv (name
))
11 len
= strlen (name
) + strlen (value
) + 2 /* = and \000 */;
13 snprintf (b
, len
, "%s=%s", name
, value
);