summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/svc_tcp.c
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2000-01-27 23:07:25 +0000
committerjasone <jasone@FreeBSD.org>2000-01-27 23:07:25 +0000
commit8abe2a2d86ee5f72093b3feeabf05c9f6f963576 (patch)
tree2ebe01199c17764ebcd26435b5ce1c06ebb67ad5 /lib/libc/rpc/svc_tcp.c
parent1731b249ccd9d7586d511eda8756f5c6b57b871c (diff)
downloadFreeBSD-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/rpc/svc_tcp.c')
-rw-r--r--lib/libc/rpc/svc_tcp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c
index da34518..3e14010 100644
--- a/lib/libc/rpc/svc_tcp.c
+++ b/lib/libc/rpc/svc_tcp.c
@@ -145,7 +145,7 @@ svctcp_create(sock, sendsize, recvsize)
if (ioctl(sock, FIONBIO, &on) < 0) {
perror("svc_tcp.c - cannot turn on non-blocking mode");
if (madesock)
- (void)_libc_close(sock);
+ (void)_close(sock);
return ((SVCXPRT *)NULL);
}
memset(&addr, 0, sizeof (addr));
@@ -159,7 +159,7 @@ svctcp_create(sock, sendsize, recvsize)
(listen(sock, 2) != 0)) {
perror("svctcp_.c - cannot getsockname or listen");
if (madesock)
- (void)_libc_close(sock);
+ (void)_close(sock);
return ((SVCXPRT *)NULL);
}
r = (struct tcp_rendezvous *)mem_alloc(sizeof(*r));
@@ -257,7 +257,7 @@ rendezvous_request(xprt)
* Guard against FTP bounce attacks.
*/
if (addr.sin_port == htons(20)) {
- _libc_close(sock);
+ _close(sock);
return (FALSE);
}
/*
@@ -265,7 +265,7 @@ rendezvous_request(xprt)
*/
off = 0;
if (ioctl(sock, FIONBIO, &off) < 0) {
- _libc_close(sock);
+ _close(sock);
return (FALSE);
}
/*
@@ -291,7 +291,7 @@ svctcp_destroy(xprt)
register struct tcp_conn *cd = (struct tcp_conn *)xprt->xp_p1;
xprt_unregister(xprt);
- (void)_libc_close(xprt->xp_sock);
+ (void)_close(xprt->xp_sock);
if (xprt->xp_port != 0) {
/* a rendezvouser socket */
xprt->xp_port = 0;
@@ -376,7 +376,7 @@ readtcp(xprt, buf, len)
}
}
} while (!FD_ISSET(sock, fds));
- if ((len = _libc_read(sock, buf, len)) > 0) {
+ if ((len = _read(sock, buf, len)) > 0) {
if (fds != NULL)
free(fds);
return (len);
@@ -401,7 +401,7 @@ writetcp(xprt, buf, len)
register int i, cnt;
for (cnt = len; cnt > 0; cnt -= i, buf += i) {
- if ((i = _libc_write(xprt->xp_sock, buf, cnt)) < 0) {
+ if ((i = _write(xprt->xp_sock, buf, cnt)) < 0) {
((struct tcp_conn *)(xprt->xp_p1))->strm_stat =
XPRT_DIED;
return (-1);
OpenPOWER on IntegriCloud