xref: /titanic_52/usr/src/lib/libresolv2/common/bsd/putenv.c (revision 9525b14bcdeb5b5f6f95ab27c2f48f18bd2ec829)
17c478bd9Sstevel@tonic-gate #ifndef LINT
2*9525b14bSRao Shoaib static const char rcsid[] = "$Id: putenv.c,v 1.2 2005/04/27 04:56:11 sra Exp $";
37c478bd9Sstevel@tonic-gate #endif
47c478bd9Sstevel@tonic-gate 
57c478bd9Sstevel@tonic-gate #include "port_before.h"
67c478bd9Sstevel@tonic-gate #include "port_after.h"
77c478bd9Sstevel@tonic-gate 
8*9525b14bSRao Shoaib /*%
97c478bd9Sstevel@tonic-gate  * To give a little credit to Sun, SGI,
107c478bd9Sstevel@tonic-gate  * and many vendors in the SysV world.
117c478bd9Sstevel@tonic-gate  */
127c478bd9Sstevel@tonic-gate 
137c478bd9Sstevel@tonic-gate #if !defined(NEED_PUTENV)
147c478bd9Sstevel@tonic-gate int __bindcompat_putenv;
157c478bd9Sstevel@tonic-gate #else
167c478bd9Sstevel@tonic-gate int
177c478bd9Sstevel@tonic-gate putenv(char *str) {
187c478bd9Sstevel@tonic-gate 	char *tmp;
197c478bd9Sstevel@tonic-gate 
207c478bd9Sstevel@tonic-gate 	for (tmp = str; *tmp && (*tmp != '='); tmp++)
217c478bd9Sstevel@tonic-gate 		;
227c478bd9Sstevel@tonic-gate 
237c478bd9Sstevel@tonic-gate 	return (setenv(str, tmp, 1));
247c478bd9Sstevel@tonic-gate }
257c478bd9Sstevel@tonic-gate #endif
26*9525b14bSRao Shoaib 
27*9525b14bSRao Shoaib /*! \file */
28