diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-09 15:43:30 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-09 15:43:30 +0000 |
commit | 4f16d2e03a6cc2415a0eefcf50410d1943319543 (patch) | |
tree | 8d3132396738369409812b09668e5f39b3459096 /libc/inet/rpc | |
parent | 06f8a796e2d4d88cfd89b21a2b7b195c3612ba81 (diff) |
Implement hidden poll, switch user to hidden *printf/*scanf/poll
Diffstat (limited to 'libc/inet/rpc')
-rw-r--r-- | libc/inet/rpc/clnt_perror.c | 14 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_tcp.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_udp.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_unix.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/pmap_rmt.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/rcmd.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/rexec.c | 3 | ||||
-rw-r--r-- | libc/inet/rpc/rtime.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/ruserpass.c | 28 | ||||
-rw-r--r-- | libc/inet/rpc/svc_auth_unix.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/svc_run.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/svc_tcp.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/svc_unix.c | 1 |
13 files changed, 34 insertions, 23 deletions
diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c index 9173f17af..611ca998c 100644 --- a/libc/inet/rpc/clnt_perror.c +++ b/libc/inet/rpc/clnt_perror.c @@ -220,7 +220,7 @@ __clnt_sperror (CLIENT * rpch, const char *msg) return NULL; CLNT_GETERR (rpch, &e); - len = sprintf (str, "%s: ", msg); + len = __sprintf (str, "%s: ", msg); str += len; (void) __strcpy(str, __clnt_sperrno(e.re_status)); @@ -246,12 +246,12 @@ __clnt_sperror (CLIENT * rpch, const char *msg) case RPC_CANTSEND: case RPC_CANTRECV: strerror_r (e.re_errno, chrbuf, sizeof chrbuf); - len = sprintf (str, "; errno = %s", chrbuf); + len = __sprintf (str, "; errno = %s", chrbuf); str += len; break; case RPC_VERSMISMATCH: - len= sprintf (str, _("; low version = %lu, high version = %lu"), + len= __sprintf (str, _("; low version = %lu, high version = %lu"), e.re_vers.low, e.re_vers.high); str += len; break; @@ -268,20 +268,20 @@ __clnt_sperror (CLIENT * rpch, const char *msg) } else { - len = sprintf (str, _("(unknown authentication error - %d)"), + len = __sprintf (str, _("(unknown authentication error - %d)"), (int) e.re_why); str += len; } break; case RPC_PROGVERSMISMATCH: - len = sprintf (str, _("; low version = %lu, high version = %lu"), + len = __sprintf (str, _("; low version = %lu, high version = %lu"), e.re_vers.low, e.re_vers.high); str += len; break; default: /* unknown */ - len = sprintf (str, "; s1 = %lu, s2 = %lu", e.re_lb.s1, e.re_lb.s2); + len = __sprintf (str, "; s1 = %lu, s2 = %lu", e.re_lb.s1, e.re_lb.s2); str += len; break; } @@ -315,7 +315,7 @@ __clnt_spcreateerror (const char *msg) if (str == NULL) return NULL; ce = &get_rpc_createerr (); - len = sprintf (str, "%s: ", msg); + len = __sprintf (str, "%s: ", msg); cp = str + len; (void) __strcpy(cp, __clnt_sperrno (ce->cf_stat)); cp += __strlen(cp); diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c index 67892cc4b..c415a447d 100644 --- a/libc/inet/rpc/clnt_tcp.c +++ b/libc/inet/rpc/clnt_tcp.c @@ -62,6 +62,7 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; #define _seterr_reply __seterr_reply #define connect __connect #define bindresvport __bindresvport +#define poll __poll #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c index 7855dcb2f..2a9f7b135 100644 --- a/libc/inet/rpc/clnt_udp.c +++ b/libc/inet/rpc/clnt_udp.c @@ -52,6 +52,7 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro"; #define recvfrom __recvfrom #define sendto __sendto #define recvmsg __recvmsg +#define poll __poll #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c index 56f23b749..c97edba42 100644 --- a/libc/inet/rpc/clnt_unix.c +++ b/libc/inet/rpc/clnt_unix.c @@ -61,6 +61,7 @@ #define connect __connect #define recvmsg __recvmsg #define sendmsg __sendmsg +#define poll __poll #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c index 60821ec6c..dbba18378 100644 --- a/libc/inet/rpc/pmap_rmt.c +++ b/libc/inet/rpc/pmap_rmt.c @@ -51,6 +51,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro"; #define setsockopt __setsockopt #define recvfrom __recvfrom #define sendto __sendto +#define poll __poll #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c index ffcfb9977..3837aed8d 100644 --- a/libc/inet/rpc/rcmd.c +++ b/libc/inet/rpc/rcmd.c @@ -51,6 +51,8 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; #define bind __bind #define connect __connect #define sigblock __sigblock +#define snprintf __snprintf +#define poll __poll #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/rexec.c b/libc/inet/rpc/rexec.c index cac783cc3..771f85a6b 100644 --- a/libc/inet/rpc/rexec.c +++ b/libc/inet/rpc/rexec.c @@ -34,6 +34,7 @@ #define sleep __sleep #define atoi __atoi #define connect __connect +#define snprintf __snprintf #define __FORCE_GLIBC #include <features.h> @@ -136,7 +137,7 @@ retry: NULL, 0, servbuff, sizeof(servbuff), NI_NUMERICSERV)) port = atoi(servbuff); - (void) sprintf(num, "%u", port); + (void) __sprintf(num, "%u", port); (void) __write(s, num, __strlen(num)+1); { socklen_t len = sizeof (from); s3 = accept(s2, (struct sockaddr *)&from, &len); diff --git a/libc/inet/rpc/rtime.c b/libc/inet/rpc/rtime.c index 728dbab61..b4bbca19c 100644 --- a/libc/inet/rpc/rtime.c +++ b/libc/inet/rpc/rtime.c @@ -46,6 +46,7 @@ static char sccsid[] = "@(#)rtime.c 2.2 88/08/10 4.0 RPCSRC; from 1.8 88/02/08 S #define connect __connect #define recvfrom __recvfrom #define sendto __sendto +#define poll __poll #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c index a3408dee0..b7bc36864 100644 --- a/libc/inet/rpc/ruserpass.c +++ b/libc/inet/rpc/ruserpass.c @@ -122,7 +122,7 @@ int attribute_hidden __ruserpass(const char *host, const char **aname, const cha cfile = fopen(buf, "r"); if (cfile == NULL) { if (errno != ENOENT) - printf("%s", buf); + __printf("%s", buf); return (0); } /* No threads use this stream. */ @@ -170,7 +170,7 @@ next: newp = malloc((unsigned) __strlen(tokval) + 1); if (newp == NULL) { - printf(_("out of memory")); + __printf(_("out of memory")); goto bad; } *aname = __strcpy(newp, tokval); @@ -184,8 +184,8 @@ next: if (__strcmp(*aname, "anonymous") && fstat(fileno(cfile), &stb) >= 0 && (stb.st_mode & 077) != 0) { - printf(_("Error: .netrc file is readable by others.")); - printf(_("Remove password or make file unreadable by others.")); + __printf(_("Error: .netrc file is readable by others.")); + __printf(_("Remove password or make file unreadable by others.")); goto bad; } if (token() && *apass == 0) { @@ -193,7 +193,7 @@ next: newp = malloc((unsigned) __strlen(tokval) + 1); if (newp == NULL) { - printf(_("out of memory")); + __printf(_("out of memory")); goto bad; } *apass = __strcpy(newp, tokval); @@ -203,8 +203,8 @@ next: #if 0 if (fstat(fileno(cfile), &stb) >= 0 && (stb.st_mode & 077) != 0) { - printf("Error: .netrc file is readable by others."); - printf("Remove account or make file unreadable by others."); + __printf("Error: .netrc file is readable by others."); + __printf("Remove account or make file unreadable by others."); goto bad; } if (token() && *aacct == 0) { @@ -222,11 +222,11 @@ next: while ((c=getc_unlocked(cfile)) != EOF && c == ' ' || c == '\t'); if (c == EOF || c == '\n') { - printf("Missing macdef name argument.\n"); + __printf("Missing macdef name argument.\n"); goto bad; } if (macnum == 16) { - printf("Limit of 16 macros have already been defined\n"); + __printf("Limit of 16 macros have already been defined\n"); goto bad; } tmp = macros[macnum].mac_name; @@ -236,7 +236,7 @@ next: *tmp++ = c; } if (c == EOF) { - printf("Macro definition missing null line terminator.\n"); + __printf("Macro definition missing null line terminator.\n"); goto bad; } *tmp = '\0'; @@ -245,7 +245,7 @@ next: && c != '\n'); } if (c == EOF) { - printf("Macro definition missing null line terminator.\n"); + __printf("Macro definition missing null line terminator.\n"); goto bad; } if (macnum == 0) { @@ -257,7 +257,7 @@ next: tmp = macros[macnum].mac_start; while (tmp != macbuf + 4096) { if ((c=getc_unlocked(cfile)) == EOF) { - printf("Macro definition missing null line terminator.\n"); + __printf("Macro definition missing null line terminator.\n"); goto bad; } *tmp = c; @@ -271,13 +271,13 @@ next: tmp++; } if (tmp == macbuf + 4096) { - printf("4K macro buffer exceeded\n"); + __printf("4K macro buffer exceeded\n"); goto bad; } #endif break; default: - printf(_("Unknown .netrc keyword %s"), tokval); + __printf(_("Unknown .netrc keyword %s"), tokval); break; } goto done; diff --git a/libc/inet/rpc/svc_auth_unix.c b/libc/inet/rpc/svc_auth_unix.c index 6c0f44f7d..0562a42fe 100644 --- a/libc/inet/rpc/svc_auth_unix.c +++ b/libc/inet/rpc/svc_auth_unix.c @@ -110,7 +110,7 @@ _svcauth_unix (struct svc_req *rqst, struct rpc_msg *msg) */ if ((5 + gid_len) * BYTES_PER_XDR_UNIT + str_len > auth_len) { - (void) printf ("bad auth_len gid %d str %d auth %d\n", + (void) __printf ("bad auth_len gid %d str %d auth %d\n", gid_len, str_len, auth_len); stat = AUTH_BADCRED; goto done; diff --git a/libc/inet/rpc/svc_run.c b/libc/inet/rpc/svc_run.c index b46320871..d2c06b895 100644 --- a/libc/inet/rpc/svc_run.c +++ b/libc/inet/rpc/svc_run.c @@ -32,6 +32,7 @@ */ #define svc_getreq_poll __svc_getreq_poll +#define poll __poll /* used by svc_[max_]pollfd */ #define __rpc_thread_svc_pollfd __rpc_thread_svc_pollfd_internal diff --git a/libc/inet/rpc/svc_tcp.c b/libc/inet/rpc/svc_tcp.c index 2638d55be..6a25d7c42 100644 --- a/libc/inet/rpc/svc_tcp.c +++ b/libc/inet/rpc/svc_tcp.c @@ -52,6 +52,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro"; #define getsockname __getsockname #define bind __bind #define bindresvport __bindresvport +#define poll __poll #define __FORCE_GLIBC #define _GNU_SOURCE diff --git a/libc/inet/rpc/svc_unix.c b/libc/inet/rpc/svc_unix.c index ed40146eb..33ea5cf40 100644 --- a/libc/inet/rpc/svc_unix.c +++ b/libc/inet/rpc/svc_unix.c @@ -52,6 +52,7 @@ #define bind __bind #define recvmsg __recvmsg #define sendmsg __sendmsg +#define poll __poll #define __FORCE_GLIBC #include <features.h> |