Index: c/src/exec/librpc/ChangeLog
===================================================================
--- c/src/exec/librpc/ChangeLog	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/ChangeLog	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -1,2 +1,16 @@
+2000-10-30	Joel Sherrill <joel@OARcorp.com>
+
+	* POSIX include files merged into newlib.  This resulted in
+	some definitions moving to other files and thus some secondary
+	effects in RTEMS source code.
+	* src/rpc/Makefile.am, src/rpc/auth_time.c, src/rpc/clnt_simple.c,
+	src/rpc/clnt_tcp.c, src/rpc/clnt_udp.c, src/rpc/clnt_unix.c,
+	src/rpc/get_myaddress.c, src/rpc/pmap_clnt.c, src/rpc/pmap_getmaps.c,
+	src/rpc/pmap_getport.c, src/rpc/pmap_rmt.c, src/rpc/rtime.c,
+	src/rpc/svc_tcp.c, src/rpc/svc_udp.c, src/rpc/svc_unix.c:
+	Use of _read, _write, and _close as macros conflicted with
+	newlib's use of these as routine names.  They were renamed to
+	include "_RPC_" prefix.
+
 2000-10-25      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
 
Index: c/src/exec/librpc/src/rpc/Makefile.am
===================================================================
--- c/src/exec/librpc/src/rpc/Makefile.am	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/Makefile.am	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -35,5 +35,5 @@
 #
 
-AM_CPPFLAGS += '-D__P(x)=x' -D_read=read -D_write=write -D_close=close -D_RTEMS_RPC_INTERNAL_
+AM_CPPFLAGS += '-D__P(x)=x' -D_RPC_read=read -D_RPC_write=write -D_RPC_close=close -D_RTEMS_RPC_INTERNAL_
 
 $(LIB): $(OBJS)
Index: c/src/exec/librpc/src/rpc/auth_time.c
===================================================================
--- c/src/exec/librpc/src/rpc/auth_time.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/auth_time.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -438,5 +438,5 @@
 				goto error;
 			}
-			res = _read(s, (char *)&thetime, sizeof(thetime));
+			res = _RPC_read(s, (char *)&thetime, sizeof(thetime));
 			if (res != sizeof(thetime)) {
 				if (saw_alarm)
@@ -450,5 +450,5 @@
 		}
 		save = errno;
-		(void)_close(s);
+		(void)_RPC_close(s);
 		errno = save;
 		s = RPC_ANYSOCK;
@@ -469,5 +469,5 @@
 
 	if (s != RPC_ANYSOCK)
-		(void)_close(s);
+		(void)_RPC_close(s);
 
 	if (clnt != NULL)
Index: c/src/exec/librpc/src/rpc/clnt_simple.c
===================================================================
--- c/src/exec/librpc/src/rpc/clnt_simple.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/clnt_simple.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -88,5 +88,5 @@
 		crp->valid = 0;
 		if (crp->socket != -1)
-			(void)_close(crp->socket);
+			(void)_RPC_close(crp->socket);
 		crp->socket = RPC_ANYSOCK;
 		if (crp->client) {
Index: c/src/exec/librpc/src/rpc/clnt_tcp.c
===================================================================
--- c/src/exec/librpc/src/rpc/clnt_tcp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/clnt_tcp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -168,5 +168,5 @@
 			rpc_createerr.cf_error.re_errno = errno;
 			if (*sockp != -1)
-				(void)_close(*sockp);
+				(void)_RPC_close(*sockp);
 			goto fooy;
 		}
@@ -201,5 +201,5 @@
 	if (! xdr_callhdr(&(ct->ct_xdrs), &call_msg)) {
 		if (ct->ct_closeit) {
-			(void)_close(*sockp);
+			(void)_RPC_close(*sockp);
 		}
 		goto fooy;
@@ -475,5 +475,5 @@
 
 	if (ct->ct_closeit) {
-		(void)_close(ct->ct_sock);
+		(void)_RPC_close(ct->ct_sock);
 	}
 	XDR_DESTROY(&(ct->ct_xdrs));
@@ -545,5 +545,5 @@
 		break;
 	}
