1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1997-2000 by Sun Microsystems, Inc.
3*7c478bd9Sstevel@tonic-gate  * All rights reserved.
4*7c478bd9Sstevel@tonic-gate  */
5*7c478bd9Sstevel@tonic-gate 
6*7c478bd9Sstevel@tonic-gate #ifndef LINT
7*7c478bd9Sstevel@tonic-gate static const char rcsid[] = "$Id: putenv.c,v 8.4 1999/10/13 16:39:21 vixie Exp $";
8*7c478bd9Sstevel@tonic-gate #endif
9*7c478bd9Sstevel@tonic-gate 
10*7c478bd9Sstevel@tonic-gate 
11*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
12*7c478bd9Sstevel@tonic-gate 
13*7c478bd9Sstevel@tonic-gate #include "port_before.h"
14*7c478bd9Sstevel@tonic-gate #include "port_after.h"
15*7c478bd9Sstevel@tonic-gate 
16*7c478bd9Sstevel@tonic-gate /*
17*7c478bd9Sstevel@tonic-gate  * To give a little credit to Sun, SGI,
18*7c478bd9Sstevel@tonic-gate  * and many vendors in the SysV world.
19*7c478bd9Sstevel@tonic-gate  */
20*7c478bd9Sstevel@tonic-gate 
21*7c478bd9Sstevel@tonic-gate #if !defined(NEED_PUTENV)
22*7c478bd9Sstevel@tonic-gate int __bindcompat_putenv;
23*7c478bd9Sstevel@tonic-gate #else
24*7c478bd9Sstevel@tonic-gate int
25*7c478bd9Sstevel@tonic-gate putenv(char *str) {
26*7c478bd9Sstevel@tonic-gate 	char *tmp;
27*7c478bd9Sstevel@tonic-gate 
28*7c478bd9Sstevel@tonic-gate 	for (tmp = str; *tmp && (*tmp != '='); tmp++)
29*7c478bd9Sstevel@tonic-gate 		;
30*7c478bd9Sstevel@tonic-gate 
31*7c478bd9Sstevel@tonic-gate 	return (setenv(str, tmp, 1));
32*7c478bd9Sstevel@tonic-gate }
33*7c478bd9Sstevel@tonic-gate #endif
34