diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-16 01:05:56 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-16 01:05:56 +0000 |
commit | 6a6ae6e1a26f32fd896b0a7b740129161bfb008b (patch) | |
tree | 818a08e98cc3cd7711fd077ea68c3c1a9d740f37 /libc/inet/rpc | |
parent | a1915d4502e23cc0c30e1c80a31971e71e7340a5 (diff) |
Convert some users and get rid of __rpc_thread_createerr jump reloc, this was indeed a badly chosen name
Diffstat (limited to 'libc/inet/rpc')
-rw-r--r-- | libc/inet/rpc/auth_unix.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_generic.c | 5 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_perror.c | 7 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_tcp.c | 6 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_udp.c | 6 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_unix.c | 6 | ||||
-rw-r--r-- | libc/inet/rpc/get_myaddress.c | 6 | ||||
-rw-r--r-- | libc/inet/rpc/getrpcent.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/pmap_clnt.c | 6 | ||||
-rw-r--r-- | libc/inet/rpc/pmap_getport.c | 5 | ||||
-rw-r--r-- | libc/inet/rpc/rcmd.c | 5 | ||||
-rw-r--r-- | libc/inet/rpc/rpc_private.h | 5 | ||||
-rw-r--r-- | libc/inet/rpc/rpc_thread.c | 10 | ||||
-rw-r--r-- | libc/inet/rpc/ruserpass.c | 20 | ||||
-rw-r--r-- | libc/inet/rpc/svc_simple.c | 7 | ||||
-rw-r--r-- | libc/inet/rpc/svc_tcp.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/svc_udp.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/svc_unix.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/xdr.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_array.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_rec.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_reference.c | 1 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_stdio.c | 1 |
23 files changed, 81 insertions, 25 deletions
diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c index 85fb98a63..110e67f12 100644 --- a/libc/inet/rpc/auth_unix.c +++ b/libc/inet/rpc/auth_unix.c @@ -47,6 +47,7 @@ #define xdr_authunix_parms __xdr_authunix_parms #define xdr_opaque_auth __xdr_opaque_auth #define gettimeofday __gettimeofday +#define fputs __fputs #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/clnt_generic.c b/libc/inet/rpc/clnt_generic.c index 518ca0fa8..fee12fd7d 100644 --- a/libc/inet/rpc/clnt_generic.c +++ b/libc/inet/rpc/clnt_generic.c @@ -47,6 +47,11 @@ #include <sys/errno.h> #include <netdb.h> +#undef get_rpc_createerr +extern struct rpc_createerr *__rpc_thread_createerr_internal (void) + __attribute__ ((__const__)) attribute_hidden; +#define get_rpc_createerr() (*__rpc_thread_createerr_internal ()) + /* * Generic client creation: takes (hostname, program-number, protocol) and * returns client handle. Default options are set, which the user can diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c index 611ca998c..eba539c95 100644 --- a/libc/inet/rpc/clnt_perror.c +++ b/libc/inet/rpc/clnt_perror.c @@ -37,6 +37,9 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro"; * Copyright (C) 1984, Sun Microsystems, Inc. * */ + +#define fputs __fputs + #define __FORCE_GLIBC #include <features.h> @@ -245,7 +248,7 @@ __clnt_sperror (CLIENT * rpch, const char *msg) case RPC_CANTSEND: case RPC_CANTRECV: - strerror_r (e.re_errno, chrbuf, sizeof chrbuf); + __glibc_strerror_r_internal (e.re_errno, chrbuf, sizeof chrbuf); len = __sprintf (str, "; errno = %s", chrbuf); str += len; break; @@ -335,7 +338,7 @@ __clnt_spcreateerror (const char *msg) (void) __strcpy(cp, " - "); cp += __strlen(cp); - strerror_r (ce->cf_error.re_errno, chrbuf, sizeof chrbuf); + __glibc_strerror_r_internal (ce->cf_error.re_errno, chrbuf, sizeof chrbuf); (void) __strcpy(cp, chrbuf); cp += __strlen(cp); break; diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c index c415a447d..8dcb4682a 100644 --- a/libc/inet/rpc/clnt_tcp.c +++ b/libc/inet/rpc/clnt_tcp.c @@ -63,6 +63,7 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; #define connect __connect #define bindresvport __bindresvport #define poll __poll +#define fputs __fputs #define __FORCE_GLIBC #include <features.h> @@ -81,6 +82,11 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; extern u_long _create_xid (void) attribute_hidden; +#undef get_rpc_createerr +extern struct rpc_createerr *__rpc_thread_createerr_internal (void) + __attribute__ ((__const__)) attribute_hidden; +#define get_rpc_createerr() (*__rpc_thread_createerr_internal ()) + #define MCALL_MSG_SIZE 24 struct ct_data diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c index 2a9f7b135..bd93fd022 100644 --- a/libc/inet/rpc/clnt_udp.c +++ b/libc/inet/rpc/clnt_udp.c @@ -53,6 +53,7 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro"; #define sendto __sendto #define recvmsg __recvmsg #define poll __poll +#define fputs __fputs #define __FORCE_GLIBC #include <features.h> @@ -80,6 +81,11 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro"; extern u_long _create_xid (void) attribute_hidden; +#undef get_rpc_createerr +extern struct rpc_createerr *__rpc_thread_createerr_internal (void) + __attribute__ ((__const__)) attribute_hidden; +#define get_rpc_createerr() (*__rpc_thread_createerr_internal ()) + /* * UDP bases client side rpc operations */ diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c index c97edba42..e0483b4e2 100644 --- a/libc/inet/rpc/clnt_unix.c +++ b/libc/inet/rpc/clnt_unix.c @@ -62,6 +62,7 @@ #define recvmsg __recvmsg #define sendmsg __sendmsg #define poll __poll +#define fputs __fputs #define __FORCE_GLIBC #include <features.h> @@ -81,6 +82,11 @@ extern u_long _create_xid (void) attribute_hidden; +#undef get_rpc_createerr +extern struct rpc_createerr *__rpc_thread_createerr_internal (void) + __attribute__ ((__const__)) attribute_hidden; +#define get_rpc_createerr() (*__rpc_thread_createerr_internal ()) + #define MCALL_MSG_SIZE 24 struct ct_data diff --git a/libc/inet/rpc/get_myaddress.c b/libc/inet/rpc/get_myaddress.c index bdbafa44d..45fbe359f 100644 --- a/libc/inet/rpc/get_myaddress.c +++ b/libc/inet/rpc/get_myaddress.c @@ -68,14 +68,14 @@ get_myaddress (struct sockaddr_in *addr) if ((s = __socket (AF_INET, SOCK_DGRAM, 0)) < 0) { __perror ("get_myaddress: socket"); - exit (1); + __exit (1); } ifc.ifc_len = sizeof (buf); ifc.ifc_buf = buf; if (__ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0) { __perror (_("get_myaddress: ioctl (get interface configuration)")); - exit (1); + __exit (1); } again: @@ -86,7 +86,7 @@ get_myaddress (struct sockaddr_in *addr) if (__ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0) { __perror ("get_myaddress: ioctl"); - exit (1); + __exit (1); } if ((ifreq.ifr_flags & IFF_UP) && (ifr->ifr_addr.sa_family == AF_INET) && (!(ifreq.ifr_flags & IFF_LOOPBACK) || diff --git a/libc/inet/rpc/getrpcent.c b/libc/inet/rpc/getrpcent.c index c2e101510..100469879 100644 --- a/libc/inet/rpc/getrpcent.c +++ b/libc/inet/rpc/getrpcent.c @@ -35,6 +35,7 @@ #define atoi __atoi #define rewind __rewind +#define fgets __fgets #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/pmap_clnt.c b/libc/inet/rpc/pmap_clnt.c index 49cd93f4b..0c233dd19 100644 --- a/libc/inet/rpc/pmap_clnt.c +++ b/libc/inet/rpc/pmap_clnt.c @@ -69,14 +69,14 @@ __get_myaddress (struct sockaddr_in *addr) if ((s = __socket (AF_INET, SOCK_DGRAM, 0)) < 0) { __perror ("__get_myaddress: socket"); - exit (1); + __exit (1); } ifc.ifc_len = sizeof (buf); ifc.ifc_buf = buf; if (__ioctl (s, SIOCGIFCONF, (char *) &ifc) < 0) { __perror (_("__get_myaddress: ioctl (get interface configuration)")); - exit (1); + __exit (1); } again: @@ -87,7 +87,7 @@ __get_myaddress (struct sockaddr_in *addr) if (__ioctl (s, SIOCGIFFLAGS, (char *) &ifreq) < 0) { __perror ("__get_myaddress: ioctl"); - exit (1); + __exit (1); } if ((ifreq.ifr_flags & IFF_UP) && (ifr->ifr_addr.sa_family == AF_INET) && ((ifreq.ifr_flags & IFF_LOOPBACK) || (loopback == 0))) diff --git a/libc/inet/rpc/pmap_getport.c b/libc/inet/rpc/pmap_getport.c index 1981cfaa1..b47baf35c 100644 --- a/libc/inet/rpc/pmap_getport.c +++ b/libc/inet/rpc/pmap_getport.c @@ -45,6 +45,11 @@ static char sccsid[] = "@(#)pmap_getport.c 1.9 87/08/11 Copyr 1984 Sun Micro"; #include <rpc/pmap_clnt.h> #include <sys/socket.h> +#undef get_rpc_createerr +extern struct rpc_createerr *__rpc_thread_createerr_internal (void) + __attribute__ ((__const__)) attribute_hidden; +#define get_rpc_createerr() (*__rpc_thread_createerr_internal ()) + static const struct timeval timeout = {5, 0}; static const struct timeval tottimeout = diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c index d43bd0663..b3f2a198c 100644 --- a/libc/inet/rpc/rcmd.c +++ b/libc/inet/rpc/rcmd.c @@ -81,6 +81,7 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; extern int __rresvport(int *alport) attribute_hidden; +extern int __getc_unlocked (FILE *__stream) attribute_hidden; /* some forward declarations */ static int __ivaliduser2(FILE *hostf, u_int32_t raddr, @@ -664,10 +665,10 @@ __ivaliduser2(hostf, raddr, luser, ruser, rhost) /* Skip lines that are too long. */ if (__strchr (p, '\n') == NULL) { - int ch = getc_unlocked (hostf); + int ch = __getc_unlocked (hostf); while (ch != '\n' && ch != EOF) - ch = getc_unlocked (hostf); + ch = __getc_unlocked (hostf); continue; } diff --git a/libc/inet/rpc/rpc_private.h b/libc/inet/rpc/rpc_private.h index 69ee1cb53..d899b401d 100644 --- a/libc/inet/rpc/rpc_private.h +++ b/libc/inet/rpc/rpc_private.h @@ -4,6 +4,11 @@ /* Now define the internal interfaces. */ extern u_long _create_xid (void) attribute_hidden; +#undef get_rpc_createerr +extern struct rpc_createerr *__rpc_thread_createerr_internal (void) + __attribute__ ((__const__)) attribute_hidden; +#define get_rpc_createerr() (*__rpc_thread_createerr_internal ()) + /* * Multi-threaded support * Group all global and static variables into a single spot. diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c index 5a23c60f7..f9af0d7d6 100644 --- a/libc/inet/rpc/rpc_thread.c +++ b/libc/inet/rpc/rpc_thread.c @@ -107,8 +107,8 @@ __rpc_thread_svc_fdset_internal (void) } strong_alias(__rpc_thread_svc_fdset_internal,__rpc_thread_svc_fdset) -struct rpc_createerr * -__rpc_thread_createerr (void) +struct rpc_createerr attribute_hidden * +__rpc_thread_createerr_internal (void) { struct rpc_thread_variables *tvp; @@ -117,6 +117,8 @@ __rpc_thread_createerr (void) return &rpc_createerr; return &tvp->rpc_createerr_s; } +#undef __rpc_thread_createerr +strong_alias(__rpc_thread_createerr_internal,__rpc_thread_createerr) struct pollfd attribute_hidden ** __rpc_thread_svc_pollfd_internal (void) @@ -155,11 +157,13 @@ fd_set attribute_hidden * __rpc_thread_svc_fdset_internal (void) } strong_alias(__rpc_thread_svc_fdset_internal,__rpc_thread_svc_fdset) -struct rpc_createerr * __rpc_thread_createerr (void) +struct rpc_createerr attribute_hidden * __rpc_thread_createerr_internal (void) { extern struct rpc_createerr rpc_createerr; return &(rpc_createerr); } +#undef __rpc_thread_createerr +strong_alias(__rpc_thread_createerr_internal,__rpc_thread_createerr) struct pollfd attribute_hidden ** __rpc_thread_svc_pollfd_internal (void) { diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c index 43291808d..728ea5bb7 100644 --- a/libc/inet/rpc/ruserpass.c +++ b/libc/inet/rpc/ruserpass.c @@ -50,6 +50,8 @@ #include <string.h> #include <unistd.h> +extern int __getc_unlocked (FILE *__stream) attribute_hidden; + #define _(X) (X) /* #include "ftp_var.h" */ @@ -219,7 +221,7 @@ next: (void) fclose(cfile); return (0); } - while ((c=getc_unlocked(cfile)) != EOF && c == ' ' + while ((c=__getc_unlocked(cfile)) != EOF && c == ' ' || c == '\t'); if (c == EOF || c == '\n') { __printf("Missing macdef name argument.\n"); @@ -231,7 +233,7 @@ next: } tmp = macros[macnum].mac_name; *tmp++ = c; - for (i=0; i < 8 && (c=getc_unlocked(cfile)) != EOF && + for (i=0; i < 8 && (c=__getc_unlocked(cfile)) != EOF && !isspace(c); ++i) { *tmp++ = c; } @@ -241,7 +243,7 @@ next: } *tmp = '\0'; if (c != '\n') { - while ((c=getc_unlocked(cfile)) != EOF + while ((c=__getc_unlocked(cfile)) != EOF && c != '\n'); } if (c == EOF) { @@ -256,7 +258,7 @@ next: } tmp = macros[macnum].mac_start; while (tmp != macbuf + 4096) { - if ((c=getc_unlocked(cfile)) == EOF) { + if ((c=__getc_unlocked(cfile)) == EOF) { __printf("Macro definition missing null line terminator.\n"); goto bad; } @@ -300,24 +302,24 @@ token() if (feof_unlocked(cfile) || ferror_unlocked(cfile)) return (0); - while ((c = getc_unlocked(cfile)) != EOF && + while ((c = __getc_unlocked(cfile)) != EOF && (c == '\n' || c == '\t' || c == ' ' || c == ',')) continue; if (c == EOF) return (0); cp = tokval; if (c == '"') { - while ((c = getc_unlocked(cfile)) != EOF && c != '"') { + while ((c = __getc_unlocked(cfile)) != EOF && c != '"') { if (c == '\\') - c = getc_unlocked(cfile); + c = __getc_unlocked(cfile); *cp++ = c; } } else { *cp++ = c; - while ((c = getc_unlocked(cfile)) != EOF + while ((c = __getc_unlocked(cfile)) != EOF && c != '\n' && c != '\t' && c != ' ' && c != ',') { if (c == '\\') - c = getc_unlocked(cfile); + c = __getc_unlocked(cfile); *cp++ = c; } } diff --git a/libc/inet/rpc/svc_simple.c b/libc/inet/rpc/svc_simple.c index 6b8fe7103..825235450 100644 --- a/libc/inet/rpc/svc_simple.c +++ b/libc/inet/rpc/svc_simple.c @@ -44,6 +44,7 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro"; #define svcudp_create __svcudp_create #define pmap_unset __pmap_unset #define asprintf __asprintf +#define fputs __fputs #define __FORCE_GLIBC #define _GNU_SOURCE @@ -159,7 +160,7 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l) if (svc_sendreply (transp_l, (xdrproc_t)xdr_void, (char *) NULL) == FALSE) { __write (STDERR_FILENO, "xxx\n", 4); - exit (1); + __exit (1); } return; } @@ -184,7 +185,7 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l) (void) asprintf (&buf, _("trouble replying to prog %d\n"), pl->p_prognum); - exit (1); + __exit (1); } /* free the decoded arguments */ (void) svc_freeargs (transp_l, pl->p_inproc, xdrbuf); @@ -198,5 +199,5 @@ universal (struct svc_req *rqstp, SVCXPRT *transp_l) #endif fputs (buf, stderr); free (buf); - exit (1); + __exit (1); } diff --git a/libc/inet/rpc/svc_tcp.c b/libc/inet/rpc/svc_tcp.c index 1972bcf99..35040e278 100644 --- a/libc/inet/rpc/svc_tcp.c +++ b/libc/inet/rpc/svc_tcp.c @@ -55,6 +55,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro"; #define poll __poll #define accept __accept #define listen __listen +#define fputs __fputs #define __FORCE_GLIBC #define _GNU_SOURCE diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c index 62719ee33..55afba52d 100644 --- a/libc/inet/rpc/svc_udp.c +++ b/libc/inet/rpc/svc_udp.c @@ -52,6 +52,7 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro"; #define sendto __sendto #define recvmsg __recvmsg #define sendmsg __sendmsg +#define fputs __fputs #define __FORCE_GLIBC #define _GNU_SOURCE diff --git a/libc/inet/rpc/svc_unix.c b/libc/inet/rpc/svc_unix.c index 95a65ad1f..0ec09bdb5 100644 --- a/libc/inet/rpc/svc_unix.c +++ b/libc/inet/rpc/svc_unix.c @@ -55,6 +55,7 @@ #define poll __poll #define accept __accept #define listen __listen +#define fputs __fputs #define __FORCE_GLIBC #include <features.h> diff --git a/libc/inet/rpc/xdr.c b/libc/inet/rpc/xdr.c index 12315fdb5..1474c1e08 100644 --- a/libc/inet/rpc/xdr.c +++ b/libc/inet/rpc/xdr.c @@ -41,6 +41,8 @@ static char sccsid[] = "@(#)xdr.c 1.35 87/08/12"; * xdr. */ +#define fputs __fputs + #define __FORCE_GLIBC #define _GNU_SOURCE #include <features.h> diff --git a/libc/inet/rpc/xdr_array.c b/libc/inet/rpc/xdr_array.c index a4e50fa8d..5432a5d01 100644 --- a/libc/inet/rpc/xdr_array.c +++ b/libc/inet/rpc/xdr_array.c @@ -41,6 +41,7 @@ static char sccsid[] = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro"; */ #define xdr_u_int __xdr_u_int +#define fputs __fputs #define __FORCE_GLIBC #define _GNU_SOURCE diff --git a/libc/inet/rpc/xdr_rec.c b/libc/inet/rpc/xdr_rec.c index a19438489..15381a6cc 100644 --- a/libc/inet/rpc/xdr_rec.c +++ b/libc/inet/rpc/xdr_rec.c @@ -44,6 +44,8 @@ * The other 31 bits encode the byte length of the fragment. */ +#define fputs __fputs + #define __FORCE_GLIBC #define _GNU_SOURCE #include <features.h> diff --git a/libc/inet/rpc/xdr_reference.c b/libc/inet/rpc/xdr_reference.c index 478c8e906..de310b08a 100644 --- a/libc/inet/rpc/xdr_reference.c +++ b/libc/inet/rpc/xdr_reference.c @@ -41,6 +41,7 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI"; */ #define xdr_bool __xdr_bool +#define fputs __fputs #define __FORCE_GLIBC #define _GNU_SOURCE diff --git a/libc/inet/rpc/xdr_stdio.c b/libc/inet/rpc/xdr_stdio.c index fe2a53dd0..a09af3745 100644 --- a/libc/inet/rpc/xdr_stdio.c +++ b/libc/inet/rpc/xdr_stdio.c @@ -41,6 +41,7 @@ #define fwrite __fwrite #define fseek __fseek #define fflush __fflush +#define ftell __ftell #include <rpc/types.h> #include <stdio.h> |