-	switch (len = _read(ct->ct_sock, buf, len)) {
+	switch (len = _RPC_read(ct->ct_sock, buf, len)) {
 
 	case 0:
@@ -571,5 +571,5 @@
 
 	for (cnt = len; cnt > 0; cnt -= i, buf += i) {
-		if ((i = _write(ct->ct_sock, buf, cnt)) == -1) {
+		if ((i = _RPC_write(ct->ct_sock, buf, cnt)) == -1) {
 			ct->ct_error.re_errno = errno;
 			ct->ct_error.re_status = RPC_CANTSEND;
Index: c/src/exec/librpc/src/rpc/clnt_udp.c
===================================================================
--- c/src/exec/librpc/src/rpc/clnt_udp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/clnt_udp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -560,5 +560,5 @@
 
 	if (cu->cu_closeit) {
-		(void)_close(cu->cu_sock);
+		(void)_RPC_close(cu->cu_sock);
 	}
 	XDR_DESTROY(&(cu->cu_outxdrs));
Index: c/src/exec/librpc/src/rpc/clnt_unix.c
===================================================================
--- c/src/exec/librpc/src/rpc/clnt_unix.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/clnt_unix.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -159,5 +159,5 @@
 			rpc_createerr.cf_error.re_errno = errno;
 			if (*sockp != -1)
-				(void)_close(*sockp);
+				(void)_RPC_close(*sockp);
 			goto fooy;
 		}
@@ -192,5 +192,5 @@
 	if (! xdr_callhdr(&(ct->ct_xdrs), &call_msg)) {
 		if (ct->ct_closeit) {
-			(void)_close(*sockp);
+			(void)_RPC_close(*sockp);
 		}
 		goto fooy;
@@ -466,5 +466,5 @@
 
 	if (ct->ct_closeit) {
-		(void)_close(ct->ct_sock);
+		(void)_RPC_close(ct->ct_sock);
 	}
 	XDR_DESTROY(&(ct->ct_xdrs));
Index: c/src/exec/librpc/src/rpc/get_myaddress.c
===================================================================
--- c/src/exec/librpc/src/rpc/get_myaddress.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/get_myaddress.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -74,5 +74,5 @@
 	ifc.ifc_buf = buf;
 	if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0) {
-		_close(s);
+		_RPC_close(s);
 		return(-1);
 	}
@@ -84,5 +84,5 @@
 		ifreq = *ifr;
 		if (ioctl(s, SIOCGIFFLAGS, (char *)&ifreq) < 0) {
-			_close(s);
+			_RPC_close(s);
 			return(-1);
 		}
@@ -108,5 +108,5 @@
 		goto again;
 	}
-	(void)_close(s);
+	(void)_RPC_close(s);
 	return (gotit ? 0 : -1);
 }
Index: c/src/exec/librpc/src/rpc/pmap_clnt.c
===================================================================
--- c/src/exec/librpc/src/rpc/pmap_clnt.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/pmap_clnt.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -103,5 +103,5 @@
 	CLNT_DESTROY(client);
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	return (rslt);
 }
@@ -145,5 +145,5 @@
 	CLNT_DESTROY(client);
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	return (rslt);
 }
Index: c/src/exec/librpc/src/rpc/pmap_getmaps.c
===================================================================
--- c/src/exec/librpc/src/rpc/pmap_getmaps.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/pmap_getmaps.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -81,5 +81,5 @@
 	}
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	address->sin_port = 0;
 	return (head);
Index: c/src/exec/librpc/src/rpc/pmap_getport.c
===================================================================
--- c/src/exec/librpc/src/rpc/pmap_getport.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/pmap_getport.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -86,5 +86,5 @@
 	}
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	address->sin_port = 0;
 	return (port);
Index: c/src/exec/librpc/src/rpc/pmap_rmt.c
===================================================================
--- c/src/exec/librpc/src/rpc/pmap_rmt.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/pmap_rmt.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -99,5 +99,5 @@
 	}
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	addr->sin_port = 0;
 	return (stat);
@@ -409,5 +409,5 @@
 		free(fds);
 	if (sock >= 0)
-		(void)_close(sock);
+		(void)_RPC_close(sock);
 	AUTH_DESTROY(unix_auth);
 	return (stat);
Index: c/src/exec/librpc/src/rpc/rtime.c
===================================================================
--- c/src/exec/librpc/src/rpc/rtime.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/rtime.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -130,5 +130,5 @@
 			return(-1);
 		}
-		res = _read(s, (char *)&thetime, sizeof(thetime));
+		res = _RPC_read(s, (char *)&thetime, sizeof(thetime));
 		do_close(s);
 		if (res < 0) {
@@ -153,5 +153,5 @@
 
 	save = errno;
-	(void)_close(s);
+	(void)_RPC_close(s);
 	errno = save;
 }
