From 2c9279fa667827384fceb243f890cba1dbe480de Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Mar 2000 12:12:34 +1000 Subject: - Better tests for OpenSSL w/ RSAref - Added replacement setenv() function from OpenBSD libc. Suggested by Ben Lindstrom --- bsd-misc.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'bsd-misc.c') diff --git a/bsd-misc.c b/bsd-misc.c index 83cb0b85d..dd1f6a476 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) { -- cgit v1.2.3