summaryrefslogtreecommitdiffstats
path: root/bsd-misc.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-03-26 12:12:34 +1000
committerDamien Miller <djm@mindrot.org>2000-03-26 12:12:34 +1000
commit2c9279fa667827384fceb243f890cba1dbe480de (patch)
treef1fad5fec82c219ca8d73006bb1d4181ad039d92 /bsd-misc.c
parenta208e57269c44761209434f06f980600a9a82fb9 (diff)
- Better tests for OpenSSL w/ RSAref
- Added replacement setenv() function from OpenBSD libc. Suggested by Ben Lindstrom <mouring@pconline.com>
Diffstat (limited to 'bsd-misc.c')
-rw-r--r--bsd-misc.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/bsd-misc.c b/bsd-misc.c
index 83cb0b85..dd1f6a47 100644
--- a/bsd-misc.c
+++ b/bsd-misc.c
@@ -139,30 +139,6 @@ void setproctitle(const char *fmt, ...)
}
#endif /* !HAVE_SETPROCTITLE */
-#ifndef HAVE_SETENV
-int setenv(const char *name, const char *value, int overwrite)
-{
- char *env_string;
- int result;
-
- /* Don't overwrite existing env. var if overwrite is 0 */
- if (!overwrite && (getenv(name) != NULL))
- return(0);
-
- env_string = xmalloc(strlen(name) + strlen(value) + 2);
- sprintf(env_string, "%s=%s", name, value);
-
- result = putenv(env_string);
-
- /* Putenv doesn't copy the env_string, so we need to keep a copy of it */
- /* around. This leaks a bit of memory, but it doesn't matter */
- /* for our (OpenSSH port ) use: setenv is only used twice in ssh-agent */
-/* xfree(env_string); */
-
- return(result);
-}
-#endif /* !HAVE_SETENV */
-
#ifndef HAVE_SETLOGIN
int setlogin(const char *name)
{