aboutsummaryrefslogtreecommitdiff
path: root/sunrpc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-07-20 07:43:27 +0000
committerUlrich Drepper <drepper@redhat.com>2005-07-20 07:43:27 +0000
commitdf6f89692fd7e802f38f944ed73942354a9911f8 (patch)
tree12debd445b11886fcf433fc6f85e9abe615670cc /sunrpc
parent10ffcd52f0578b13b48bdf84e73759353b29b673 (diff)
downloadglibc-df6f89692fd7e802f38f944ed73942354a9911f8.tar
glibc-df6f89692fd7e802f38f944ed73942354a9911f8.tar.gz
glibc-df6f89692fd7e802f38f944ed73942354a9911f8.tar.bz2
glibc-df6f89692fd7e802f38f944ed73942354a9911f8.zip
* wcsmbs/bits/wchar2.h: Add definitions for wcrtomb, mbsrtowcs,
wcsrtombs, mbsnrtowcs, and wcsnrtombs. * debug/Makefile (routines): Add wcrtomb_chk, mbsrtowcs_chk, wcsrtombs_chk, mbsnrtowcs_chk, and wcsnrtombs_chk. * debug/Versions: Add __wcrtomb_chk, __mbsrtowcs_chk, __wcsrtombs_chk, __mbsnrtowcs_chk, and __wcsnrtombs_chk. * debug/tst-chk1.c: Add tests for new functions. * debug/mbsnrtowcs_chk.c: New file. * debug/mbsrtowcs_chk.c: New file. * debug/wcrtomb_chk.c: New file. * debug/wcsnrtombs_chk.c: New file. * debug/wcsrtombs_chk.c: New file. * include/stdio.h: Add declaration for __fxprintf.
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/auth_unix.c9
-rw-r--r--sunrpc/clnt_perr.c21
-rw-r--r--sunrpc/clnt_tcp.c9
-rw-r--r--sunrpc/clnt_udp.c9
-rw-r--r--sunrpc/clnt_unix.c9
-rw-r--r--sunrpc/svc_simple.c14
-rw-r--r--sunrpc/svc_tcp.c17
-rw-r--r--sunrpc/svc_udp.c30
-rw-r--r--sunrpc/svc_unix.c16
-rw-r--r--sunrpc/xdr.c17
-rw-r--r--sunrpc/xdr_array.c9
-rw-r--r--sunrpc/xdr_rec.c8
-rw-r--r--sunrpc/xdr_ref.c9
13 files changed, 36 insertions, 141 deletions
diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c
index 1cf18cb6b3..f4ee1b75e4 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 4fa5e62c0f..7fe498f5c5 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 5d02cd99cb..f9a64f5de1 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 f3787dd1a5..fa30a6cb93 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 fae1cd8229..eb96656215 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 5ac21ffdbd..1344c0bd55 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 873d39d52a..5c646a46c7 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 45f99440b2..62fd97e2f7 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 d95e884434..7672fcda48 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 1f25e3e9c0..2f64c5b3fa 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 9f67e7fe62..12c78d4218 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 5e59c88523..e841faa6f1 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 ab706d7f84..68460bdc39 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);