xref: /onnv-gate/usr/src/lib/libresolv2/common/bsd/putenv.c (revision 11038:74b12212b8a2)
10Sstevel@tonic-gate #ifndef LINT
2*11038SRao.Shoaib@Sun.COM static const char rcsid[] = "$Id: putenv.c,v 1.2 2005/04/27 04:56:11 sra Exp $";
30Sstevel@tonic-gate #endif
40Sstevel@tonic-gate 
50Sstevel@tonic-gate #include "port_before.h"
60Sstevel@tonic-gate #include "port_after.h"
70Sstevel@tonic-gate 
8*11038SRao.Shoaib@Sun.COM /*%
90Sstevel@tonic-gate  * To give a little credit to Sun, SGI,
100Sstevel@tonic-gate  * and many vendors in the SysV world.
110Sstevel@tonic-gate  */
120Sstevel@tonic-gate 
130Sstevel@tonic-gate #if !defined(NEED_PUTENV)
140Sstevel@tonic-gate int __bindcompat_putenv;
150Sstevel@tonic-gate #else
160Sstevel@tonic-gate int
putenv(char * str)170Sstevel@tonic-gate putenv(char *str) {
180Sstevel@tonic-gate 	char *tmp;
190Sstevel@tonic-gate 
200Sstevel@tonic-gate 	for (tmp = str; *tmp && (*tmp != '='); tmp++)
210Sstevel@tonic-gate 		;
220Sstevel@tonic-gate 
230Sstevel@tonic-gate 	return (setenv(str, tmp, 1));
240Sstevel@tonic-gate }
250Sstevel@tonic-gate #endif
26*11038SRao.Shoaib@Sun.COM 
27*11038SRao.Shoaib@Sun.COM /*! \file */
28