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