summaryrefslogtreecommitdiff
path: root/usr/src/lib/libresolv2/common/bsd/putenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libresolv2/common/bsd/putenv.c')
-rw-r--r--usr/src/lib/libresolv2/common/bsd/putenv.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/usr/src/lib/libresolv2/common/bsd/putenv.c b/usr/src/lib/libresolv2/common/bsd/putenv.c
new file mode 100644
index 0000000000..08ef44463e
--- /dev/null
+++ b/usr/src/lib/libresolv2/common/bsd/putenv.c
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 1997-2000 by Sun Microsystems, Inc.
+ * All rights reserved.
+ */
+
+#ifndef LINT
+static const char rcsid[] = "$Id: putenv.c,v 8.4 1999/10/13 16:39:21 vixie Exp $";
+#endif
+
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#include "port_before.h"
+#include "port_after.h"
+
+/*
+ * To give a little credit to Sun, SGI,
+ * and many vendors in the SysV world.
+ */
+
+#if !defined(NEED_PUTENV)
+int __bindcompat_putenv;
+#else
+int
+putenv(char *str) {
+ char *tmp;
+
+ for (tmp = str; *tmp && (*tmp != '='); tmp++)
+ ;
+
+ return (setenv(str, tmp, 1));
+}
+#endif