summaryrefslogtreecommitdiff
path: root/libc/inet/rpc
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
commitaf0172162f7c653cad6a11ed1c1a5459bc154465 (patch)
tree70031dad1e7286d58762da7b9e3d3f93d043c278 /libc/inet/rpc
parentc8609543a9a8bf6559c2931dbbef6b3c41b3fbf2 (diff)
hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed
Diffstat (limited to 'libc/inet/rpc')
-rw-r--r--libc/inet/rpc/auth_none.c13
-rw-r--r--libc/inet/rpc/auth_unix.c50
-rw-r--r--libc/inet/rpc/authunix_prot.c18
-rw-r--r--libc/inet/rpc/bindresvport.c17
-rw-r--r--libc/inet/rpc/clnt_generic.c30
-rw-r--r--libc/inet/rpc/clnt_perror.c101
-rw-r--r--libc/inet/rpc/clnt_raw.c19
-rw-r--r--libc/inet/rpc/clnt_simple.c18
-rw-r--r--libc/inet/rpc/clnt_tcp.c64
-rw-r--r--libc/inet/rpc/clnt_udp.c79
-rw-r--r--libc/inet/rpc/clnt_unix.c71
-rw-r--r--libc/inet/rpc/create_xid.c8
-rw-r--r--libc/inet/rpc/get_myaddress.c28
-rw-r--r--libc/inet/rpc/getrpcent.c96
-rw-r--r--libc/inet/rpc/getrpcport.c9
-rw-r--r--libc/inet/rpc/pmap_clnt.c53
-rw-r--r--libc/inet/rpc/pmap_getmaps.c6
-rw-r--r--libc/inet/rpc/pmap_getport.c15
-rw-r--r--libc/inet/rpc/pmap_prot.c3
-rw-r--r--libc/inet/rpc/pmap_prot2.c5
-rw-r--r--libc/inet/rpc/pmap_rmt.c74
-rw-r--r--libc/inet/rpc/rcmd.c159
-rw-r--r--libc/inet/rpc/rexec.c95
-rw-r--r--libc/inet/rpc/rpc_callmsg.c28
-rw-r--r--libc/inet/rpc/rpc_dtablesize.c11
-rw-r--r--libc/inet/rpc/rpc_private.h5
-rw-r--r--libc/inet/rpc/rpc_prot.c52
-rw-r--r--libc/inet/rpc/rpc_thread.c48
-rw-r--r--libc/inet/rpc/rtime.c19
-rw-r--r--libc/inet/rpc/ruserpass.c123
-rw-r--r--libc/inet/rpc/svc.c131
-rw-r--r--libc/inet/rpc/svc_auth.c7
-rw-r--r--libc/inet/rpc/svc_auth_unix.c12
-rw-r--r--libc/inet/rpc/svc_raw.c8
-rw-r--r--libc/inet/rpc/svc_run.c16
-rw-r--r--libc/inet/rpc/svc_simple.c34
-rw-r--r--libc/inet/rpc/svc_tcp.c59
-rw-r--r--libc/inet/rpc/svc_udp.c78
-rw-r--r--libc/inet/rpc/svc_unix.c72
-rw-r--r--libc/inet/rpc/xdr.c137
-rw-r--r--libc/inet/rpc/xdr_array.c19
-rw-r--r--libc/inet/rpc/xdr_mem.c13
-rw-r--r--libc/inet/rpc/xdr_rec.c43
-rw-r--r--libc/inet/rpc/xdr_reference.c21
-rw-r--r--libc/inet/rpc/xdr_stdio.c12
45 files changed, 1092 insertions, 887 deletions
diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c
index cb30c40a7..06f65904a 100644
--- a/libc/inet/rpc/auth_none.c
+++ b/libc/inet/rpc/auth_none.c
@@ -35,13 +35,13 @@
* credentials and verifiers to remote systems.
*/
-#define xdrmem_create __xdrmem_create
-#define xdr_opaque_auth __xdr_opaque_auth
-
#define __FORCE_GLIBC
#include <features.h>
#include "rpc_private.h"
+libc_hidden_proto(xdrmem_create)
+libc_hidden_proto(xdr_opaque_auth)
+
#define MAX_MARSHEL_SIZE 20
/*
@@ -72,8 +72,8 @@ struct authnone_private_s {
static struct authnone_private_s *authnone_private;
#endif
-AUTH attribute_hidden *
-__authnone_create (void)
+AUTH *
+authnone_create (void)
{
struct authnone_private_s *ap;
XDR xdr_stream;
@@ -101,7 +101,8 @@ __authnone_create (void)
}
return (&ap->no_client);
}
-strong_alias(__authnone_create,authnone_create)
+libc_hidden_proto(authnone_create)
+libc_hidden_def(authnone_create)
/*ARGSUSED */
static bool_t
diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c
index bb14df068..dffdc6fad 100644
--- a/libc/inet/rpc/auth_unix.c
+++ b/libc/inet/rpc/auth_unix.c
@@ -38,17 +38,6 @@
* for the credentials.
*/
-#define sysconf __sysconf
-#define getegid __getegid
-#define geteuid __geteuid
-#define getgroups __getgroups
-#define gethostname __gethostname
-#define xdrmem_create __xdrmem_create
-#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>
@@ -67,6 +56,23 @@
# include <wchar.h>
#endif
+libc_hidden_proto(memcpy)
+libc_hidden_proto(sysconf)
+libc_hidden_proto(getegid)
+libc_hidden_proto(geteuid)
+libc_hidden_proto(getgroups)
+libc_hidden_proto(gethostname)
+libc_hidden_proto(xdrmem_create)
+libc_hidden_proto(xdr_authunix_parms)
+libc_hidden_proto(xdr_opaque_auth)
+libc_hidden_proto(gettimeofday)
+libc_hidden_proto(fputs)
+libc_hidden_proto(perror)
+libc_hidden_proto(abort)
+#ifdef USE_IN_LIBIO
+libc_hidden_proto(fwprintf)
+#endif
+
/*
* Unix authenticator operations vector
*/
@@ -103,8 +109,8 @@ static bool_t marshal_new_auth (AUTH *) internal_function;
* Create a unix style authenticator.
* Returns an auth handle with the given stuff in it.
*/
-AUTH attribute_hidden *
-__authunix_create (char *machname, uid_t uid, gid_t gid, int len,
+AUTH *
+authunix_create (char *machname, uid_t uid, gid_t gid, int len,
gid_t *aup_gids)
{
struct authunix_parms aup;
@@ -124,7 +130,7 @@ __authunix_create (char *machname, uid_t uid, gid_t gid, int len,
no_memory:
#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
- (void) __fwprintf (stderr, L"%s",
+ (void) fwprintf (stderr, L"%s",
_("authunix_create: out of memory\n"));
else
#endif
@@ -160,7 +166,7 @@ no_memory:
au->au_origcred.oa_base = mem_alloc ((u_int) len);
if (au->au_origcred.oa_base == NULL)
goto no_memory;
- __memcpy(au->au_origcred.oa_base, mymem, (u_int) len);
+ memcpy(au->au_origcred.oa_base, mymem, (u_int) len);
/*
* set auth handle to reflect new cred.
@@ -169,14 +175,15 @@ no_memory:
marshal_new_auth (auth);
return auth;
}
-strong_alias(__authunix_create,authunix_create)
+libc_hidden_proto(authunix_create)
+libc_hidden_def(authunix_create)
/*
* Returns an auth handle with parameters determined by doing lots of
* syscalls.
*/
-AUTH attribute_hidden *
-__authunix_create_default (void)
+AUTH *
+authunix_create_default (void)
{
int len;
char machname[MAX_MACHINE_NAME + 1];
@@ -203,12 +210,13 @@ __authunix_create_default (void)
/* This braindamaged Sun code forces us here to truncate the
list of groups to NGRPS members since the code in
authuxprot.c transforms a fixed array. Grrr. */
- ret_auth = __authunix_create (machname, uid, gid, MIN (NGRPS, len), gids);
+ ret_auth = authunix_create (machname, uid, gid, MIN (NGRPS, len), gids);
if (gids)
free (gids);
return ret_auth;
}
-strong_alias(__authunix_create_default,authunix_create_default)
+libc_hidden_proto(authunix_create_default)
+libc_hidden_def(authunix_create_default)
/*
* authunix operations
@@ -338,7 +346,7 @@ marshal_new_auth (AUTH *auth)
xdrmem_create (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);
if ((!xdr_opaque_auth (xdrs, &(auth->ah_cred))) ||
(!xdr_opaque_auth (xdrs, &(auth->ah_verf))))
- __perror (_("auth_none.c - Fatal marshalling problem"));
+ perror (_("auth_none.c - Fatal marshalling problem"));
else
au->au_mpos = XDR_GETPOS (xdrs);
diff --git a/libc/inet/rpc/authunix_prot.c b/libc/inet/rpc/authunix_prot.c
index 32da3256d..1587b5688 100644
--- a/libc/inet/rpc/authunix_prot.c
+++ b/libc/inet/rpc/authunix_prot.c
@@ -34,22 +34,23 @@
* XDR for UNIX style authentication parameters for RPC
*/
-#define xdr_string __xdr_string
-#define xdr_u_int __xdr_u_int
-#define xdr_array __xdr_array
-#define xdr_u_long __xdr_u_long
-
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <rpc/auth.h>
#include <rpc/auth_unix.h>
+libc_hidden_proto(xdr_string)
+libc_hidden_def(xdr_string)
+libc_hidden_proto(xdr_u_int)
+libc_hidden_proto(xdr_array)
+libc_hidden_proto(xdr_u_long)
+
/*
* XDR for unix authentication parameters.
* Unfortunately, none of these can be declared const.
*/
-bool_t attribute_hidden
-__xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
+bool_t
+xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
{
if (xdr_u_long (xdrs, &(p->aup_time))
&& xdr_string (xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
@@ -68,4 +69,5 @@ __xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
}
return FALSE;
}
-strong_alias(__xdr_authunix_parms,xdr_authunix_parms)
+libc_hidden_proto(xdr_authunix_parms)
+libc_hidden_def(xdr_authunix_parms)
diff --git a/libc/inet/rpc/bindresvport.c b/libc/inet/rpc/bindresvport.c
index 530df52b3..68b44d26a 100644
--- a/libc/inet/rpc/bindresvport.c
+++ b/libc/inet/rpc/bindresvport.c
@@ -30,8 +30,6 @@
* Copyright (c) 1987 by Sun Microsystems, Inc.
*/
-#define bind __bind
-
#define __FORCE_GLIBC
#include <features.h>
@@ -42,11 +40,15 @@
#include <sys/socket.h>
#include <netinet/in.h>
+libc_hidden_proto(memset)
+libc_hidden_proto(bind)
+libc_hidden_proto(getpid)
+
/*
* Bind a socket to a privileged IP port
*/
-int attribute_hidden
-__bindresvport (int sd, struct sockaddr_in *sin)
+int
+bindresvport (int sd, struct sockaddr_in *sin)
{
int res;
static short port;
@@ -60,7 +62,7 @@ __bindresvport (int sd, struct sockaddr_in *sin)
if (sin == (struct sockaddr_in *) 0)
{
sin = &myaddr;
- __memset (sin, 0, sizeof (*sin));
+ memset (sin, 0, sizeof (*sin));
sin->sin_family = AF_INET;
}
else if (sin->sin_family != AF_INET)
@@ -71,7 +73,7 @@ __bindresvport (int sd, struct sockaddr_in *sin)
if (port == 0)
{
- port = (__getpid () % NPORTS) + STARTPORT;
+ port = (getpid () % NPORTS) + STARTPORT;
}
res = -1;
__set_errno (EADDRINUSE);
@@ -88,4 +90,5 @@ __bindresvport (int sd, struct sockaddr_in *sin)
return res;
}
-strong_alias(__bindresvport,bindresvport)
+libc_hidden_proto(bindresvport)
+libc_hidden_def(bindresvport)
diff --git a/libc/inet/rpc/clnt_generic.c b/libc/inet/rpc/clnt_generic.c
index cfd357f63..899a9dd0e 100644
--- a/libc/inet/rpc/clnt_generic.c
+++ b/libc/inet/rpc/clnt_generic.c
@@ -30,12 +30,6 @@
* Copyright (C) 1987, Sun Microsystems, Inc.
*/
-#define clnttcp_create __clnttcp_create
-#define clntudp_create __clntudp_create
-#define clntunix_create __clntunix_create
-#define getprotobyname_r __getprotobyname_r
-#define gethostbyname_r __gethostbyname_r
-
#define __FORCE_GLIBC
#include <features.h>
@@ -46,10 +40,16 @@
#include <sys/socket.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 ())
+libc_hidden_proto(memcpy)
+libc_hidden_proto(memset)
+libc_hidden_proto(strcmp)
+libc_hidden_proto(strcpy)
+libc_hidden_proto(clnttcp_create)
+libc_hidden_proto(clntudp_create)
+libc_hidden_proto(clntunix_create)
+libc_hidden_proto(getprotobyname_r)
+libc_hidden_proto(gethostbyname_r)
+libc_hidden_proto(__rpc_thread_createerr)
/*
* Generic client creation: takes (hostname, program-number, protocol) and
@@ -73,11 +73,11 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
CLIENT *client;
int herr;
- if (__strcmp (proto, "unix") == 0)
+ if (strcmp (proto, "unix") == 0)
{
- __memset ((char *)&sun, 0, sizeof (sun));
+ memset ((char *)&sun, 0, sizeof (sun));
sun.sun_family = AF_UNIX;
- __strcpy (sun.sun_path, hostname);
+ strcpy (sun.sun_path, hostname);
sock = RPC_ANYSOCK;
client = clntunix_create (&sun, prog, vers, &sock, 0, 0);
if (client == NULL)
@@ -122,8 +122,8 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
}
sin.sin_family = h->h_addrtype;
sin.sin_port = 0;
- __memset (sin.sin_zero, 0, sizeof (sin.sin_zero));
- __memcpy ((char *) &sin.sin_addr, h->h_addr, h->h_length);
+ memset (sin.sin_zero, 0, sizeof (sin.sin_zero));
+ memcpy ((char *) &sin.sin_addr, h->h_addr, h->h_length);
prtbuflen = 1024;
prttmpbuf = alloca (prtbuflen);
diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c
index eba539c95..c01390598 100644
--- a/libc/inet/rpc/clnt_perror.c
+++ b/libc/inet/rpc/clnt_perror.c
@@ -38,8 +38,6 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";
*
*/
-#define fputs __fputs
-
#define __FORCE_GLIBC
#include <features.h>
@@ -53,6 +51,15 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";
# define fputs(s, f) _IO_fputs (s, f)
#endif
+libc_hidden_proto(strcpy)
+libc_hidden_proto(strlen)
+libc_hidden_proto(sprintf)
+libc_hidden_proto(__glibc_strerror_r)
+libc_hidden_proto(fputs)
+#ifdef USE_IN_LIBIO
+libc_hidden_proto(fwprintf)
+#endif
+
static char *auth_errmsg (enum auth_stat stat) internal_function;
#ifdef __UCLIBC_HAS_THREADS__
@@ -179,8 +186,8 @@ static const struct rpc_errtab rpc_errlist[] =
/*
* This interface for use by clntrpc
*/
-char attribute_hidden *
-__clnt_sperrno (enum clnt_stat stat)
+char *
+clnt_sperrno (enum clnt_stat stat)
{
size_t i;
@@ -193,24 +200,25 @@ __clnt_sperrno (enum clnt_stat stat)
}
return _("RPC: (unknown error code)");
}
-strong_alias(__clnt_sperrno,clnt_sperrno)
+libc_hidden_proto(clnt_sperrno)
+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));
+ (void) fwprintf (stderr, L"%s", clnt_sperrno (num));
else
#endif
- (void) fputs (__clnt_sperrno (num), stderr);
+ (void) fputs (clnt_sperrno (num), stderr);
}
/*
* Print reply error info
*/
-char attribute_hidden *
-__clnt_sperror (CLIENT * rpch, const char *msg)
+char *
+clnt_sperror (CLIENT * rpch, const char *msg)
{
char chrbuf[1024];
struct rpc_err e;
@@ -223,11 +231,11 @@ __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));
- str += __strlen(str);
+ (void) strcpy(str, clnt_sperrno(e.re_status));
+ str += strlen(str);
switch (e.re_status)
{
@@ -248,43 +256,43 @@ __clnt_sperror (CLIENT * rpch, const char *msg)
case RPC_CANTSEND:
case RPC_CANTRECV:
- __glibc_strerror_r_internal (e.re_errno, chrbuf, sizeof chrbuf);
- len = __sprintf (str, "; errno = %s", chrbuf);
+ __glibc_strerror_r (e.re_errno, chrbuf, sizeof 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;
case RPC_AUTHERROR:
err = auth_errmsg (e.re_why);
- (void) __strcpy(str, _("; why = "));
- str += __strlen(str);
+ (void) strcpy(str, _("; why = "));
+ str += strlen(str);
if (err != NULL)
{
- (void) __strcpy(str, err);
- str += __strlen(str);
+ (void) strcpy(str, err);
+ str += strlen(str);
}
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;
}
@@ -292,22 +300,24 @@ __clnt_sperror (CLIENT * rpch, const char *msg)
*++str = '\0';
return (strstart);
}
-strong_alias(__clnt_sperror,clnt_sperror)
+libc_hidden_proto(clnt_sperror)
+libc_hidden_def(clnt_sperror)
-void attribute_hidden
-__clnt_perror (CLIENT * rpch, const char *msg)
+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));
+ (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);
}
-strong_alias(__clnt_perror,clnt_perror)
+libc_hidden_proto(clnt_perror)
+libc_hidden_def(clnt_perror)
-char attribute_hidden *
-__clnt_spcreateerror (const char *msg)
+char *
+clnt_spcreateerror (const char *msg)
{
char chrbuf[1024];
char *str = _buf ();
@@ -318,29 +328,29 @@ __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);
+ (void) strcpy(cp, clnt_sperrno (ce->cf_stat));
+ cp += strlen(cp);
switch (ce->cf_stat)
{
case RPC_PMAPFAILURE:
- (void) __strcpy(cp, " - ");
- cp += __strlen(cp);
+ (void) strcpy(cp, " - ");
+ cp += strlen(cp);
- (void) __strcpy(cp, __clnt_sperrno (ce->cf_error.re_status));
- cp += __strlen(cp);
+ (void) strcpy(cp, clnt_sperrno (ce->cf_error.re_status));
+ cp += strlen(cp);
break;
case RPC_SYSTEMERROR:
- (void) __strcpy(cp, " - ");
- cp += __strlen(cp);
+ (void) strcpy(cp, " - ");
+ cp += strlen(cp);
- __glibc_strerror_r_internal (ce->cf_error.re_errno, chrbuf, sizeof chrbuf);
- (void) __strcpy(cp, chrbuf);
- cp += __strlen(cp);
+ __glibc_strerror_r (ce->cf_error.re_errno, chrbuf, sizeof chrbuf);
+ (void) strcpy(cp, chrbuf);
+ cp += strlen(cp);
break;
default:
break;
@@ -349,17 +359,18 @@ __clnt_spcreateerror (const char *msg)
*++cp = '\0';
return str;
}
-strong_alias(__clnt_spcreateerror,clnt_spcreateerror)
+libc_hidden_proto(clnt_spcreateerror)
+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));
+ (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_raw.c b/libc/inet/rpc/clnt_raw.c
index 37b99ecb1..b44bd38b8 100644
--- a/libc/inet/rpc/clnt_raw.c
+++ b/libc/inet/rpc/clnt_raw.c
@@ -42,20 +42,21 @@ static char sccsid[] = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";
* any interference from the kernel.
*/
-#define authnone_create __authnone_create
-#define xdrmem_create __xdrmem_create
-#define xdr_callhdr __xdr_callhdr
-#define xdr_replymsg __xdr_replymsg
-#define xdr_opaque_auth __xdr_opaque_auth
-#define svc_getreq __svc_getreq
-#define _seterr_reply __seterr_reply
-
#define __FORCE_GLIBC
#include <features.h>
#include "rpc_private.h"
#include <rpc/svc.h>
#include <rpc/xdr.h>
+libc_hidden_proto(perror)
+libc_hidden_proto(authnone_create)
+libc_hidden_proto(xdrmem_create)
+libc_hidden_proto(xdr_callhdr)
+libc_hidden_proto(xdr_replymsg)
+libc_hidden_proto(xdr_opaque_auth)
+libc_hidden_proto(svc_getreq)
+libc_hidden_proto(_seterr_reply)
+
#define MCALL_MSG_SIZE 24
/*
@@ -121,7 +122,7 @@ clntraw_create (u_long prog, u_long vers)
xdrmem_create (xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
if (!xdr_callhdr (xdrs, &call_msg))
{
- __perror (_ ("clnt_raw.c - Fatal header serialization error."));
+ perror (_ ("clnt_raw.c - Fatal header serialization error."));
}
clp->mcnt = XDR_GETPOS (xdrs);
XDR_DESTROY (xdrs);
diff --git a/libc/inet/rpc/clnt_simple.c b/libc/inet/rpc/clnt_simple.c
index 7c17dc1f1..f9f18f3d4 100644
--- a/libc/inet/rpc/clnt_simple.c
+++ b/libc/inet/rpc/clnt_simple.c
@@ -38,9 +38,6 @@ static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
-#define clntudp_create __clntudp_create
-#define gethostbyname_r __gethostbyname_r
-
#define __FORCE_GLIBC
#include <features.h>
@@ -53,6 +50,13 @@ static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";
#include <netdb.h>
#include <string.h>
+libc_hidden_proto(memcpy)
+libc_hidden_proto(strcmp)
+libc_hidden_proto(strncpy)
+libc_hidden_proto(close)
+libc_hidden_proto(clntudp_create)
+libc_hidden_proto(gethostbyname_r)
+
struct callrpc_private_s
{
CLIENT *client;
@@ -90,7 +94,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
crp->socket = RPC_ANYSOCK;
}
if (crp->valid && crp->oldprognum == prognum && crp->oldversnum == versnum
- && __strcmp (crp->oldhost, host) == 0)
+ && strcmp (crp->oldhost, host) == 0)
{
/* reuse old client */
}
@@ -103,7 +107,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
crp->valid = 0;
if (crp->socket != RPC_ANYSOCK)
{
- (void) __close (crp->socket);
+ (void) close (crp->socket);
crp->socket = RPC_ANYSOCK;
}
if (crp->client)
@@ -128,7 +132,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
timeout.tv_usec = 0;
timeout.tv_sec = 5;
- __memcpy ((char *) &server_addr.sin_addr, hp->h_addr, hp->h_length);
+ memcpy ((char *) &server_addr.sin_addr, hp->h_addr, hp->h_length);
server_addr.sin_family = AF_INET;
server_addr.sin_port = 0;
if ((crp->client = clntudp_create (&server_addr, (u_long) prognum,
@@ -137,7 +141,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
crp->valid = 1;
crp->oldprognum = prognum;
crp->oldversnum = versnum;
- (void) __strncpy (crp->oldhost, host, 255);
+ (void) strncpy (crp->oldhost, host, 255);
crp->oldhost[255] = '\0';
}
tottimeout.tv_sec = 25;
diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c
index 8dcb4682a..8837062c9 100644
--- a/libc/inet/rpc/clnt_tcp.c
+++ b/libc/inet/rpc/clnt_tcp.c
@@ -50,21 +50,6 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
* Now go hang yourself.
*/
-#define authnone_create __authnone_create
-#define xdrrec_create __xdrrec_create
-#define xdrrec_endofrecord __xdrrec_endofrecord
-#define xdrrec_skiprecord __xdrrec_skiprecord
-#define xdr_callhdr __xdr_callhdr
-#define xdr_replymsg __xdr_replymsg
-#define xdr_opaque_auth __xdr_opaque_auth
-#define xdrmem_create __xdrmem_create
-#define pmap_getport __pmap_getport
-#define _seterr_reply __seterr_reply
-#define connect __connect
-#define bindresvport __bindresvport
-#define poll __poll
-#define fputs __fputs
-
#define __FORCE_GLIBC
#include <features.h>
@@ -80,12 +65,30 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
# include <wchar.h>
#endif
-extern u_long _create_xid (void) attribute_hidden;
+libc_hidden_proto(socket)
+libc_hidden_proto(read)
+libc_hidden_proto(write)
+libc_hidden_proto(close)
+libc_hidden_proto(authnone_create)
+libc_hidden_proto(xdrrec_create)
+libc_hidden_proto(xdrrec_endofrecord)
+libc_hidden_proto(xdrrec_skiprecord)
+libc_hidden_proto(xdr_callhdr)
+libc_hidden_proto(xdr_replymsg)
+libc_hidden_proto(xdr_opaque_auth)
+libc_hidden_proto(xdrmem_create)
+libc_hidden_proto(pmap_getport)
+libc_hidden_proto(_seterr_reply)
+libc_hidden_proto(connect)
+libc_hidden_proto(bindresvport)
+libc_hidden_proto(poll)
+libc_hidden_proto(fputs)
+