Index: c/src/exec/librpc/src/rpc/svc_tcp.c
===================================================================
--- c/src/exec/librpc/src/rpc/svc_tcp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/svc_tcp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -146,5 +146,5 @@
 		perror("svc_tcp.c - cannot turn on non-blocking mode");
 		if (madesock)
-		       (void)_close(sock);
+		       (void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -160,5 +160,5 @@
 		perror("svctcp_.c - cannot getsockname or listen");
 		if (madesock)
-		       (void)_close(sock);
+		       (void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -258,5 +258,5 @@
 	 */
 	if (addr.sin_port == htons(20)) {
-		_close(sock);
+		_RPC_close(sock);
 		return (FALSE);
 	}
@@ -266,5 +266,5 @@
 	off = 0;
 	if (ioctl(sock, FIONBIO, &off) < 0) {
-		_close(sock);
+		_RPC_close(sock);
 		return (FALSE);
 	}
@@ -292,5 +292,5 @@
 
 	xprt_unregister(xprt);
-	(void)_close(xprt->xp_sock);
+	(void)_RPC_close(xprt->xp_sock);
 	if (xprt->xp_port != 0) {
 		/* a rendezvouser socket */
@@ -374,5 +374,5 @@
 		}
 	} while (!FD_ISSET(sock, fds));
-	if ((len = _read(sock, buf, len)) > 0) {
+	if ((len = _RPC_read(sock, buf, len)) > 0) {
 		if (fds != NULL)
 			free(fds);
@@ -399,5 +399,5 @@
 
 	for (cnt = len; cnt > 0; cnt -= i, buf += i) {
-		if ((i = _write(xprt->xp_sock, buf, cnt)) < 0) {
+		if ((i = _RPC_write(xprt->xp_sock, buf, cnt)) < 0) {
 			((struct tcp_conn *)(xprt->xp_p1))->strm_stat =
 			    XPRT_DIED;
Index: c/src/exec/librpc/src/rpc/svc_udp.c
===================================================================
--- c/src/exec/librpc/src/rpc/svc_udp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/svc_udp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -124,5 +124,5 @@
 		perror("svcudp_create - cannot getsockname");
 		if (madesock)
-			(void)_close(sock);
+			(void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -260,5 +260,5 @@
 
 	xprt_unregister(xprt);
-	(void)_close(xprt->xp_sock);
+	(void)_RPC_close(xprt->xp_sock);
 	XDR_DESTROY(&(su->su_xdrs));
 	mem_free(rpc_buffer(xprt), su->su_iosz);
Index: c/src/exec/librpc/src/rpc/svc_unix.c
===================================================================
--- c/src/exec/librpc/src/rpc/svc_unix.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/exec/librpc/src/rpc/svc_unix.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -214,5 +214,5 @@
 		perror("svc_unix.c - cannot getsockname or listen");
 		if (madesock)
-		       (void)_close(sock);
+		       (void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -334,5 +334,5 @@
 
 	xprt_unregister(xprt);
-	(void)_close(xprt->xp_sock);
+	(void)_RPC_close(xprt->xp_sock);
 	if (xprt->xp_port != 0) {
 		/* a rendezvouser socket */
Index: c/src/librpc/ChangeLog
===================================================================
--- c/src/librpc/ChangeLog	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/ChangeLog	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -1,2 +1,16 @@
+2000-10-30	Joel Sherrill <joel@OARcorp.com>
+
+	* POSIX include files merged into newlib.  This resulted in
+	some definitions moving to other files and thus some secondary
+	effects in RTEMS source code.
+	* src/rpc/Makefile.am, src/rpc/auth_time.c, src/rpc/clnt_simple.c,
+	src/rpc/clnt_tcp.c, src/rpc/clnt_udp.c, src/rpc/clnt_unix.c,
+	src/rpc/get_myaddress.c, src/rpc/pmap_clnt.c, src/rpc/pmap_getmaps.c,
+	src/rpc/pmap_getport.c, src/rpc/pmap_rmt.c, src/rpc/rtime.c,
+	src/rpc/svc_tcp.c, src/rpc/svc_udp.c, src/rpc/svc_unix.c:
+	Use of _read, _write, and _close as macros conflicted with
+	newlib's use of these as routine names.  They were renamed to
+	include "_RPC_" prefix.
+
 2000-10-25      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
 
Index: c/src/librpc/src/rpc/Makefile.am
===================================================================
--- c/src/librpc/src/rpc/Makefile.am	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/Makefile.am	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -35,5 +35,5 @@
 #
 
-AM_CPPFLAGS += '-D__P(x)=x' -D_read=read -D_write=write -D_close=close -D_RTEMS_RPC_INTERNAL_
+AM_CPPFLAGS += '-D__P(x)=x' -D_RPC_read=read -D_RPC_write=write -D_RPC_close=close -D_RTEMS_RPC_INTERNAL_
 
 $(LIB): $(OBJS)
Index: c/src/librpc/src/rpc/auth_time.c
===================================================================
--- c/src/librpc/src/rpc/auth_time.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/auth_time.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -438,5 +438,5 @@
 				goto error;
 			}
-			res = _read(s, (char *)&thetime, sizeof(thetime));
+			res = _RPC_read(s, (char *)&thetime, sizeof(thetime));
 			if (res != sizeof(thetime)) {
 				if (saw_alarm)
@@ -450,5 +450,5 @@
 		}
 		save = errno;
-		(void)_close(s);
+		(void)_RPC_close(s);
 		errno = save;
 		s = RPC_ANYSOCK;
@@ -469,5 +469,5 @@
 
 	if (s != RPC_ANYSOCK)
-		(void)_close(s);
+		(void)_RPC_close(s);
 
 	if (clnt != NULL)
Index: c/src/librpc/src/rpc/clnt_simple.c
===================================================================
--- c/src/librpc/src/rpc/clnt_simple.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/clnt_simple.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -88,5 +88,5 @@
 		crp->valid = 0;
 		if (crp->socket != -1)
-			(void)_close(crp->socket);
+			(void)_RPC_close(crp->socket);
 		crp->socket = RPC_ANYSOCK;
 		if (crp->client) {
Index: c/src/librpc/src/rpc/clnt_tcp.c
===================================================================
--- c/src/librpc/src/rpc/clnt_tcp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/clnt_tcp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -168,5 +168,5 @@
 			rpc_createerr.cf_error.re_errno = errno;
 			if (*sockp != -1)
-				(void)_close(*sockp);
+				(void)_RPC_close(*sockp);
 			goto fooy;
 		}
@@ -201,5 +201,5 @@
 	if (! xdr_callhdr(&(ct->ct_xdrs), &call_msg)) {
 		if (ct->ct_closeit) {
-			(void)_close(*sockp);
+			(void)_RPC_close(*sockp);
 		}
 		goto fooy;
@@ -475,5 +475,5 @@
 
 	if (ct->ct_closeit) {
-		(void)_close(ct->ct_sock);
+		(void)_RPC_close(ct->ct_sock);
 	}
 	XDR_DESTROY(&(ct->ct_xdrs));
@@ -545,5 +545,5 @@
 		break;
 	}
-	switch (len = _read(ct->ct_sock, buf, len)) {
+	switch (len = _RPC_read(ct->ct_sock, buf, len)) {
 
 	case 0:
@@ -571,5 +571,5 @@
 
 	for (cnt = len; cnt > 0; cnt -= i, buf += i) {
-		if ((i = _write(ct->ct_sock, buf, cnt)) == -1) {
+		if ((i = _RPC_write(ct->ct_sock, buf, cnt)) == -1) {
 			ct->ct_error.re_errno = errno;
 			ct->ct_error.re_status = RPC_CANTSEND;
Index: c/src/librpc/src/rpc/clnt_udp.c
===================================================================
--- c/src/librpc/src/rpc/clnt_udp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/clnt_udp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -560,5 +560,5 @@
 
 	if (cu->cu_closeit) {
-		(void)_close(cu->cu_sock);
+		(void)_RPC_close(cu->cu_sock);
 	}
 	XDR_DESTROY(&(cu->cu_outxdrs));
Index: c/src/librpc/src/rpc/clnt_unix.c
===================================================================
--- c/src/librpc/src/rpc/clnt_unix.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/clnt_unix.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -159,5 +159,5 @@
 			rpc_createerr.cf_error.re_errno = errno;
 			if (*sockp != -1)
-				(void)_close(*sockp);
+				(void)_RPC_close(*sockp);
 			goto fooy;
 		}
@@ -192,5 +192,5 @@
 	if (! xdr_callhdr(&(ct->ct_xdrs), &call_msg)) {
 		if (ct->ct_closeit) {
-			(void)_close(*sockp);
+			(void)_RPC_close(*sockp);
 		}
 		goto fooy;
@@ -466,5 +466,5 @@
 
 	if (ct->ct_closeit) {
-		(void)_close(ct->ct_sock);
+		(void)_RPC_close(ct->ct_sock);
 	}
 	XDR_DESTROY(&(ct->ct_xdrs));
Index: c/src/librpc/src/rpc/get_myaddress.c
===================================================================
--- c/src/librpc/src/rpc/get_myaddress.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/get_myaddress.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -74,5 +74,5 @@
 	ifc.ifc_buf = buf;
 	if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0) {
-		_close(s);
+		_RPC_close(s);
 		return(-1);
 	}
@@ -84,5 +84,5 @@
 		ifreq = *ifr;
 		if (ioctl(s, SIOCGIFFLAGS, (char *)&ifreq) < 0) {
-			_close(s);
+			_RPC_close(s);
 			return(-1);
 		}
@@ -108,5 +108,5 @@
 		goto again;
 	}
-	(void)_close(s);
+	(void)_RPC_close(s);
 	return (gotit ? 0 : -1);
 }
Index: c/src/librpc/src/rpc/pmap_clnt.c
===================================================================
--- c/src/librpc/src/rpc/pmap_clnt.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/pmap_clnt.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -103,5 +103,5 @@
 	CLNT_DESTROY(client);
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	return (rslt);
 }
@@ -145,5 +145,5 @@
 	CLNT_DESTROY(client);
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	return (rslt);
 }
Index: c/src/librpc/src/rpc/pmap_getmaps.c
===================================================================
--- c/src/librpc/src/rpc/pmap_getmaps.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/pmap_getmaps.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -81,5 +81,5 @@
 	}
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	address->sin_port = 0;
 	return (head);
Index: c/src/librpc/src/rpc/pmap_getport.c
===================================================================
--- c/src/librpc/src/rpc/pmap_getport.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/pmap_getport.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -86,5 +86,5 @@
 	}
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	address->sin_port = 0;
 	return (port);
Index: c/src/librpc/src/rpc/pmap_rmt.c
===================================================================
--- c/src/librpc/src/rpc/pmap_rmt.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/pmap_rmt.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -99,5 +99,5 @@
 	}
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	addr->sin_port = 0;
 	return (stat);
@@ -409,5 +409,5 @@
 		free(fds);
 	if (sock >= 0)
-		(void)_close(sock);
+		(void)_RPC_close(sock);
 	AUTH_DESTROY(unix_auth);
 	return (stat);
Index: c/src/librpc/src/rpc/rtime.c
===================================================================
--- c/src/librpc/src/rpc/rtime.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/rtime.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -130,5 +130,5 @@
 			return(-1);
 		}
-		res = _read(s, (char *)&thetime, sizeof(thetime));
+		res = _RPC_read(s, (char *)&thetime, sizeof(thetime));
 		do_close(s);
 		if (res < 0) {
@@ -153,5 +153,5 @@
 
 	save = errno;
-	(void)_close(s);
+	(void)_RPC_close(s);
 	errno = save;
 }
Index: c/src/librpc/src/rpc/svc_tcp.c
===================================================================
--- c/src/librpc/src/rpc/svc_tcp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/svc_tcp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -146,5 +146,5 @@
 		perror("svc_tcp.c - cannot turn on non-blocking mode");
 		if (madesock)
-		       (void)_close(sock);
+		       (void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -160,5 +160,5 @@
 		perror("svctcp_.c - cannot getsockname or listen");
 		if (madesock)
-		       (void)_close(sock);
+		       (void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -258,5 +258,5 @@
 	 */
 	if (addr.sin_port == htons(20)) {
-		_close(sock);
+		_RPC_close(sock);
 		return (FALSE);
 	}
@@ -266,5 +266,5 @@
 	off = 0;
 	if (ioctl(sock, FIONBIO, &off) < 0) {
-		_close(sock);
+		_RPC_close(sock);
 		return (FALSE);
 	}
@@ -292,5 +292,5 @@
 
 	xprt_unregister(xprt);
-	(void)_close(xprt->xp_sock);
+	(void)_RPC_close(xprt->xp_sock);
 	if (xprt->xp_port != 0) {
 		/* a rendezvouser socket */
@@ -374,5 +374,5 @@
 		}
 	} while (!FD_ISSET(sock, fds));
-	if ((len = _read(sock, buf, len)) > 0) {
+	if ((len = _RPC_read(sock, buf, len)) > 0) {
 		if (fds != NULL)
 			free(fds);
@@ -399,5 +399,5 @@
 
 	for (cnt = len; cnt > 0; cnt -= i, buf += i) {
-		if ((i = _write(xprt->xp_sock, buf, cnt)) < 0) {
+		if ((i = _RPC_write(xprt->xp_sock, buf, cnt)) < 0) {
 			((struct tcp_conn *)(xprt->xp_p1))->strm_stat =
 			    XPRT_DIED;
Index: c/src/librpc/src/rpc/svc_udp.c
===================================================================
--- c/src/librpc/src/rpc/svc_udp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/svc_udp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -124,5 +124,5 @@
 		perror("svcudp_create - cannot getsockname");
 		if (madesock)
-			(void)_close(sock);
+			(void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -260,5 +260,5 @@
 
 	xprt_unregister(xprt);
-	(void)_close(xprt->xp_sock);
+	(void)_RPC_close(xprt->xp_sock);
 	XDR_DESTROY(&(su->su_xdrs));
 	mem_free(rpc_buffer(xprt), su->su_iosz);
Index: c/src/librpc/src/rpc/svc_unix.c
===================================================================
--- c/src/librpc/src/rpc/svc_unix.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ c/src/librpc/src/rpc/svc_unix.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -214,5 +214,5 @@
 		perror("svc_unix.c - cannot getsockname or listen");
 		if (madesock)
-		       (void)_close(sock);
+		       (void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -334,5 +334,5 @@
 
 	xprt_unregister(xprt);
-	(void)_close(xprt->xp_sock);
+	(void)_RPC_close(xprt->xp_sock);
 	if (xprt->xp_port != 0) {
 		/* a rendezvouser socket */
Index: cpukit/librpc/ChangeLog
===================================================================
--- cpukit/librpc/ChangeLog	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/ChangeLog	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -1,2 +1,16 @@
+2000-10-30	Joel Sherrill <joel@OARcorp.com>
+
+	* POSIX include files merged into newlib.  This resulted in
+	some definitions moving to other files and thus some secondary
+	effects in RTEMS source code.
+	* src/rpc/Makefile.am, src/rpc/auth_time.c, src/rpc/clnt_simple.c,
+	src/rpc/clnt_tcp.c, src/rpc/clnt_udp.c, src/rpc/clnt_unix.c,
+	src/rpc/get_myaddress.c, src/rpc/pmap_clnt.c, src/rpc/pmap_getmaps.c,
+	src/rpc/pmap_getport.c, src/rpc/pmap_rmt.c, src/rpc/rtime.c,
+	src/rpc/svc_tcp.c, src/rpc/svc_udp.c, src/rpc/svc_unix.c:
+	Use of _read, _write, and _close as macros conflicted with
+	newlib's use of these as routine names.  They were renamed to
+	include "_RPC_" prefix.
+
 2000-10-25      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
 
Index: cpukit/librpc/src/rpc/Makefile.am
===================================================================
--- cpukit/librpc/src/rpc/Makefile.am	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/Makefile.am	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -35,5 +35,5 @@
 #
 
-AM_CPPFLAGS += '-D__P(x)=x' -D_read=read -D_write=write -D_close=close -D_RTEMS_RPC_INTERNAL_
+AM_CPPFLAGS += '-D__P(x)=x' -D_RPC_read=read -D_RPC_write=write -D_RPC_close=close -D_RTEMS_RPC_INTERNAL_
 
 $(LIB): $(OBJS)
Index: cpukit/librpc/src/rpc/auth_time.c
===================================================================
--- cpukit/librpc/src/rpc/auth_time.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/auth_time.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -438,5 +438,5 @@
 				goto error;
 			}
-			res = _read(s, (char *)&thetime, sizeof(thetime));
+			res = _RPC_read(s, (char *)&thetime, sizeof(thetime));
 			if (res != sizeof(thetime)) {
 				if (saw_alarm)
@@ -450,5 +450,5 @@
 		}
 		save = errno;
-		(void)_close(s);
+		(void)_RPC_close(s);
 		errno = save;
 		s = RPC_ANYSOCK;
@@ -469,5 +469,5 @@
 
 	if (s != RPC_ANYSOCK)
-		(void)_close(s);
+		(void)_RPC_close(s);
 
 	if (clnt != NULL)
Index: cpukit/librpc/src/rpc/clnt_simple.c
===================================================================
--- cpukit/librpc/src/rpc/clnt_simple.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/clnt_simple.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -88,5 +88,5 @@
 		crp->valid = 0;
 		if (crp->socket != -1)
-			(void)_close(crp->socket);
+			(void)_RPC_close(crp->socket);
 		crp->socket = RPC_ANYSOCK;
 		if (crp->client) {
Index: cpukit/librpc/src/rpc/clnt_tcp.c
===================================================================
--- cpukit/librpc/src/rpc/clnt_tcp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/clnt_tcp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -168,5 +168,5 @@
 			rpc_createerr.cf_error.re_errno = errno;
 			if (*sockp != -1)
-				(void)_close(*sockp);
+				(void)_RPC_close(*sockp);
 			goto fooy;
 		}
@@ -201,5 +201,5 @@
 	if (! xdr_callhdr(&(ct->ct_xdrs), &call_msg)) {
 		if (ct->ct_closeit) {
-			(void)_close(*sockp);
+			(void)_RPC_close(*sockp);
 		}
 		goto fooy;
@@ -475,5 +475,5 @@
 
 	if (ct->ct_closeit) {
-		(void)_close(ct->ct_sock);
+		(void)_RPC_close(ct->ct_sock);
 	}
 	XDR_DESTROY(&(ct->ct_xdrs));
@@ -545,5 +545,5 @@
 		break;
 	}
-	switch (len = _read(ct->ct_sock, buf, len)) {
+	switch (len = _RPC_read(ct->ct_sock, buf, len)) {
 
 	case 0:
@@ -571,5 +571,5 @@
 
 	for (cnt = len; cnt > 0; cnt -= i, buf += i) {
-		if ((i = _write(ct->ct_sock, buf, cnt)) == -1) {
+		if ((i = _RPC_write(ct->ct_sock, buf, cnt)) == -1) {
 			ct->ct_error.re_errno = errno;
 			ct->ct_error.re_status = RPC_CANTSEND;
Index: cpukit/librpc/src/rpc/clnt_udp.c
===================================================================
--- cpukit/librpc/src/rpc/clnt_udp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/clnt_udp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -560,5 +560,5 @@
 
 	if (cu->cu_closeit) {
-		(void)_close(cu->cu_sock);
+		(void)_RPC_close(cu->cu_sock);
 	}
 	XDR_DESTROY(&(cu->cu_outxdrs));
Index: cpukit/librpc/src/rpc/clnt_unix.c
===================================================================
--- cpukit/librpc/src/rpc/clnt_unix.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/clnt_unix.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -159,5 +159,5 @@
 			rpc_createerr.cf_error.re_errno = errno;
 			if (*sockp != -1)
-				(void)_close(*sockp);
+				(void)_RPC_close(*sockp);
 			goto fooy;
 		}
@@ -192,5 +192,5 @@
 	if (! xdr_callhdr(&(ct->ct_xdrs), &call_msg)) {
 		if (ct->ct_closeit) {
-			(void)_close(*sockp);
+			(void)_RPC_close(*sockp);
 		}
 		goto fooy;
@@ -466,5 +466,5 @@
 
 	if (ct->ct_closeit) {
-		(void)_close(ct->ct_sock);
+		(void)_RPC_close(ct->ct_sock);
 	}
 	XDR_DESTROY(&(ct->ct_xdrs));
Index: cpukit/librpc/src/rpc/get_myaddress.c
===================================================================
--- cpukit/librpc/src/rpc/get_myaddress.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/get_myaddress.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -74,5 +74,5 @@
 	ifc.ifc_buf = buf;
 	if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0) {
-		_close(s);
+		_RPC_close(s);
 		return(-1);
 	}
@@ -84,5 +84,5 @@
 		ifreq = *ifr;
 		if (ioctl(s, SIOCGIFFLAGS, (char *)&ifreq) < 0) {
-			_close(s);
+			_RPC_close(s);
 			return(-1);
 		}
@@ -108,5 +108,5 @@
 		goto again;
 	}
-	(void)_close(s);
+	(void)_RPC_close(s);
 	return (gotit ? 0 : -1);
 }
Index: cpukit/librpc/src/rpc/pmap_clnt.c
===================================================================
--- cpukit/librpc/src/rpc/pmap_clnt.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/pmap_clnt.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -103,5 +103,5 @@
 	CLNT_DESTROY(client);
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	return (rslt);
 }
@@ -145,5 +145,5 @@
 	CLNT_DESTROY(client);
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	return (rslt);
 }
Index: cpukit/librpc/src/rpc/pmap_getmaps.c
===================================================================
--- cpukit/librpc/src/rpc/pmap_getmaps.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/pmap_getmaps.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -81,5 +81,5 @@
 	}
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	address->sin_port = 0;
 	return (head);
Index: cpukit/librpc/src/rpc/pmap_getport.c
===================================================================
--- cpukit/librpc/src/rpc/pmap_getport.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/pmap_getport.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -86,5 +86,5 @@
 	}
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	address->sin_port = 0;
 	return (port);
Index: cpukit/librpc/src/rpc/pmap_rmt.c
===================================================================
--- cpukit/librpc/src/rpc/pmap_rmt.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/pmap_rmt.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -99,5 +99,5 @@
 	}
 	if (socket != -1)
-		(void)_close(socket);
+		(void)_RPC_close(socket);
 	addr->sin_port = 0;
 	return (stat);
@@ -409,5 +409,5 @@
 		free(fds);
 	if (sock >= 0)
-		(void)_close(sock);
+		(void)_RPC_close(sock);
 	AUTH_DESTROY(unix_auth);
 	return (stat);
Index: cpukit/librpc/src/rpc/rtime.c
===================================================================
--- cpukit/librpc/src/rpc/rtime.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/rtime.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -130,5 +130,5 @@
 			return(-1);
 		}
-		res = _read(s, (char *)&thetime, sizeof(thetime));
+		res = _RPC_read(s, (char *)&thetime, sizeof(thetime));
 		do_close(s);
 		if (res < 0) {
@@ -153,5 +153,5 @@
 
 	save = errno;
-	(void)_close(s);
+	(void)_RPC_close(s);
 	errno = save;
 }
Index: cpukit/librpc/src/rpc/svc_tcp.c
===================================================================
--- cpukit/librpc/src/rpc/svc_tcp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/svc_tcp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -146,5 +146,5 @@
 		perror("svc_tcp.c - cannot turn on non-blocking mode");
 		if (madesock)
-		       (void)_close(sock);
+		       (void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -160,5 +160,5 @@
 		perror("svctcp_.c - cannot getsockname or listen");
 		if (madesock)
-		       (void)_close(sock);
+		       (void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -258,5 +258,5 @@
 	 */
 	if (addr.sin_port == htons(20)) {
-		_close(sock);
+		_RPC_close(sock);
 		return (FALSE);
 	}
@@ -266,5 +266,5 @@
 	off = 0;
 	if (ioctl(sock, FIONBIO, &off) < 0) {
-		_close(sock);
+		_RPC_close(sock);
 		return (FALSE);
 	}
@@ -292,5 +292,5 @@
 
 	xprt_unregister(xprt);
-	(void)_close(xprt->xp_sock);
+	(void)_RPC_close(xprt->xp_sock);
 	if (xprt->xp_port != 0) {
 		/* a rendezvouser socket */
@@ -374,5 +374,5 @@
 		}
 	} while (!FD_ISSET(sock, fds));
-	if ((len = _read(sock, buf, len)) > 0) {
+	if ((len = _RPC_read(sock, buf, len)) > 0) {
 		if (fds != NULL)
 			free(fds);
@@ -399,5 +399,5 @@
 
 	for (cnt = len; cnt > 0; cnt -= i, buf += i) {
-		if ((i = _write(xprt->xp_sock, buf, cnt)) < 0) {
+		if ((i = _RPC_write(xprt->xp_sock, buf, cnt)) < 0) {
 			((struct tcp_conn *)(xprt->xp_p1))->strm_stat =
 			    XPRT_DIED;
Index: cpukit/librpc/src/rpc/svc_udp.c
===================================================================
--- cpukit/librpc/src/rpc/svc_udp.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/svc_udp.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -124,5 +124,5 @@
 		perror("svcudp_create - cannot getsockname");
 		if (madesock)
-			(void)_close(sock);
+			(void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -260,5 +260,5 @@
 
 	xprt_unregister(xprt);
-	(void)_close(xprt->xp_sock);
+	(void)_RPC_close(xprt->xp_sock);
 	XDR_DESTROY(&(su->su_xdrs));
 	mem_free(rpc_buffer(xprt), su->su_iosz);
Index: cpukit/librpc/src/rpc/svc_unix.c
===================================================================
--- cpukit/librpc/src/rpc/svc_unix.c	(revision 3e597933ff58732e09d4d1ce5bd02d39737cb8c8)
+++ cpukit/librpc/src/rpc/svc_unix.c	(revision 57cfaad2f5cb97a66c3353cf11f62c39dd0b5ea9)
@@ -214,5 +214,5 @@
 		perror("svc_unix.c - cannot getsockname or listen");
 		if (madesock)
-		       (void)_close(sock);
+		       (void)_RPC_close(sock);
 		return ((SVCXPRT *)NULL);
 	}
@@ -334,5 +334,5 @@
 
 	xprt_unregister(xprt);
-	(void)_close(xprt->xp_sock);
+	(void)_RPC_close(xprt->xp_sock);
 	if (xprt->xp_port != 0) {
 		/* a rendezvouser socket */
