xref: /titanic_44/usr/src/lib/libresolv2/common/bsd/putenv.c (revision b07b2f5c1a9b43b43daa3f5087f57ede3d664810)
1 #ifndef LINT
2 static const char rcsid[] = "$Id: putenv.c,v 1.2 2005/04/27 04:56:11 sra Exp $";
3 #endif
4 
5 #include "port_before.h"
6 #include "port_after.h"
7 
8 /*%
9  * To give a little credit to Sun, SGI,
10  * and many vendors in the SysV world.
11  */
12 
13 #if !defined(NEED_PUTENV)
14 int __bindcompat_putenv;
15 #else
16 int
17 putenv(char *str) {
18 	char *tmp;
19 
20 	for (tmp = str; *tmp && (*tmp != '='); tmp++)
21 		;
22 
23 	return (setenv(str, tmp, 1));
24 }
25 #endif
26 
27 /*! \file */
28