diff options
Diffstat (limited to 'sunrpc')
-rw-r--r-- | sunrpc/auth_unix.c | 9 | ||||
-rw-r--r-- | sunrpc/clnt_perr.c | 21 | ||||
-rw-r--r-- | sunrpc/clnt_tcp.c | 9 | ||||
-rw-r--r-- | sunrpc/clnt_udp.c | 9 | ||||
-rw-r--r-- | sunrpc/clnt_unix.c | 9 | ||||
-rw-r--r-- | sunrpc/svc_simple.c | 14 | ||||
-rw-r--r-- | sunrpc/svc_tcp.c | 17 | ||||
-rw-r--r-- | sunrpc/svc_udp.c | 30 | ||||
-rw-r--r-- | sunrpc/svc_unix.c | 16 | ||||
-rw-r--r-- | sunrpc/xdr.c | 17 | ||||
-rw-r--r-- | sunrpc/xdr_array.c | 9 | ||||
-rw-r--r-- | sunrpc/xdr_rec.c | 8 | ||||
-rw-r--r-- | sunrpc/xdr_ref.c | 9 |
13 files changed, 36 insertions, 141 deletions
diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c index 1cf18cb..f4ee1b7 100644 --- a/sunrpc/auth_unix.c +++ b/sunrpc/auth_unix.c @@ -111,13 +111,8 @@ 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) __fxprintf (NULL, "%s", L"%s", + _("authunix_create: out of memory\n")); mem_free (auth, sizeof (*auth)); mem_free (au, sizeof (*au)); return NULL; diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c index 4fa5e62..7fe498f 100644 --- a/sunrpc/clnt_perr.c +++ b/sunrpc/clnt_perr.c @@ -155,12 +155,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) __fxprintf (NULL, "%s", L"%s", clnt_sperror (rpch, msg)); } libc_hidden_def (clnt_perror) @@ -289,12 +284,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) __fxprintf (NULL, "%s", L"%s", clnt_sperrno (num)); } @@ -337,12 +327,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) __fxprintf (NULL, "%s", L"%s", clnt_spcreateerror (msg)); } struct auth_errtab diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c index 5d02cd9..f9a64f5 100644 --- a/sunrpc/clnt_tcp.c +++ b/sunrpc/clnt_tcp.c @@ -128,13 +128,8 @@ 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) __fxprintf (NULL, "%s", L"%s", + _("clnttcp_create: out of memory\n")); ce->cf_stat = RPC_SYSTEMERROR; ce->cf_error.re_errno = ENOMEM; goto fooy; diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index f3787dd..fa30a6c 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -136,13 +136,8 @@ 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) __fxprintf (NULL, "%s", L"%s", + _("clntudp_create: out of memory\n")); ce->cf_stat = RPC_SYSTEMERROR; ce->cf_error.re_errno = ENOMEM; goto fooy; diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c index fae1cd8..eb96656 100644 --- a/sunrpc/clnt_unix.c +++ b/sunrpc/clnt_unix.c @@ -125,13 +125,8 @@ 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) __fxprintf (NULL, "%s", L"%s", + _("clntunix_create: out of memory\n")); ce->cf_stat = RPC_SYSTEMERROR; ce->cf_error.re_errno = ENOMEM; goto fooy; diff --git a/sunrpc/svc_simple.c b/sunrpc/svc_simple.c index 5ac21ff..1344c0b 100644 --- a/sunrpc/svc_simple.c +++ b/sunrpc/svc_simple.c @@ -125,12 +125,7 @@ registerrpc (u_long prognum, u_long versnum, u_long procnum, err_out: if (buf == NULL) return -1; -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - (void) __fwprintf (stderr, L"%s", buf); - else -#endif - (void) fputs (buf, stderr); + (void) __fxprintf (NULL, "%s", L"%s", buf); free (buf); return -1; } @@ -189,12 +184,7 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l) err_out2: if (buf == NULL) exit (1); -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"%s", buf); - else -#endif - fputs (buf, stderr); + __fxprintf (NULL, "%s", L"%s", buf); free (buf); exit (1); } diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c index 873d39d..5c646a4 100644 --- a/sunrpc/svc_tcp.c +++ b/sunrpc/svc_tcp.c @@ -176,12 +176,8 @@ 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) __fxprintf (NULL, "%s", L"%s", + _("svctcp_create: out of memory\n")); mem_free (r, sizeof (*r)); mem_free (xprt, sizeof (SVCXPRT)); return NULL; @@ -219,13 +215,8 @@ 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) __fxprintf (NULL, "%s", L"%s", + _("svc_tcp: makefd_xprt: out of memory\n")); mem_free (xprt, sizeof (SVCXPRT)); mem_free (cd, sizeof (struct tcp_conn)); return NULL; diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c index 45f9944..62fd97e 100644 --- a/sunrpc/svc_udp.c +++ b/sunrpc/svc_udp.c @@ -149,12 +149,8 @@ svcudp_bufcreate (sock, sendsz, 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) __fxprintf (NULL, "%s", L"%s", + _("svcudp_create: out of memory\n")); mem_free (xprt, sizeof (SVCXPRT)); mem_free (su, sizeof (*su)); mem_free (buf, ((MAX (sendsz, recvsz) + 3) / 4) * 4); @@ -176,14 +172,8 @@ svcudp_bufcreate (sock, sendsz, 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"), - stderr); + (void) __fxprintf (NULL,"%s", L"%s", _("\ +svcudp_create: xp_pad is too small for IP_PKTINFO\n")); return NULL; } pad = 1; @@ -411,16 +401,8 @@ svcudp_destroy (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) \ - (void) fprintf(stderr,"%s\n", msg) -#endif +#define CACHE_PERROR(msg) \ + (void) __fxprintf(NULL, "%s\n", L"%s\n", msg) #define ALLOC(type, size) \ (type *) mem_alloc((unsigned) (sizeof(type) * (size))) diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c index d95e884..7672fcd 100644 --- a/sunrpc/svc_unix.c +++ b/sunrpc/svc_unix.c @@ -173,12 +173,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); + __fxprintf (NULL, "%s", L"%s", _("svcunix_create: out of memory\n")); mem_free (r, sizeof (*r)); mem_free (xprt, sizeof (SVCXPRT)); return NULL; @@ -216,13 +211,8 @@ 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) __fxprintf (NULL, "%s", L"%s", + _("svc_unix: makefd_xprt: out of memory\n")); mem_free (xprt, sizeof (SVCXPRT)); mem_free (cd, sizeof (struct unix_conn)); return NULL; diff --git a/sunrpc/xdr.c b/sunrpc/xdr.c index 1f25e3e..2f64c5b 100644 --- a/sunrpc/xdr.c +++ b/sunrpc/xdr.c @@ -563,12 +563,8 @@ xdr_bytes (xdrs, cpp, sizep, 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) __fxprintf (NULL, "%s", L"%s", + _("xdr_bytes: out of memory\n")); return FALSE; } /* fall into ... */ @@ -720,13 +716,8 @@ xdr_string (xdrs, cpp, 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) __fxprintf (NULL, "%s", L"%s", + _("xdr_string: out of memory\n")); return FALSE; } sp[size] = 0; diff --git a/sunrpc/xdr_array.c b/sunrpc/xdr_array.c index 9f67e7f..12c78d4 100644 --- a/sunrpc/xdr_array.c +++ b/sunrpc/xdr_array.c @@ -105,13 +105,8 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc) *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) __fxprintf (NULL, "%s", L"%s", + _("xdr_array: out of memory\n")); return FALSE; } __bzero (target, nodesize); diff --git a/sunrpc/xdr_rec.c b/sunrpc/xdr_rec.c index 5e59c88..e841faa 100644 --- a/sunrpc/xdr_rec.c +++ b/sunrpc/xdr_rec.c @@ -153,12 +153,8 @@ 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) __fxprintf (NULL, "%s", L"%s", + _("xdrrec_create: out of memory\n")); mem_free (rstrm, sizeof (RECSTREAM)); mem_free (buf, sendsize + recvsize + BYTES_PER_XDR_UNIT); /* diff --git a/sunrpc/xdr_ref.c b/sunrpc/xdr_ref.c index ab706d7..68460bd 100644 --- a/sunrpc/xdr_ref.c +++ b/sunrpc/xdr_ref.c @@ -82,13 +82,8 @@ xdr_reference (xdrs, pp, size, 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) __fxprintf (NULL, "%s", L"%s", + _("xdr_reference: out of memory\n")); return FALSE; } __bzero (loc, (int) size); |