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