File: putenv.c

package info (click to toggle)
bind 1%3A8.1.2-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 5,072 kB
  • ctags: 7,956
  • sloc: ansic: 54,480; sh: 6,937; makefile: 2,900; yacc: 1,223; perl: 315; lex: 221; awk: 45; sed: 15
file content (25 lines) | stat: -rw-r--r-- 421 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef LINT
static char rcsid[] = "$Id: putenv.c,v 8.3 1996/11/18 09:09:00 vixie Exp $";
#endif

#include "port_before.h"
#include "port_after.h"

/*
 * To give a little credit to Sun, SGI,
 * and many vendors in the SysV world.
 */

#if !defined(NEED_PUTENV)
int __bindcompat_putenv;
#else
int
putenv(char *str) {
	char *tmp;

	for (tmp = str; *tmp && (*tmp != '='); tmp++)
		;

	return (setenv(str, tmp, 1));
}
#endif