1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * Copyright (c) 1997-2000 by Sun Microsystems, Inc. 3*0Sstevel@tonic-gate * All rights reserved. 4*0Sstevel@tonic-gate */ 5*0Sstevel@tonic-gate 6*0Sstevel@tonic-gate #ifndef LINT 7*0Sstevel@tonic-gate static const char rcsid[] = "$Id: putenv.c,v 8.4 1999/10/13 16:39:21 vixie Exp $"; 8*0Sstevel@tonic-gate #endif 9*0Sstevel@tonic-gate 10*0Sstevel@tonic-gate 11*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 12*0Sstevel@tonic-gate 13*0Sstevel@tonic-gate #include "port_before.h" 14*0Sstevel@tonic-gate #include "port_after.h" 15*0Sstevel@tonic-gate 16*0Sstevel@tonic-gate /* 17*0Sstevel@tonic-gate * To give a little credit to Sun, SGI, 18*0Sstevel@tonic-gate * and many vendors in the SysV world. 19*0Sstevel@tonic-gate */ 20*0Sstevel@tonic-gate 21*0Sstevel@tonic-gate #if !defined(NEED_PUTENV) 22*0Sstevel@tonic-gate int __bindcompat_putenv; 23*0Sstevel@tonic-gate #else 24*0Sstevel@tonic-gate int 25*0Sstevel@tonic-gate putenv(char *str) { 26*0Sstevel@tonic-gate char *tmp; 27*0Sstevel@tonic-gate 28*0Sstevel@tonic-gate for (tmp = str; *tmp && (*tmp != '='); tmp++) 29*0Sstevel@tonic-gate ; 30*0Sstevel@tonic-gate 31*0Sstevel@tonic-gate return (setenv(str, tmp, 1)); 32*0Sstevel@tonic-gate } 33*0Sstevel@tonic-gate #endif 34