diff options
Diffstat (limited to 'libc/inet/rpc')
-rw-r--r-- | libc/inet/rpc/auth_unix.c | 12 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_perror.c | 27 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_tcp.c | 11 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_udp.c | 11 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_unix.c | 11 | ||||
-rw-r--r-- | libc/inet/rpc/svc_simple.c | 21 | ||||
-rw-r--r-- | libc/inet/rpc/svc_tcp.c | 22 | ||||
-rw-r--r-- | libc/inet/rpc/svc_udp.c | 32 | ||||
-rw-r--r-- | libc/inet/rpc/svc_unix.c | 20 | ||||
-rw-r--r-- | libc/inet/rpc/xdr.c | 20 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_array.c | 14 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_rec.c | 14 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_reference.c | 15 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_stdio.c | 9 |
14 files changed, 21 insertions, 218 deletions
diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c index 95d08f00d..3dc253030 100644 --- a/libc/inet/rpc/auth_unix.c +++ b/libc/inet/rpc/auth_unix.c @@ -50,10 +50,6 @@ #include <rpc/auth.h> #include <rpc/auth_unix.h> -#ifdef USE_IN_LIBIO -# include <wchar.h> -#endif - /* * Unix authenticator operations vector */ @@ -109,13 +105,7 @@ authunix_create (char *machname, uid_t uid, gid_t gid, int len, if (auth == NULL || au == NULL) { no_memory: -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", - _("authunix_create: out of memory\n")); - else -#endif - (void) fputs (_("authunix_create: out of memory\n"), stderr); + (void) fputs (_("authunix_create: out of memory\n"), stderr); mem_free (auth, sizeof (*auth)); mem_free (au, sizeof (*au)); return NULL; diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c index 00d607628..190e07eb7 100644 --- a/libc/inet/rpc/clnt_perror.c +++ b/libc/inet/rpc/clnt_perror.c @@ -42,12 +42,6 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro"; #include <string.h> #include "rpc_private.h" -#ifdef USE_IN_LIBIO -# include <wchar.h> -# include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) -#endif - static char *auth_errmsg (enum auth_stat stat) internal_function; #ifdef __UCLIBC_HAS_THREADS__ @@ -193,12 +187,7 @@ libc_hidden_def(clnt_sperrno) void clnt_perrno (enum clnt_stat num) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", clnt_sperrno (num)); - else -#endif - (void) fputs (clnt_sperrno (num), stderr); + (void) fputs (clnt_sperrno (num), stderr); } /* @@ -292,12 +281,7 @@ libc_hidden_def(clnt_sperror) void clnt_perror (CLIENT * rpch, const char *msg) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", clnt_sperror (rpch, msg)); - else -#endif - (void) fputs (clnt_sperror (rpch, msg), stderr); + (void) fputs (clnt_sperror (rpch, msg), stderr); } libc_hidden_def(clnt_perror) @@ -349,12 +333,7 @@ libc_hidden_def(clnt_spcreateerror) void clnt_pcreateerror (const char *msg) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", clnt_spcreateerror (msg)); - else -#endif - (void) fputs (clnt_spcreateerror (msg), stderr); + (void) fputs (clnt_spcreateerror (msg), stderr); } struct auth_errtab diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c index 1d55c02a1..4b19a9aab 100644 --- a/libc/inet/rpc/clnt_tcp.c +++ b/libc/inet/rpc/clnt_tcp.c @@ -58,9 +58,6 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; #include <sys/poll.h> #include <sys/socket.h> #include <rpc/pmap_clnt.h> -#ifdef USE_IN_LIBIO -# include <wchar.h> -#endif #define MCALL_MSG_SIZE 24 @@ -125,13 +122,7 @@ clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers, if (h == NULL || ct == NULL) { struct rpc_createerr *ce = &get_rpc_createerr (); -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", - _("clnttcp_create: out of memory\n")); - else -#endif - (void) fputs (_("clnttcp_create: out of memory\n"), stderr); + (void) fputs (_("clnttcp_create: out of memory\n"), stderr); ce->cf_stat = RPC_SYSTEMERROR; ce->cf_error.re_errno = ENOMEM; goto fooy; diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c index af5e0d2d8..f2f8149ec 100644 --- a/libc/inet/rpc/clnt_udp.c +++ b/libc/inet/rpc/clnt_udp.c @@ -49,9 +49,6 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro"; #include <errno.h> #include <rpc/pmap_clnt.h> #include <net/if.h> -#ifdef USE_IN_LIBIO -# include <wchar.h> -#endif #ifdef IP_RECVERR #include "errqueue.h" @@ -131,13 +128,7 @@ clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, if (cl == NULL || cu == NULL) { struct rpc_createerr *ce = &get_rpc_createerr (); -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", - _("clntudp_create: out of memory\n")); - else -#endif - (void) fputs (_("clntudp_create: out of memory\n"), stderr); + (void) fputs (_("clntudp_create: out of memory\n"), stderr); ce->cf_stat = RPC_SYSTEMERROR; ce->cf_error.re_errno = ENOMEM; goto fooy; diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c index 677758c88..e4a6672b7 100644 --- a/libc/inet/rpc/clnt_unix.c +++ b/libc/inet/rpc/clnt_unix.c @@ -55,9 +55,6 @@ #include <sys/poll.h> #include <sys/socket.h> #include <rpc/pmap_clnt.h> -#ifdef USE_IN_LIBIO -# include <wchar.h> -#endif #define MCALL_MSG_SIZE 24 @@ -122,13 +119,7 @@ clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers, if (h == NULL || ct == NULL) { struct rpc_createerr *ce = &get_rpc_createerr (); -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", - _("clntunix_create: out of memory\n")); - else -#endif - (void) fputs (_("clntunix_create: out of memory\n"), stderr); + (void) fputs (_("clntunix_create: out of memory\n"), stderr); ce->cf_stat = RPC_SYSTEMERROR; ce->cf_error.re_errno = ENOMEM; goto fooy; diff --git a/libc/inet/rpc/svc_simple.c b/libc/inet/rpc/svc_simple.c index 8972f73e2..c770938a1 100644 --- a/libc/inet/rpc/svc_simple.c +++ b/libc/inet/rpc/svc_simple.c @@ -46,13 +46,6 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro"; #include <sys/socket.h> #include <netdb.h> -#ifdef USE_IN_LIBIO -# include <wchar.h> -# include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) -#endif - - struct proglst_ { char *(*p_progname) (char *); @@ -124,12 +117,7 @@ registerrpc (u_long prognum, u_long versnum, u_long procnum, return 0; err_out: -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) __fwprintf (stderr, L"%s", buf); - else -#endif - (void) fputs (buf, stderr); + (void) fputs (buf, stderr); free (buf); return -1; } @@ -183,12 +171,7 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l) return; } (void) asprintf (&buf, _("never registered prog %d\n"), prog); -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else -#endif - fputs (buf, stderr); + fputs (buf, stderr); free (buf); exit (1); } diff --git a/libc/inet/rpc/svc_tcp.c b/libc/inet/rpc/svc_tcp.c index e44becf4b..f0acf35dc 100644 --- a/libc/inet/rpc/svc_tcp.c +++ b/libc/inet/rpc/svc_tcp.c @@ -50,13 +50,6 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro"; #include <errno.h> #include <stdlib.h> -#ifdef USE_IN_LIBIO -# include <wchar.h> -# include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) -#endif - - /* * Ops vector for TCP/IP based rpc service handle */ @@ -177,12 +170,7 @@ svctcp_create (int sock, u_int sendsize, u_int recvsize) xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT)); if (r == NULL || xprt == NULL) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) __fwprintf (stderr, L"%s", _("svctcp_create: out of memory\n")); - else -#endif - (void) fputs (_("svctcp_create: out of memory\n"), stderr); + (void) fputs (_("svctcp_create: out of memory\n"), stderr); mem_free (r, sizeof (*r)); mem_free (xprt, sizeof (SVCXPRT)); return NULL; @@ -222,13 +210,7 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize) cd = (struct tcp_conn *) mem_alloc (sizeof (struct tcp_conn)); if (xprt == (SVCXPRT *) NULL || cd == NULL) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) __fwprintf (stderr, L"%s", - _("svc_tcp: makefd_xprt: out of memory\n")); - else -#endif - (void) fputs (_("svc_tcp: makefd_xprt: out of memory\n"), stderr); + (void) fputs (_("svc_tcp: makefd_xprt: out of memory\n"), stderr); mem_free (xprt, sizeof (SVCXPRT)); mem_free (cd, sizeof (struct tcp_conn)); return NULL; diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c index 9a185d208..456c6ded2 100644 --- a/libc/inet/rpc/svc_udp.c +++ b/libc/inet/rpc/svc_udp.c @@ -50,13 +50,6 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro"; #include <sys/uio.h> #endif -#ifdef USE_IN_LIBIO -# include <wchar.h> -# include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) -#endif - - #define rpc_buffer(xprt) ((xprt)->xp_p1) #ifndef MAX #define MAX(a, b) ((a > b) ? a : b) @@ -148,12 +141,7 @@ svcudp_bufcreate (int sock, u_int sendsz, u_int recvsz) buf = mem_alloc (((MAX (sendsz, recvsz) + 3) / 4) * 4); if (xprt == NULL || su == NULL || buf == NULL) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", _("svcudp_create: out of memory\n")); - else -#endif - (void) fputs (_("svcudp_create: out of memory\n"), stderr); + (void) fputs (_("svcudp_create: out of memory\n"), stderr); mem_free (xprt, sizeof (SVCXPRT)); mem_free (su, sizeof (*su)); mem_free (buf, ((MAX (sendsz, recvsz) + 3) / 4) * 4); @@ -174,13 +162,7 @@ svcudp_bufcreate (int sock, u_int sendsz, u_int recvsz) + sizeof(struct cmsghdr) + sizeof (struct in_pktinfo)) > sizeof (xprt->xp_pad)) { -# ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", - _("svcudp_create: xp_pad is too small for IP_PKTINFO\n")); - else -# endif - (void) fputs (_("svcudp_create: xp_pad is too small for IP_PKTINFO\n"), + (void) fputs (_("svcudp_create: xp_pad is too small for IP_PKTINFO\n"), stderr); return NULL; } @@ -375,16 +357,8 @@ svcudp_destroy (SVCXPRT *xprt) #define SPARSENESS 4 /* 75% sparse */ -#ifdef USE_IN_LIBIO -# define CACHE_PERROR(msg) \ - if (_IO_fwide (stderr, 0) > 0) \ - (void) __fwprintf(stderr, L"%s\n", msg); \ - else \ - (void) fprintf(stderr, "%s\n", msg) -#else -# define CACHE_PERROR(msg) \ +#define CACHE_PERROR(msg) \ (void) fprintf(stderr,"%s\n", msg) -#endif #define ALLOC(type, size) \ (type *) mem_alloc((unsigned) (sizeof(type) * (size))) diff --git a/libc/inet/rpc/svc_unix.c b/libc/inet/rpc/svc_unix.c index 715f6e43a..7a09af6a1 100644 --- a/libc/inet/rpc/svc_unix.c +++ b/libc/inet/rpc/svc_unix.c @@ -48,11 +48,6 @@ #include <errno.h> #include <stdlib.h> -#ifdef USE_IN_LIBIO -# include <wchar.h> -#endif - - /* * Ops vector for AF_UNIX based rpc service handle */ @@ -173,12 +168,7 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path) xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT)); if (r == NULL || xprt == NULL) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", _("svcunix_create: out of memory\n")); - else -#endif - fputs (_("svcunix_create: out of memory\n"), stderr); + fputs (_("svcunix_create: out of memory\n"), stderr); mem_free (r, sizeof (*r)); mem_free (xprt, sizeof (SVCXPRT)); return NULL; @@ -218,13 +208,7 @@ makefd_xprt (int fd, u_int sendsize, u_int recvsize) cd = (struct unix_conn *) mem_alloc (sizeof (struct unix_conn)); if (xprt == (SVCXPRT *) NULL || cd == (struct unix_conn *) NULL) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) __fwprintf (stderr, L"%s", - _("svc_unix: makefd_xprt: out of memory\n")); - else -#endif - (void) fputs (_("svc_unix: makefd_xprt: out of memory\n"), stderr); + (void) fputs (_("svc_unix: makefd_xprt: out of memory\n"), stderr); mem_free (xprt, sizeof (SVCXPRT)); mem_free (cd, sizeof (struct unix_conn)); return NULL; diff --git a/libc/inet/rpc/xdr.c b/libc/inet/rpc/xdr.c index d07607cf8..57d7dbd40 100644 --- a/libc/inet/rpc/xdr.c +++ b/libc/inet/rpc/xdr.c @@ -49,11 +49,6 @@ static char sccsid[] = "@(#)xdr.c 1.35 87/08/12"; #include <rpc/types.h> #include <rpc/xdr.h> -#ifdef USE_IN_LIBIO -# include <wchar.h> -#endif - - /* * constants specific to the xdr "protocol" */ @@ -562,12 +557,7 @@ xdr_bytes (XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize) } if (sp == NULL) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", _("xdr_bytes: out of memory\n")); - else -#endif - (void) fputs (_("xdr_bytes: out of memory\n"), stderr); + (void) fputs (_("xdr_bytes: out of memory\n"), stderr); return FALSE; } /* fall into ... */ @@ -704,13 +694,7 @@ xdr_string (XDR *xdrs, char **cpp, u_int maxsize) *cpp = sp = (char *) mem_alloc (nodesize); if (sp == NULL) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", - _("xdr_string: out of memory\n")); - else -#endif - (void) fputs (_("xdr_string: out of memory\n"), stderr); + (void) fputs (_("xdr_string: out of memory\n"), stderr); return FALSE; } sp[size] = 0; diff --git a/libc/inet/rpc/xdr_array.c b/libc/inet/rpc/xdr_array.c index a058f93f2..25428aac3 100644 --- a/libc/inet/rpc/xdr_array.c +++ b/libc/inet/rpc/xdr_array.c @@ -47,14 +47,8 @@ static char sccsid[] = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro"; #include <limits.h> #include <libintl.h> -#ifdef USE_IN_LIBIO -# include <wchar.h> -#endif - - #define LASTUNSIGNED ((u_int)0-1) - /* * XDR an array of arbitrary elements * *addrp is a pointer to the array, *sizep is the number of elements. @@ -100,13 +94,7 @@ xdr_array (XDR *xdrs, caddr_t *addrp, u_int *sizep, u_int maxsize, u_int elsize, *addrp = target = mem_alloc (nodesize); if (target == NULL) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", - _("xdr_array: out of memory\n")); - else -#endif - (void) fputs (_("xdr_array: out of memory\n"), stderr); + (void) fputs (_("xdr_array: out of memory\n"), stderr); return FALSE; } memset (target, 0, nodesize); diff --git a/libc/inet/rpc/xdr_rec.c b/libc/inet/rpc/xdr_rec.c index f02f50e78..87d50abd0 100644 --- a/libc/inet/rpc/xdr_rec.c +++ b/libc/inet/rpc/xdr_rec.c @@ -49,13 +49,6 @@ #include <unistd.h> #include "rpc_private.h" -#ifdef USE_IN_LIBIO -# include <wchar.h> -# include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) -#endif - - static bool_t xdrrec_getbytes (XDR *, caddr_t, u_int); static bool_t xdrrec_putbytes (XDR *, const char *, u_int); static bool_t xdrrec_getint32 (XDR *, int32_t *); @@ -161,12 +154,7 @@ xdrrec_create (XDR *xdrs, u_int sendsize, if (rstrm == NULL || buf == NULL) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", _("xdrrec_create: out of memory\n")); - else -#endif - (void) fputs (_("xdrrec_create: out of memory\n"), stderr); + (void) fputs (_("xdrrec_create: out of memory\n"), stderr); mem_free (rstrm, sizeof (RECSTREAM)); mem_free (buf, sendsize + recvsize + BYTES_PER_XDR_UNIT); /* diff --git a/libc/inet/rpc/xdr_reference.c b/libc/inet/rpc/xdr_reference.c index a7a494ac2..85765886b 100644 --- a/libc/inet/rpc/xdr_reference.c +++ b/libc/inet/rpc/xdr_reference.c @@ -46,13 +46,6 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI"; #include <rpc/xdr.h> #include <libintl.h> -#ifdef USE_IN_LIBIO -# include <wchar.h> -# include <libio/iolibio.h> -# define fputs(s, f) _IO_fputs (s, f) -#endif - - #define LASTUNSIGNED ((u_int)0-1) /* @@ -80,13 +73,7 @@ xdr_reference (XDR *xdrs, caddr_t *pp, u_int size, xdrproc_t proc) *pp = loc = (caddr_t) mem_alloc (size); if (loc == NULL) { -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) fwprintf (stderr, L"%s", - _("xdr_reference: out of memory\n")); - else -#endif - (void) fputs (_("xdr_reference: out of memory\n"), stderr); + (void) fputs (_("xdr_reference: out of memory\n"), stderr); return FALSE; } memset (loc, 0, (int) size); diff --git a/libc/inet/rpc/xdr_stdio.c b/libc/inet/rpc/xdr_stdio.c index a087c9c6a..6a5e06edc 100644 --- a/libc/inet/rpc/xdr_stdio.c +++ b/libc/inet/rpc/xdr_stdio.c @@ -41,15 +41,6 @@ #include <stdio.h> #include <rpc/xdr.h> -#ifdef USE_IN_LIBIO -# include <libio/iolibio.h> -# define fflush(s) _IO_fflush (s) -# define fread(p, m, n, s) _IO_fread (p, m, n, s) -# define ftell(s) _IO_ftell (s) -# define fwrite(p, m, n, s) _IO_fwrite (p, m, n, s) -#endif - - static bool_t xdrstdio_getlong (XDR *, long *); static bool_t xdrstdio_putlong (XDR *, const long *); static bool_t xdrstdio_getbytes (XDR *, caddr_t, u_int); |