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/nls | |
parent | 072229cdbb757229b7e11f102da326679db27d0e (diff) | |
download | src-9233c4d9426e03b28e043baeefb6d5a37dc4086e.tar.gz src-9233c4d9426e03b28e043baeefb6d5a37dc4086e.zip |
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
Notes
Notes:
svn path=/head/; revision=56698
Diffstat (limited to 'lib/libc/nls')
-rw-r--r-- | lib/libc/nls/msgcat.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c index bdb089a40519..f1355df0be47 100644 --- a/lib/libc/nls/msgcat.c +++ b/lib/libc/nls/msgcat.c @@ -285,7 +285,7 @@ nl_catd catd; return -1; } - if (cat->loadType != MCLoadAll) _libc_close(cat->fd); + if (cat->loadType != MCLoadAll) _close(cat->fd); for (i = 0; i < cat->numSets; ++i) { set = cat->sets + i; if (!set->invalid) { @@ -321,14 +321,14 @@ __const char *catpath; if (!cat) return(NLERR); cat->loadType = MCLoadBySet; - if ((cat->fd = _libc_open(catpath, O_RDONLY)) < 0) { + if ((cat->fd = _open(catpath, O_RDONLY)) < 0) { free(cat); return(NLERR); } - (void)_libc_fcntl(cat->fd, F_SETFD, FD_CLOEXEC); + (void)_fcntl(cat->fd, F_SETFD, FD_CLOEXEC); - if (_libc_read(cat->fd, &header, sizeof(header)) != sizeof(header)) + if (_read(cat->fd, &header, sizeof(header)) != sizeof(header)) CORRUPT(); if (strncmp(header.magic, MCMagic, MCMagicLen) != 0) CORRUPT(); @@ -369,7 +369,7 @@ __const char *catpath; /* read in the set header */ set = cat->sets + i; - if (_libc_read(cat->fd, set, sizeof(*set)) != sizeof(*set)) { + if (_read(cat->fd, set, sizeof(*set)) != sizeof(*set)) { for (j = 0; j < i; j++) { set = cat->sets + j; if (!set->invalid) { @@ -408,7 +408,7 @@ __const char *catpath; nextSet = set->nextSet; } if (cat->loadType == MCLoadAll) { - _libc_close(cat->fd); + _close(cat->fd); cat->fd = -1; } return((nl_catd) cat); @@ -424,7 +424,7 @@ MCSetT *set; /* Get the data */ if (lseek(cat->fd, set->data.off, 0) == -1) return(0); if ((set->data.str = malloc(set->dataLen)) == NULL) return(-1); - if (_libc_read(cat->fd, set->data.str, set->dataLen) != set->dataLen) { + if (_read(cat->fd, set->data.str, set->dataLen) != set->dataLen) { free(set->data.str); return(0); } @@ -438,7 +438,7 @@ MCSetT *set; for (i = 0; i < set->numMsgs; ++i) { msg = set->u.msgs + i; - if (_libc_read(cat->fd, msg, sizeof(*msg)) != sizeof(*msg)) { + if (_read(cat->fd, msg, sizeof(*msg)) != sizeof(*msg)) { free(set->u.msgs); free(set->data.str); return(0); } if (msg->invalid) { |