diff options
| author | Andreas Jaeger <aj@suse.de> | 2012-05-10 20:16:53 +0200 |
|---|---|---|
| committer | Andreas Jaeger <aj@suse.de> | 2012-05-10 20:19:53 +0200 |
| commit | 021db4be6f1f4189f66feee066a495d49e92b93e (patch) | |
| tree | 38d877e5dcba27bb3495cc840bc14b1a3547a076 /sunrpc | |
| parent | b5c086a2814b45e0b2ab678922fcc66c7351fece (diff) | |
| download | glibc-021db4be6f1f4189f66feee066a495d49e92b93e.tar.xz glibc-021db4be6f1f4189f66feee066a495d49e92b93e.zip | |
Make sunrpc code usable again
New configure option --enable-obsolete-rpc makes the deprecated RPC
headers and functions available at compile time as they were before
version 2.14. This option will be removed at some time in the future
after the TI-RPC library becomes fully sufficient for the needs of
existing applications.
Diffstat (limited to 'sunrpc')
50 files changed, 158 insertions, 152 deletions
diff --git a/sunrpc/Makefile b/sunrpc/Makefile index e61efd02b3..3b79dcdb72 100644 --- a/sunrpc/Makefile +++ b/sunrpc/Makefile @@ -60,6 +60,10 @@ generated-dirs := rpcsvc include ../Makeconfig +ifeq ($(link-obsolete-rpc),yes) +headers += $(headers-in-tirpc) $(headers-not-in-tirpc) +endif + ifeq ($(versioning),yes) need-export-routines := auth_des auth_unix clnt_gen clnt_perr clnt_tcp \ clnt_udp get_myaddr key_call netname pm_getport \ @@ -73,9 +77,11 @@ routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \ svc_simple xdr_float xdr_rec publickey authdes_prot \ des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \ clnt_unix svc_unix create_xid $(need-export-routines) +ifneq ($(link-obsolete-rpc),yes) # We only add the RPC for compatibility to libc.so. shared-only-routines = $(routines) endif +endif # We do not build rpcinfo anymore. It is not needed for a bootstrap # and not wanted on complete systems. diff --git a/sunrpc/auth_des.c b/sunrpc/auth_des.c index 96bbcfc328..0408d60826 100644 --- a/sunrpc/auth_des.c +++ b/sunrpc/auth_des.c @@ -117,7 +117,7 @@ authdes_create (const char *servername, u_int window, #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (authdes_create) #else -libc_hidden_nolink (authdes_create, GLIBC_2_1) +libc_hidden_nolink_sunrpc (authdes_create, GLIBC_2_1) #endif AUTH * @@ -211,7 +211,7 @@ failed: #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (authdes_pk_create) #else -libc_hidden_nolink (authdes_pk_create, GLIBC_2_1) +libc_hidden_nolink_sunrpc (authdes_pk_create, GLIBC_2_1) #endif /* diff --git a/sunrpc/auth_none.c b/sunrpc/auth_none.c index 5f252a9544..3af5966794 100644 --- a/sunrpc/auth_none.c +++ b/sunrpc/auth_none.c @@ -95,7 +95,7 @@ authnone_create (void) __libc_once (authnone_private_guard, authnone_create_once); return &authnone_private.no_client; } -libc_hidden_nolink (authnone_create, GLIBC_2_0) +libc_hidden_nolink_sunrpc (authnone_create, GLIBC_2_0) static bool_t authnone_marshal (AUTH *client, XDR *xdrs) diff --git a/sunrpc/auth_unix.c b/sunrpc/auth_unix.c index d3b5dc7dee..68b42d7b1f 100644 --- a/sunrpc/auth_unix.c +++ b/sunrpc/auth_unix.c @@ -149,7 +149,7 @@ no_memory: marshal_new_auth (auth); return auth; } -libc_hidden_nolink (authunix_create, GLIBC_2_0) +libc_hidden_nolink_sunrpc (authunix_create, GLIBC_2_0) /* * Returns an auth handle with parameters determined by doing lots of @@ -216,7 +216,7 @@ authunix_create_default (void) #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (authunix_create_default) #else -libc_hidden_nolink (authunix_create_default, GLIBC_2_0) +libc_hidden_nolink_sunrpc (authunix_create_default, GLIBC_2_0) #endif /* diff --git a/sunrpc/authdes_prot.c b/sunrpc/authdes_prot.c index 0a25bac143..164c1223ca 100644 --- a/sunrpc/authdes_prot.c +++ b/sunrpc/authdes_prot.c @@ -63,7 +63,7 @@ xdr_authdes_cred (XDR *xdrs, struct authdes_cred *cred) return FALSE; } } -libc_hidden_nolink (xdr_authdes_cred, GLIBC_2_1) +libc_hidden_nolink_sunrpc (xdr_authdes_cred, GLIBC_2_1) bool_t @@ -78,4 +78,4 @@ xdr_authdes_verf (register XDR *xdrs, register struct authdes_verf *verf) sizeof (verf->adv_int_u))); return TRUE; } -libc_hidden_nolink (xdr_authdes_verf, GLIBC_2_1) +libc_hidden_nolink_sunrpc (xdr_authdes_verf, GLIBC_2_1) diff --git a/sunrpc/authuxprot.c b/sunrpc/authuxprot.c index 64da1799e0..d37faee0c7 100644 --- a/sunrpc/authuxprot.c +++ b/sunrpc/authuxprot.c @@ -63,4 +63,4 @@ xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p) } return FALSE; } -libc_hidden_nolink (xdr_authunix_parms, GLIBC_2_0) +libc_hidden_nolink_sunrpc (xdr_authunix_parms, GLIBC_2_0) diff --git a/sunrpc/clnt_gen.c b/sunrpc/clnt_gen.c index 2b7096cf20..df34672d72 100644 --- a/sunrpc/clnt_gen.c +++ b/sunrpc/clnt_gen.c @@ -175,5 +175,5 @@ clnt_create (const char *hostname, u_long prog, u_long vers, #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (clnt_create) #else -libc_hidden_nolink (clnt_create, GLIBC_2_0) +libc_hidden_nolink_sunrpc (clnt_create, GLIBC_2_0) #endif diff --git a/sunrpc/clnt_perr.c b/sunrpc/clnt_perr.c index 175370ebfc..b4f84c92e8 100644 --- a/sunrpc/clnt_perr.c +++ b/sunrpc/clnt_perr.c @@ -127,7 +127,7 @@ clnt_sperror (CLIENT * rpch, const char *msg) return str; } -libc_hidden_nolink (clnt_sperror, GLIBC_2_0) +libc_hidden_nolink_sunrpc (clnt_sperror, GLIBC_2_0) void clnt_perror (CLIENT * rpch, const char *msg) @@ -137,7 +137,7 @@ clnt_perror (CLIENT * rpch, const char *msg) #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (clnt_perror) #else -libc_hidden_nolink (clnt_perror, GLIBC_2_0) +libc_hidden_nolink_sunrpc (clnt_perror, GLIBC_2_0) #endif @@ -270,7 +270,7 @@ clnt_perrno (enum clnt_stat num) #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (clnt_perrno) #else -libc_hidden_nolink (clnt_perrno, GLIBC_2_0) +libc_hidden_nolink_sunrpc (clnt_perrno, GLIBC_2_0) #endif char * @@ -308,7 +308,7 @@ clnt_spcreateerror (const char *msg) return str; } -libc_hidden_nolink (clnt_spcreateerror, GLIBC_2_0) +libc_hidden_nolink_sunrpc (clnt_spcreateerror, GLIBC_2_0) void clnt_pcreateerror (const char *msg) @@ -318,7 +318,7 @@ clnt_pcreateerror (const char *msg) #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (clnt_pcreateerror) #else -libc_hidden_nolink (clnt_pcreateerror, GLIBC_2_0) +libc_hidden_nolink_sunrpc (clnt_pcreateerror, GLIBC_2_0) #endif struct auth_errtab diff --git a/sunrpc/clnt_raw.c b/sunrpc/clnt_raw.c index 95e3eae988..4004c6b6a8 100644 --- a/sunrpc/clnt_raw.c +++ b/sunrpc/clnt_raw.c @@ -129,7 +129,7 @@ clntraw_create (u_long prog, u_long vers) client->cl_auth = authnone_create (); return client; } -libc_hidden_nolink (clntraw_create, GLIBC_2_0) +libc_hidden_nolink_sunrpc (clntraw_create, GLIBC_2_0) static enum clnt_stat clntraw_call (h, proc, xargs, argsp, xresults, resultsp, timeout) diff --git a/sunrpc/clnt_simp.c b/sunrpc/clnt_simp.c index d2dd3b307a..d612df09a0 100644 --- a/sunrpc/clnt_simp.c +++ b/sunrpc/clnt_simp.c @@ -139,7 +139,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum, crp->valid = 0; return (int) clnt_stat; } -libc_hidden_nolink (callrpc, GLIBC_2_0) +libc_hidden_nolink_sunrpc (callrpc, GLIBC_2_0) #ifdef _RPC_THREAD_SAFE_ void diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c index d1fc43dbfd..6bd4c8c0cd 100644 --- a/sunrpc/clnt_tcp.c +++ b/sunrpc/clnt_tcp.c @@ -220,7 +220,7 @@ fooy: #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (clnttcp_create) #else -libc_hidden_nolink (clnttcp_create, GLIBC_2_0) +libc_hidden_nolink_sunrpc (clnttcp_create, GLIBC_2_0) #endif static enum clnt_stat diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index 294e13a58c..7ecf2ef5a5 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -239,7 +239,7 @@ fooy: #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (__libc_clntudp_bufcreate) #else -libc_hidden_nolink (__libc_clntudp_bufcreate, GLIBC_PRIVATE) +libc_hidden_nolink_sunrpc (__libc_clntudp_bufcreate, GLIBC_PRIVATE) #endif CLIENT * @@ -250,7 +250,7 @@ clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, return __libc_clntudp_bufcreate (raddr, program, version, wait, sockp, sendsz, recvsz, 0); } -libc_hidden_nolink (clntudp_bufcreate, GLIBC_2_0) +libc_hidden_nolink_sunrpc (clntudp_bufcreate, GLIBC_2_0) CLIENT * clntudp_create (raddr, program, version, wait, sockp) @@ -266,7 +266,7 @@ clntudp_create (raddr, program, version, wait, sockp) #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (clntudp_create) #else -libc_hidden_nolink (clntudp_create, GLIBC_2_0) +libc_hidden_nolink_sunrpc (clntudp_create, GLIBC_2_0) #endif static int diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c index 282127bb8b..776ceab484 100644 --- a/sunrpc/clnt_unix.c +++ b/sunrpc/clnt_unix.c @@ -200,7 +200,7 @@ fooy: mem_free ((caddr_t) h, sizeof (CLIENT)); return (CLIENT *) NULL; } -libc_hidden_nolink (clntunix_create, GLIBC_2_1) +libc_hidden_nolink_sunrpc (clntunix_create, GLIBC_2_1) static enum clnt_stat clntunix_call (h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout) diff --git a/sunrpc/des_crypt.c b/sunrpc/des_crypt.c index 8745900b82..22a34b7f3a 100644 --- a/sunrpc/des_crypt.c +++ b/sunrpc/des_crypt.c @@ -102,7 +102,7 @@ cbc_crypt (char *key, char *buf, unsigned int len, unsigned int mode, COPY8 (dp.des_ivec, ivec); return err; } -libc_hidden_nolink (cbc_crypt, GLIBC_2_1) +libc_hidden_nolink_sunrpc (cbc_crypt, GLIBC_2_1) /* * ECB mode encryption @@ -115,4 +115,4 @@ ecb_crypt (char *key, char *buf, unsigned int len, unsigned int mode) dp.des_mode = ECB; return common_crypt (key, buf, len, mode, &dp); } -libc_hidden_nolink (ecb_crypt, GLIBC_2_1) +libc_hidden_nolink_sunrpc (ecb_crypt, GLIBC_2_1) diff --git a/sunrpc/des_soft.c b/sunrpc/des_soft.c index 27d918c64d..cddef5d76b 100644 --- a/sunrpc/des_soft.c +++ b/sunrpc/des_soft.c @@ -70,4 +70,4 @@ des_setparity (char *p) p++; } } -libc_hidden_nolink (des_setparity, GLIBC_2_1) +libc_hidden_nolink_sunrpc (des_setparity, GLIBC_2_1) diff --git a/sunrpc/get_myaddr.c b/sunrpc/get_myaddr.c index def5b7a74a..24407b53ec 100644 --- a/sunrpc/get_myaddr.c +++ b/sunrpc/get_myaddr.c @@ -99,5 +99,5 @@ get_myaddress (struct sockaddr_in *addr) #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (get_myaddress) #else -libc_hidden_nolink (get_myaddress, GLIBC_2_0) +libc_hidden_nolink_sunrpc (get_myaddress, GLIBC_2_0) #endif diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c index 6d08bf8e80..e0a076b47f 100644 --- a/sunrpc/key_call.c +++ b/sunrpc/key_call.c @@ -80,7 +80,7 @@ key_setsecret (char *secretkey) } return 0; } -libc_hidden_nolink (key_setsecret, GLIBC_2_1) +libc_hidden_nolink_sunrpc (key_setsecret, GLIBC_2_1) /* key_secretkey_is_set() returns 1 if the keyserver has a secret key * stored for the caller's effective uid; it returns 0 otherwise @@ -109,7 +109,7 @@ key_secretkey_is_set (void) #ifdef EXPORT_RPC_SYMBOLS libc_hidden_def (key_secretkey_is_set) #else -libc_hidden_nolink (key_secretkey_is_set, GLIBC_2_1) +libc_hidden_nolink_sunrpc (key_secretkey_is_set, GLIBC_2_1) #endif int @@ -133,7 +133,7 @@ key_encryptsession (char *remote |
