diff options
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/arc4random.c | 6 | ||||
-rw-r--r-- | lib/libc/gen/closedir.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/daemon.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/exec.c | 6 | ||||
-rw-r--r-- | lib/libc/gen/fstab.c | 12 | ||||
-rw-r--r-- | lib/libc/gen/fts-compat.c | 23 | ||||
-rw-r--r-- | lib/libc/gen/fts.c | 23 | ||||
-rw-r--r-- | lib/libc/gen/getcap.c | 14 | ||||
-rw-r--r-- | lib/libc/gen/getpass.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/lockf.c | 4 | ||||
-rw-r--r-- | lib/libc/gen/nlist.c | 8 | ||||
-rw-r--r-- | lib/libc/gen/opendir.c | 10 | ||||
-rw-r--r-- | lib/libc/gen/pause.c | 3 | ||||
-rw-r--r-- | lib/libc/gen/popen.c | 24 | ||||
-rw-r--r-- | lib/libc/gen/psignal.c | 8 | ||||
-rw-r--r-- | lib/libc/gen/setjmperr.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/sleep.c | 5 | ||||
-rw-r--r-- | lib/libc/gen/syslog.c | 12 | ||||
-rw-r--r-- | lib/libc/gen/termios.c | 6 | ||||
-rw-r--r-- | lib/libc/gen/usleep.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/wait.c | 3 | ||||
-rw-r--r-- | lib/libc/gen/waitpid.c | 3 |
22 files changed, 87 insertions, 95 deletions
diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c index 186efa3702a2f..c0569e519c46f 100644 --- a/lib/libc/gen/arc4random.c +++ b/lib/libc/gen/arc4random.c @@ -84,10 +84,10 @@ arc4_stir(as) gettimeofday(&rdat.tv, NULL); rdat.pid = getpid(); - fd = _libc_open("/dev/urandom", O_RDONLY, 0); + fd = _open("/dev/urandom", O_RDONLY, 0); if (fd >= 0) { - (void) _libc_read(fd, rdat.rnd, sizeof(rdat.rnd)); - _libc_close(fd); + (void) _read(fd, rdat.rnd, sizeof(rdat.rnd)); + _close(fd); } /* fd < 0? Ah, what the heck. We'll just take whatever was on the * stack... */ diff --git a/lib/libc/gen/closedir.c b/lib/libc/gen/closedir.c index 7f658b83d4e87..86de88d203df3 100644 --- a/lib/libc/gen/closedir.c +++ b/lib/libc/gen/closedir.c @@ -60,5 +60,5 @@ closedir(dirp) free((void *)dirp->dd_buf); free((void *)dirp); _reclaim_telldir(dirp); - return(_libc_close(fd)); + return(_close(fd)); } diff --git a/lib/libc/gen/daemon.c b/lib/libc/gen/daemon.c index 0c490e5413bb4..4f6c2f3c69e39 100644 --- a/lib/libc/gen/daemon.c +++ b/lib/libc/gen/daemon.c @@ -62,12 +62,12 @@ daemon(nochdir, noclose) if (!nochdir) (void)chdir("/"); - if (!noclose && (fd = _libc_open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { + if (!noclose && (fd = _open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { (void)dup2(fd, STDIN_FILENO); (void)dup2(fd, STDOUT_FILENO); (void)dup2(fd, STDERR_FILENO); if (fd > 2) - (void)_libc_close(fd); + (void)_close(fd); } return (0); } diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c index 087a2a9f21ff1..04bd2d2a5ad01 100644 --- a/lib/libc/gen/exec.c +++ b/lib/libc/gen/exec.c @@ -249,9 +249,9 @@ execvp(name, argv) * the user may execute the wrong program. */ if (lp + ln + 2 > sizeof(buf)) { - (void)_libc_write(STDERR_FILENO, "execvp: ", 8); - (void)_libc_write(STDERR_FILENO, p, lp); - (void)_libc_write(STDERR_FILENO, ": path too long\n", + (void)_write(STDERR_FILENO, "execvp: ", 8); + (void)_write(STDERR_FILENO, p, lp); + (void)_write(STDERR_FILENO, ": path too long\n", 16); continue; } diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c index 2495c125d26f4..ecd79fb1600da 100644 --- a/lib/libc/gen/fstab.c +++ b/lib/libc/gen/fstab.c @@ -253,12 +253,12 @@ error(err) char *p; char num[30]; - (void)_libc_write(STDERR_FILENO, "fstab: ", 7); - (void)_libc_write(STDERR_FILENO, _PATH_FSTAB, sizeof(_PATH_FSTAB) - 1); - (void)_libc_write(STDERR_FILENO, ":", 1); + (void)_write(STDERR_FILENO, "fstab: ", 7); + (void)_write(STDERR_FILENO, _PATH_FSTAB, sizeof(_PATH_FSTAB) - 1); + (void)_write(STDERR_FILENO, ":", 1); sprintf(num, "%d: ", LineNo); - (void)_libc_write(STDERR_FILENO, num, strlen(num)); + (void)_write(STDERR_FILENO, num, strlen(num)); p = strerror(err); - (void)_libc_write(STDERR_FILENO, p, strlen(p)); - (void)_libc_write(STDERR_FILENO, "\n", 1); + (void)_write(STDERR_FILENO, p, strlen(p)); + (void)_write(STDERR_FILENO, "\n", 1); } diff --git a/lib/libc/gen/fts-compat.c b/lib/libc/gen/fts-compat.c index bcab9d7c69b88..6b92a120676ae 100644 --- a/lib/libc/gen/fts-compat.c +++ b/lib/libc/gen/fts-compat.c @@ -178,8 +178,7 @@ fts_open(argv, options, compar) * and ".." are all fairly nasty problems. Note, if we can't get the * descriptor we run anyway, just more slowly. */ - if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = _libc_open(".", O_RDONLY, 0)) - < 0) + if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = _open(".", O_RDONLY, 0)) < 0) SET(FTS_NOCHDIR); return (sp); @@ -248,7 +247,7 @@ fts_close(sp) /* Return to original directory, save errno if necessary. */ if (!ISSET(FTS_NOCHDIR)) { saved_errno = fchdir(sp->fts_rfd) ? errno : 0; - (void)_libc_close(sp->fts_rfd); + (void)_close(sp->fts_rfd); /* Set errno and return. */ if (saved_errno != 0) { @@ -308,7 +307,7 @@ fts_read(sp) (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { p->fts_info = fts_stat(sp, p, 1); if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { - if ((p->fts_symfd = _libc_open(".", O_RDONLY, 0)) < 0) { + if ((p->fts_symfd = _open(".", O_RDONLY, 0)) < 0) { p->fts_errno = errno; p->fts_info = FTS_ERR; } else @@ -323,7 +322,7 @@ fts_read(sp) if (instr == FTS_SKIP || (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) { if (p->fts_flags & FTS_SYMFOLLOW) - (void)_libc_close(p->fts_symfd); + (void)_close(p->fts_symfd); if (sp->fts_child) { fts_lfree(sp->fts_child); sp->fts_child = NULL; @@ -398,7 +397,7 @@ next: tmp = p; p->fts_info = fts_stat(sp, p, 1); if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { if ((p->fts_symfd = - _libc_open(".", O_RDONLY, 0)) < 0) { + _open(".", O_RDONLY, 0)) < 0) { p->fts_errno = errno; p->fts_info = FTS_ERR; } else @@ -443,12 +442,12 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent); } else if (p->fts_flags & FTS_SYMFOLLOW) { if (FCHDIR(sp, p->fts_symfd)) { saved_errno = errno; - (void)_libc_close(p->fts_symfd); + (void)_close(p->fts_symfd); errno = saved_errno; SET(FTS_STOP); return (NULL); } - (void)_libc_close(p->fts_symfd); + (void)_close(p->fts_symfd); } else if (!(p->fts_flags & FTS_DONTCHDIR)) { if (CHDIR(sp, "..")) { SET(FTS_STOP); @@ -540,12 +539,12 @@ fts_children(sp, instr) ISSET(FTS_NOCHDIR)) return (sp->fts_child = fts_build(sp, instr)); - if ((fd = _libc_open(".", O_RDONLY, 0)) < 0) + if ((fd = _open(".", O_RDONLY, 0)) < 0) return (NULL); sp->fts_child = fts_build(sp, instr); if (fchdir(fd)) return (NULL); - (void)_libc_close(fd); + (void)_close(fd); return (sp->fts_child); } @@ -1094,7 +1093,7 @@ fts_safe_changedir(sp, p, fd) newfd = fd; if (ISSET(FTS_NOCHDIR)) return (0); - if (fd < 0 && (newfd = _libc_open(p->fts_accpath, O_RDONLY, 0)) < 0) + if (fd < 0 && (newfd = _open(p->fts_accpath, O_RDONLY, 0)) < 0) return (-1); if (fstat(newfd, &sb)) { ret = -1; @@ -1109,7 +1108,7 @@ fts_safe_changedir(sp, p, fd) bail: oerrno = errno; if (fd < 0) - (void)_libc_close(newfd); + (void)_close(newfd); errno = oerrno; return (ret); } diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index bcab9d7c69b88..6b92a120676ae 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -178,8 +178,7 @@ fts_open(argv, options, compar) * and ".." are all fairly nasty problems. Note, if we can't get the * descriptor we run anyway, just more slowly. */ - if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = _libc_open(".", O_RDONLY, 0)) - < 0) + if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = _open(".", O_RDONLY, 0)) < 0) SET(FTS_NOCHDIR); return (sp); @@ -248,7 +247,7 @@ fts_close(sp) /* Return to original directory, save errno if necessary. */ if (!ISSET(FTS_NOCHDIR)) { saved_errno = fchdir(sp->fts_rfd) ? errno : 0; - (void)_libc_close(sp->fts_rfd); + (void)_close(sp->fts_rfd); /* Set errno and return. */ if (saved_errno != 0) { @@ -308,7 +307,7 @@ fts_read(sp) (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { p->fts_info = fts_stat(sp, p, 1); if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { - if ((p->fts_symfd = _libc_open(".", O_RDONLY, 0)) < 0) { + if ((p->fts_symfd = _open(".", O_RDONLY, 0)) < 0) { p->fts_errno = errno; p->fts_info = FTS_ERR; } else @@ -323,7 +322,7 @@ fts_read(sp) if (instr == FTS_SKIP || (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) { if (p->fts_flags & FTS_SYMFOLLOW) - (void)_libc_close(p->fts_symfd); + (void)_close(p->fts_symfd); if (sp->fts_child) { fts_lfree(sp->fts_child); sp->fts_child = NULL; @@ -398,7 +397,7 @@ next: tmp = p; p->fts_info = fts_stat(sp, p, 1); if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { if ((p->fts_symfd = - _libc_open(".", O_RDONLY, 0)) < 0) { + _open(".", O_RDONLY, 0)) < 0) { p->fts_errno = errno; p->fts_info = FTS_ERR; } else @@ -443,12 +442,12 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent); } else if (p->fts_flags & FTS_SYMFOLLOW) { if (FCHDIR(sp, p->fts_symfd)) { saved_errno = errno; - (void)_libc_close(p->fts_symfd); + (void)_close(p->fts_symfd); errno = saved_errno; SET(FTS_STOP); return (NULL); } - (void)_libc_close(p->fts_symfd); + (void)_close(p->fts_symfd); } else if (!(p->fts_flags & FTS_DONTCHDIR)) { if (CHDIR(sp, "..")) { SET(FTS_STOP); @@ -540,12 +539,12 @@ fts_children(sp, instr) ISSET(FTS_NOCHDIR)) return (sp->fts_child = fts_build(sp, instr)); - if ((fd = _libc_open(".", O_RDONLY, 0)) < 0) + if ((fd = _open(".", O_RDONLY, 0)) < 0) return (NULL); sp->fts_child = fts_build(sp, instr); if (fchdir(fd)) return (NULL); - (void)_libc_close(fd); + (void)_close(fd); return (sp->fts_child); } @@ -1094,7 +1093,7 @@ fts_safe_changedir(sp, p, fd) newfd = fd; if (ISSET(FTS_NOCHDIR)) return (0); - if (fd < 0 && (newfd = _libc_open(p->fts_accpath, O_RDONLY, 0)) < 0) + if (fd < 0 && (newfd = _open(p->fts_accpath, O_RDONLY, 0)) < 0) return (-1); if (fstat(newfd, &sb)) { ret = -1; @@ -1109,7 +1108,7 @@ fts_safe_changedir(sp, p, fd) bail: oerrno = errno; if (fd < 0) - (void)_libc_close(newfd); + (void)_close(newfd); errno = oerrno; return (ret); } diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c index aaa13725509c7..4e41a7967a39f 100644 --- a/lib/libc/gen/getcap.c +++ b/lib/libc/gen/getcap.c @@ -268,7 +268,7 @@ getent(cap, len, db_array, fd, name, depth, nfield) *cap = cbuf; return (retval); } else { - fd = _libc_open(*db_p, O_RDONLY, 0); + fd = _open(*db_p, O_RDONLY, 0); if (fd < 0) continue; myfd = 1; @@ -303,10 +303,10 @@ getent(cap, len, db_array, fd, name, depth, nfield) if (bp >= b_end) { int n; - n = _libc_read(fd, buf, sizeof(buf)); + n = _read(fd, buf, sizeof(buf)); if (n <= 0) { if (myfd) - (void)_libc_close(fd); + (void)_close(fd); if (n < 0) { free(record); return (-2); @@ -345,7 +345,7 @@ getent(cap, len, db_array, fd, name, depth, nfield) if (record == NULL) { errno = ENOMEM; if (myfd) - (void)_libc_close(fd); + (void)_close(fd); return (-2); } r_end = record + newsize; @@ -435,7 +435,7 @@ tc_exp: { /* an error */ if (iret < -1) { if (myfd) - (void)_libc_close(fd); + (void)_close(fd); free(record); return (iret); } @@ -485,7 +485,7 @@ tc_exp: { if (record == NULL) { errno = ENOMEM; if (myfd) - (void)_libc_close(fd); + (void)_close(fd); free(icap); return (-2); } @@ -517,7 +517,7 @@ tc_exp: { * return capability, length and success. */ if (myfd) - (void)_libc_close(fd); + (void)_close(fd); *len = rp - record - 1; /* don't count NUL */ if (r_end > rp) if ((record = diff --git a/lib/libc/gen/getpass.c b/lib/libc/gen/getpass.c index 727d58a911b77..60e92b73e75ed 100644 --- a/lib/libc/gen/getpass.c +++ b/lib/libc/gen/getpass.c @@ -86,7 +86,7 @@ getpass(prompt) if (p < buf + _PASSWORD_LEN) *p++ = ch; *p = '\0'; - (void)_libc_write(fileno(outfp), "\n", 1); + (void)_write(fileno(outfp), "\n", 1); (void)tcsetattr(fileno(fp), TCSAFLUSH|TCSASOFT, &oterm); (void)sigprocmask(SIG_SETMASK, &oset, NULL); diff --git a/lib/libc/gen/lockf.c b/lib/libc/gen/lockf.c index 4d6874be21f21..15b5b210da872 100644 --- a/lib/libc/gen/lockf.c +++ b/lib/libc/gen/lockf.c @@ -75,7 +75,7 @@ lockf(filedes, function, size) break; case F_TEST: fl.l_type = F_WRLCK; - if (_libc_fcntl(filedes, F_GETLK, &fl) == -1) + if (_fcntl(filedes, F_GETLK, &fl) == -1) return (-1); if (fl.l_type == F_UNLCK || fl.l_pid == getpid()) return (0); @@ -88,5 +88,5 @@ lockf(filedes, function, size) /* NOTREACHED */ } - return (_libc_fcntl(filedes, cmd, &fl)); + return (_fcntl(filedes, cmd, &fl)); } diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index 09e93aa86438f..f45906785c729 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -66,11 +66,11 @@ nlist(name, list) { int fd, n; - fd = _libc_open(name, O_RDONLY, 0); + fd = _open(name, O_RDONLY, 0); if (fd < 0) return (-1); n = __fdnlist(fd, list); - (void)_libc_close(fd); + (void)_close(fd); return (n); } @@ -255,7 +255,7 @@ __elf_fdnlist(fd, list) /* Make sure obj is OK */ if (lseek(fd, (off_t)0, SEEK_SET) == -1 || - _libc_read(fd, &ehdr, sizeof(Elf_Ehdr)) != sizeof(Elf_Ehdr) || + _read(fd, &ehdr, sizeof(Elf_Ehdr)) != sizeof(Elf_Ehdr) || !__elf_is_okay__(&ehdr) || fstat(fd, &st) < 0) return (-1); @@ -339,7 +339,7 @@ __elf_fdnlist(fd, list) while (symsize > 0 && nent > 0) { cc = MIN(symsize, sizeof(sbuf)); - if (_libc_read(fd, sbuf, cc) != cc) + if (_read(fd, sbuf, cc) != cc) break; symsize -= cc; for (s = sbuf; cc > 0 && nent > 0; ++s, cc -= sizeof(*s)) { diff --git a/lib/libc/gen/opendir.c b/lib/libc/gen/opendir.c index 077805dc9925d..d94b9af41837b 100644 --- a/lib/libc/gen/opendir.c +++ b/lib/libc/gen/opendir.c @@ -80,7 +80,7 @@ __opendir2(name, flags) errno = ENOTDIR; return (NULL); } - if ((fd = _libc_open(name, O_RDONLY | O_NONBLOCK)) == -1) + if ((fd = _open(name, O_RDONLY | O_NONBLOCK)) == -1) return (NULL); dirp = NULL; if (fstat(fd, &statb) != 0) @@ -89,7 +89,7 @@ __opendir2(name, flags) errno = ENOTDIR; goto fail; } - if (_libc_fcntl(fd, F_SETFD, FD_CLOEXEC) == -1 || + if (_fcntl(fd, F_SETFD, FD_CLOEXEC) == -1 || (dirp = malloc(sizeof(DIR))) == NULL) goto fail; @@ -163,8 +163,8 @@ __opendir2(name, flags) * which has also been read -- see fts.c. */ if (flags & DTF_REWIND) { - (void)_libc_close(fd); - if ((fd = _libc_open(name, O_RDONLY)) == -1) { + (void)_close(fd); + if ((fd = _open(name, O_RDONLY)) == -1) { saved_errno = errno; free(buf); free(dirp); @@ -270,7 +270,7 @@ __opendir2(name, flags) fail: saved_errno = errno; free(dirp); - (void)_libc_close(fd); + (void)_close(fd); errno = saved_errno; return (NULL); } diff --git a/lib/libc/gen/pause.c b/lib/libc/gen/pause.c index b1e976ea30637..3327c9689406b 100644 --- a/lib/libc/gen/pause.c +++ b/lib/libc/gen/pause.c @@ -49,5 +49,4 @@ __pause() return sigpause(sigblock(0L)); } -__weak_reference(__pause, _libc_pause); -__weak_reference(_libc_pause, pause); +__weak_reference(__pause, pause); diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c index c744efdf9e0f6..7939b8fb1b7cb 100644 --- a/lib/libc/gen/popen.c +++ b/lib/libc/gen/popen.c @@ -85,8 +85,8 @@ popen(command, type) return (NULL); if ((cur = malloc(sizeof(struct pid))) == NULL) { - (void)_libc_close(pdes[0]); - (void)_libc_close(pdes[1]); + (void)_close(pdes[0]); + (void)_close(pdes[1]); return (NULL); } @@ -97,8 +97,8 @@ popen(command, type) switch (pid = vfork()) { case -1: /* Error. */ - (void)_libc_close(pdes[0]); - (void)_libc_close(pdes[1]); + (void)_close(pdes[0]); + (void)_close(pdes[1]); free(cur); return (NULL); /* NOTREACHED */ @@ -112,10 +112,10 @@ popen(command, type) * the compiler is free to corrupt all the local * variables. */ - (void)_libc_close(pdes[0]); + (void)_close(pdes[0]); if (pdes[1] != STDOUT_FILENO) { (void)dup2(pdes[1], STDOUT_FILENO); - (void)_libc_close(pdes[1]); + (void)_close(pdes[1]); if (twoway) (void)dup2(STDOUT_FILENO, STDIN_FILENO); } else if (twoway && (pdes[1] != STDIN_FILENO)) @@ -123,12 +123,12 @@ popen(command, type) } else { if (pdes[0] != STDIN_FILENO) { (void)dup2(pdes[0], STDIN_FILENO); - (void)_libc_close(pdes[0]); + (void)_close(pdes[0]); } - (void)_libc_close(pdes[1]); + (void)_close(pdes[1]); } for (p = pidlist; p; p = p->next) { - (void)_libc_close(fileno(p->fp)); + (void)_close(fileno(p->fp)); } execve(_PATH_BSHELL, argv, environ); _exit(127); @@ -138,10 +138,10 @@ popen(command, type) /* Parent; assume fdopen can't fail. */ if (*type == 'r') { iop = fdopen(pdes[0], type); - (void)_libc_close(pdes[1]); + (void)_close(pdes[1]); } else { iop = fdopen(pdes[1], type); - (void)_libc_close(pdes[0]); + (void)_close(pdes[0]); } /* Link into list of file descriptors. */ @@ -177,7 +177,7 @@ pclose(iop) (void)fclose(iop); do { - pid = _libc_waitpid(cur->pid, &pstat, 0); + pid = _wait4(cur->pid, &pstat, 0, (struct rusage *)0); } while (pid == -1 && errno == EINTR); /* Remove the entry from the linked list. */ diff --git a/lib/libc/gen/psignal.c b/lib/libc/gen/psignal.c index 704a3aedeef4e..7c254767ab18f 100644 --- a/lib/libc/gen/psignal.c +++ b/lib/libc/gen/psignal.c @@ -57,9 +57,9 @@ psignal(sig, s) else c = "Unknown signal"; if (s != NULL && *s != '\0') { - (void)_libc_write(STDERR_FILENO, s, strlen(s)); - (void)_libc_write(STDERR_FILENO, ": ", 2); + (void)_write(STDERR_FILENO, s, strlen(s)); + (void)_write(STDERR_FILENO, ": ", 2); } - (void)_libc_write(STDERR_FILENO, c, strlen(c)); - (void)_libc_write(STDERR_FILENO, "\n", 1); + (void)_write(STDERR_FILENO, c, strlen(c)); + (void)_write(STDERR_FILENO, "\n", 1); } diff --git a/lib/libc/gen/setjmperr.c b/lib/libc/gen/setjmperr.c index e1fa498680e9c..e9b5d45bc4a8b 100644 --- a/lib/libc/gen/setjmperr.c +++ b/lib/libc/gen/setjmperr.c @@ -51,5 +51,5 @@ void longjmperror() { #define ERRMSG "longjmp botch.\n" - (void)_libc_write(STDERR_FILENO, ERRMSG, sizeof(ERRMSG) - 1); + (void)_write(STDERR_FILENO, ERRMSG, sizeof(ERRMSG) - 1); } diff --git a/lib/libc/gen/sleep.c b/lib/libc/gen/sleep.c index 4a35cf04257f5..2508e9a21e0a3 100644 --- a/lib/libc/gen/sleep.c +++ b/lib/libc/gen/sleep.c @@ -60,7 +60,7 @@ __sleep(seconds) time_to_sleep.tv_sec = seconds; time_to_sleep.tv_nsec = 0; - if (_libc_nanosleep(&time_to_sleep, &time_remaining) != -1) + if (_nanosleep(&time_to_sleep, &time_remaining) != -1) return (0); if (errno != EINTR) return (seconds); /* best guess */ @@ -68,5 +68,4 @@ __sleep(seconds) (time_remaining.tv_nsec != 0)); /* round up */ } -__weak_reference(__sleep, _libc_sleep); -__weak_reference(_libc_sleep, sleep); +__weak_reference(__sleep, sleep); diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c index 2a53432737b01..18d00d7dd9390 100644 --- a/lib/libc/gen/syslog.c +++ b/lib/libc/gen/syslog.c @@ -260,7 +260,7 @@ vsyslog(pri, fmt, ap) * is the one from the syslogd failure. */ if (LogStat & LOG_CONS && - (fd = _libc_open(_PATH_CONSOLE, O_WRONLY, 0)) >= 0) { + (fd = _open(_PATH_CONSOLE, O_WRONLY, 0)) >= 0) { struct iovec iov[2]; register struct iovec *v = iov; @@ -271,7 +271,7 @@ vsyslog(pri, fmt, ap) v->iov_base = "\r\n"; v->iov_len = 2; (void)writev(fd, iov, 2); - (void)_libc_close(fd); + (void)_close(fd); } } static void @@ -283,7 +283,7 @@ disconnectlog() * system services. */ if (LogFile != -1) { - _libc_close(LogFile); + _close(LogFile); LogFile = -1; } connected = 0; /* retry connect */ @@ -297,7 +297,7 @@ connectlog() if (LogFile == -1) { if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) return; - (void)_libc_fcntl(LogFile, F_SETFD, 1); + (void)_fcntl(LogFile, F_SETFD, 1); } if (LogFile != -1 && !connected) { SyslogAddr.sun_len = sizeof(SyslogAddr); @@ -320,7 +320,7 @@ connectlog() } if (!connected) { - (void)_libc_close(LogFile); + (void)_close(LogFile); LogFile = -1; } } @@ -346,7 +346,7 @@ openlog(ident, logstat, logfac) void closelog() { - (void)_libc_close(LogFile); + (void)_close(LogFile); LogFile = -1; connected = 0; } diff --git a/lib/libc/gen/termios.c b/lib/libc/gen/termios.c index 70ac8f04f7c74..466827e6106f8 100644 --- a/lib/libc/gen/termios.c +++ b/lib/libc/gen/termios.c @@ -195,8 +195,7 @@ __tcdrain(fd) return (ioctl(fd, TIOCDRAIN, 0)); } -__weak_reference(__tcdrain, _libc_tcdrain); -__weak_reference(_libc_tcdrain, tcdrain); +__weak_reference(__tcdrain, tcdrain); int tcflush(fd, which) @@ -238,8 +237,7 @@ tcflow(fd, action) if (tcgetattr(fd, &term) == -1) return (-1); c = term.c_cc[action == TCIOFF ? VSTOP : VSTART]; - if (c != _POSIX_VDISABLE && _libc_write(fd, &c, sizeof(c)) == - -1) + if (c != _POSIX_VDISABLE && _write(fd, &c, sizeof(c)) == -1) return (-1); return (0); default: diff --git a/lib/libc/gen/usleep.c b/lib/libc/gen/usleep.c index 05b692784f513..651edf98b882a 100644 --- a/lib/libc/gen/usleep.c +++ b/lib/libc/gen/usleep.c @@ -50,5 +50,5 @@ usleep(useconds) time_to_sleep.tv_nsec = (useconds % 1000000) * 1000; time_to_sleep.tv_sec = useconds / 1000000; - return (_libc_nanosleep(&time_to_sleep, NULL)); + return (_nanosleep(&time_to_sleep, NULL)); } diff --git a/lib/libc/gen/wait.c b/lib/libc/gen/wait.c index 21f4d11c4ed98..2f9ca6eb2f5cc 100644 --- a/lib/libc/gen/wait.c +++ b/lib/libc/gen/wait.c @@ -49,5 +49,4 @@ __wait(istat) return (wait4(WAIT_ANY, istat, 0, (struct rusage *)0)); } -__weak_reference(__wait, _libc_wait); -__weak_reference(_libc_wait, wait); +__weak_reference(__wait, wait); diff --git a/lib/libc/gen/waitpid.c b/lib/libc/gen/waitpid.c index 14a5e1a9a4418..3f679a7ebea73 100644 --- a/lib/libc/gen/waitpid.c +++ b/lib/libc/gen/waitpid.c @@ -55,5 +55,4 @@ __waitpid(pid, istat, options) return (wait4(pid, istat, options, (struct rusage *)0)); } -__weak_reference(__waitpid, _libc_waitpid); -__weak_reference(_libc_waitpid, waitpid); +__weak_reference(__waitpid, waitpid); |