Merge from vendor branch TCSH:
[dragonfly.git] / contrib / bind-9.3 / lib / bind / bsd / putenv.c
1 #ifndef LINT
2 static const char rcsid[] = "$Id: putenv.c,v 1.1 2001/03/29 06:30:33 marka Exp $";
3 #endif
4
5 #include "port_before.h"
6 #include "port_after.h"
7
8 /*
9  * To give a little credit to Sun, SGI,
10  * and many vendors in the SysV world.
11  */
12
13 #if !defined(NEED_PUTENV)
14 int __bindcompat_putenv;
15 #else
16 int
17 putenv(char *str) {
18         char *tmp;
19
20         for (tmp = str; *tmp && (*tmp != '='); tmp++)
21                 ;
22
23         return (setenv(str, tmp, 1));
24 }
25 #endif