From 9233c4d9426e03b28e043baeefb6d5a37dc4086e Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Thu, 27 Jan 2000 23:07:25 +0000 Subject: Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(), just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen --- lib/libc/stdlib/malloc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/libc/stdlib/malloc.c') 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)); } /* -- cgit v1.2.3