diff options
author | jasone <jasone@FreeBSD.org> | 2000-01-27 23:07:25 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2000-01-27 23:07:25 +0000 |
commit | 8abe2a2d86ee5f72093b3feeabf05c9f6f963576 (patch) | |
tree | 2ebe01199c17764ebcd26435b5ce1c06ebb67ad5 /lib/libc/db/hash/hash.c | |
parent | 1731b249ccd9d7586d511eda8756f5c6b57b871c (diff) | |
download | FreeBSD-src-8abe2a2d86ee5f72093b3feeabf05c9f6f963576.zip FreeBSD-src-8abe2a2d86ee5f72093b3feeabf05c9f6f963576.tar.gz |
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
Diffstat (limited to 'lib/libc/db/hash/hash.c')
-rw-r--r-- | lib/libc/db/hash/hash.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c index 0a2f3c6..dcef5df 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -130,7 +130,7 @@ __hash_open(file, flags, mode, info, dflags) new_table = 1; } if (file) { - if ((hashp->fp = _libc_open(file, flags, mode)) == -1) + if ((hashp->fp = _open(file, flags, mode)) == -1) RETURN_ERROR(errno, error0); /* if the .db file is empty, and we had permission to create @@ -139,7 +139,7 @@ __hash_open(file, flags, mode, info, dflags) fstat(hashp->fp, &statbuf) == 0 && statbuf.st_size == 0) new_table = 1; - (void)_libc_fcntl(hashp->fp, F_SETFD, 1); + (void)_fcntl(hashp->fp, F_SETFD, 1); } if (new_table) { if (!(hashp = init_hash(hashp, file, (HASHINFO *)info))) @@ -151,7 +151,7 @@ __hash_open(file, flags, mode, info, dflags) else hashp->hash = __default_hash; - hdrsize = _libc_read(hashp->fp, &hashp->hdr, sizeof(HASHHDR)); + hdrsize = _read(hashp->fp, &hashp->hdr, sizeof(HASHHDR)); #if BYTE_ORDER == LITTLE_ENDIAN swap_header(hashp); #endif @@ -242,7 +242,7 @@ __hash_open(file, flags, mode, info, dflags) error1: if (hashp != NULL) - (void)_libc_close(hashp->fp); + (void)_close(hashp->fp); error0: free(hashp); @@ -440,7 +440,7 @@ hdestroy(hashp) free(hashp->mapp[i]); if (hashp->fp != -1) - (void)_libc_close(hashp->fp); + (void)_close(hashp->fp); free(hashp); @@ -509,7 +509,7 @@ flush_meta(hashp) swap_header_copy(&hashp->hdr, whdrp); #endif if ((lseek(fp, (off_t)0, SEEK_SET) == -1) || - ((wsize = _libc_write(fp, whdrp, sizeof(HASHHDR))) == -1)) + ((wsize = _write(fp, whdrp, sizeof(HASHHDR))) == -1)) return (-1); else if (wsize != sizeof(HASHHDR)) { |