1 /* $NetBSD: putenv.c,v 1.1.1.2 2012/09/09 16:07:43 christos Exp $ */ 2 3 #ifndef LINT 4 static 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) 16 int __bindcompat_putenv; 17 #else 18 int putenv(char * str)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