diff options
| author | Jason Evans <jasone@FreeBSD.org> | 2000-01-27 23:07:25 +0000 | 
|---|---|---|
| committer | Jason Evans <jasone@FreeBSD.org> | 2000-01-27 23:07:25 +0000 | 
| commit | 9233c4d9426e03b28e043baeefb6d5a37dc4086e (patch) | |
| tree | 8606358bf2ae9c436cce380d290e7a73f9cddfc6 /lib/libc/stdlib | |
| parent | 072229cdbb757229b7e11f102da326679db27d0e (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/malloc.c | 18 | ||||
| -rw-r--r-- | lib/libc/stdlib/random.c | 6 | ||||
| -rw-r--r-- | lib/libc/stdlib/realpath.c | 6 | ||||
| -rw-r--r-- | lib/libc/stdlib/system.c | 5 | 
4 files changed, 17 insertions, 18 deletions
| diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index bf417908bfd8..ac0dd485093c 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -72,7 +72,7 @@      static int fdzero;  #   define MMAP_FD	fdzero  #   define INIT_MMAP() \ -	{ if ((fdzero = _libc_open("/dev/zero", O_RDWR, 0000)) == -1) \ +	{ if ((fdzero = _open("/dev/zero", O_RDWR, 0000)) == -1) \  	    wrterror("open of /dev/zero"); }  #   define MADV_FREE			MADV_DONTNEED  #endif /* __sparc__ */ @@ -275,10 +275,10 @@ static void  wrterror(char *p)  {      char *q = " error: "; -    _libc_write(STDERR_FILENO, __progname, strlen(__progname)); -    _libc_write(STDERR_FILENO, malloc_func, strlen(malloc_func)); -    _libc_write(STDERR_FILENO, q, strlen(q)); -    _libc_write(STDERR_FILENO, p, strlen(p)); +    _write(STDERR_FILENO, __progname, strlen(__progname)); +    _write(STDERR_FILENO, malloc_func, strlen(malloc_func)); +    _write(STDERR_FILENO, q, strlen(q)); +    _write(STDERR_FILENO, p, strlen(p));      suicide = 1;      abort();  } @@ -289,10 +289,10 @@ wrtwarning(char *p)      char *q = " warning: ";      if (malloc_abort)  	wrterror(p); -    _libc_write(STDERR_FILENO, __progname, strlen(__progname)); -    _libc_write(STDERR_FILENO, malloc_func, strlen(malloc_func)); -    _libc_write(STDERR_FILENO, q, strlen(q)); -    _libc_write(STDERR_FILENO, p, strlen(p)); +    _write(STDERR_FILENO, __progname, strlen(__progname)); +    _write(STDERR_FILENO, malloc_func, strlen(malloc_func)); +    _write(STDERR_FILENO, q, strlen(q)); +    _write(STDERR_FILENO, p, strlen(p));  }  /* diff --git a/lib/libc/stdlib/random.c b/lib/libc/stdlib/random.c index 172958909091..e8e82544d99c 100644 --- a/lib/libc/stdlib/random.c +++ b/lib/libc/stdlib/random.c @@ -298,11 +298,11 @@ srandomdev()  		len = rand_deg * sizeof state[0];  	done = 0; -	fd = _libc_open("/dev/urandom", O_RDONLY, 0); +	fd = _open("/dev/urandom", O_RDONLY, 0);  	if (fd >= 0) { -		if (_libc_read(fd, (void *) state, len) == (ssize_t) len) +		if (_read(fd, (void *) state, len) == (ssize_t) len)  			done = 1; -		_libc_close(fd); +		_close(fd);  	}  	if (!done) { diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c index b9565134f421..0217dde5f6a6 100644 --- a/lib/libc/stdlib/realpath.c +++ b/lib/libc/stdlib/realpath.c @@ -67,7 +67,7 @@ realpath(path, resolved)  	int symlinks = 0;  	/* Save the starting point. */ -	if ((fd = _libc_open(".", O_RDONLY)) < 0) { +	if ((fd = _open(".", O_RDONLY)) < 0) {  		(void)strcpy(resolved, ".");  		return (NULL);  	} @@ -154,12 +154,12 @@ loop:  	}  	/* It's okay if the close fails, what's an fd more or less? */ -	(void)_libc_close(fd); +	(void)_close(fd);  	return (resolved);  err1:	serrno = errno;  	(void)fchdir(fd); -err2:	(void)_libc_close(fd); +err2:	(void)_close(fd);  	errno = serrno;  	return (NULL);  } diff --git a/lib/libc/stdlib/system.c b/lib/libc/stdlib/system.c index 0039c078216c..236a8b0cc2ee 100644 --- a/lib/libc/stdlib/system.c +++ b/lib/libc/stdlib/system.c @@ -84,7 +84,7 @@ __system(command)  		_exit(127);  	default:			/* parent */  		do { -			pid = _libc_waitpid(pid, &pstat, 0); +			pid = _wait4(pid, &pstat, 0, (struct rusage *)0);  		} while (pid == -1 && errno == EINTR);  		break;  	} @@ -94,5 +94,4 @@ __system(command)  	return(pid == -1 ? -1 : pstat);  } -__weak_reference(__system, _libc_system); -__weak_reference(_libc_system, system); +__weak_reference(__system, system); | 
