Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/fs/common/nfsrpc Do symbol renaming for these bits as ...



details:   https://anonhg.NetBSD.org/src/rev/7c7ce1d8417e
branches:  trunk
changeset: 757786:7c7ce1d8417e
user:      he <he%NetBSD.org@localhost>
date:      Thu Sep 23 09:38:14 2010 +0000

description:
Do symbol renaming for these bits as well, so that we don't get
link-time errors caused by conflicts with normal user-space libraries
when we link statically.

The tests still pass for i386 after this set of changes, and this now
builds for sun2 (after a few more changes).

diffstat:

 tests/fs/common/nfsrpc/clnt_bcast.c  |   9 ++++++-
 tests/fs/common/nfsrpc/namespace.h   |  38 +++++++++++++++++++++++++++++++++++-
 tests/fs/common/nfsrpc/rpc_generic.c |   9 ++++++-
 tests/fs/common/nfsrpc/rpcb_clnt.c   |  12 +++++++++-
 tests/fs/common/nfsrpc/svc.c         |  25 +++++++++++++++++++++-
 tests/fs/common/nfsrpc/svc_dg.c      |   8 +++++-
 tests/fs/common/nfsrpc/svc_vc.c      |   9 ++++++-
 7 files changed, 97 insertions(+), 13 deletions(-)

diffs (248 lines):

diff -r 13f7744c1a4b -r 7c7ce1d8417e tests/fs/common/nfsrpc/clnt_bcast.c
--- a/tests/fs/common/nfsrpc/clnt_bcast.c       Thu Sep 23 07:31:10 2010 +0000
+++ b/tests/fs/common/nfsrpc/clnt_bcast.c       Thu Sep 23 09:38:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clnt_bcast.c,v 1.1 2010/07/26 15:56:45 pooka Exp $     */
+/*     $NetBSD: clnt_bcast.c,v 1.2 2010/09/23 09:38:14 he Exp $        */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)clnt_bcast.c 1.15 89/04/21 Copyr 1988 Sun Micro";
 #else
-__RCSID("$NetBSD: clnt_bcast.c,v 1.1 2010/07/26 15:56:45 pooka Exp $");
+__RCSID("$NetBSD: clnt_bcast.c,v 1.2 2010/09/23 09:38:14 he Exp $");
 #endif
 #endif
 
@@ -113,6 +113,11 @@
  * also here it will get two responses ... inefficient and clumsy.
  */
 
+#ifdef __weak_alias
+__weak_alias(rpc_broadcast_exp,_rpc_broadcast_exp)
+__weak_alias(rpc_broadcast,_rpc_broadcast)
+#endif
+
 struct broadif {
        int index;
        struct sockaddr_storage broadaddr;
diff -r 13f7744c1a4b -r 7c7ce1d8417e tests/fs/common/nfsrpc/namespace.h
--- a/tests/fs/common/nfsrpc/namespace.h        Thu Sep 23 07:31:10 2010 +0000
+++ b/tests/fs/common/nfsrpc/namespace.h        Thu Sep 23 09:38:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: namespace.h,v 1.1 2010/07/26 15:56:45 pooka Exp $      */
+/*     $NetBSD: namespace.h,v 1.2 2010/09/23 09:38:14 he Exp $ */
 
 /*-
  * Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -52,4 +52,40 @@
 #define svcraw_lock            __rpc_svcraw_lock
 #define xprtlist_lock          __rpc_xprtlist_lock
 
+/* NFS server stuff */
+#define svc_dg_create          _svc_dg_create
+
+#define rpc_broadcast          _rpc_broadcast
+#define rpc_broadcast_exp      _rpc_broadcast_exp
+
+#define svc_fd_create          _svc_fd_create
+#define svc_vc_create          _svc_vc_create
+#define svc_getreq              _svc_getreq
+#define svc_getreqset           _svc_getreqset
+#define svc_getreq_common       _svc_getreq_common
+#define svc_register            _svc_register
+#define svc_reg                 _svc_reg
+#define svc_unreg               _svc_unreg
+#define svc_sendreply           _svc_sendreply
+#define svc_unregister          _svc_unregister
+#define svcerr_auth             _svcerr_auth
+#define svcerr_decode           _svcerr_decode
+#define svcerr_noproc           _svcerr_noproc
+#define svcerr_noprog           _svcerr_noprog
+#define svcerr_progvers         _svcerr_progvers
+#define svcerr_systemerr        _svcerr_systemerr
+#define svcerr_weakauth         _svcerr_weakauth
+#define xprt_register           _xprt_register
+#define xprt_unregister         _xprt_unregister
+#define rpc_control             _rpc_control
+
+#define taddr2uaddr            _taddr2uaddr
+#define uaddr2taddr            _uaddr2taddr
+
+#define rpcb_set               _rpcb_set
+#define rpcb_unset             _rpcb_unset
+#define rpcb_getmaps           _rpcb_getmaps
+#define rpcb_taddr2uaddr       _rpcb_taddr2uaddr
+#define rpcb_uaddr2taddr       _rpcb_uaddr2taddr
+
 #endif /* _NAMESPACE_H_ */
diff -r 13f7744c1a4b -r 7c7ce1d8417e tests/fs/common/nfsrpc/rpc_generic.c
--- a/tests/fs/common/nfsrpc/rpc_generic.c      Thu Sep 23 07:31:10 2010 +0000
+++ b/tests/fs/common/nfsrpc/rpc_generic.c      Thu Sep 23 09:38:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc_generic.c,v 1.1 2010/07/26 15:56:45 pooka Exp $    */
+/*     $NetBSD: rpc_generic.c,v 1.2 2010/09/23 09:38:14 he Exp $       */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -41,7 +41,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: rpc_generic.c,v 1.1 2010/07/26 15:56:45 pooka Exp $");
+__RCSID("$NetBSD: rpc_generic.c,v 1.2 2010/09/23 09:38:14 he Exp $");
 #endif
 
 #include "namespace.h"
@@ -69,6 +69,11 @@
 #include <rump/rump.h>
 #include <rump/rump_syscalls.h>
 
+#ifdef __weak_alias
+__weak_alias(taddr2uaddr,_taddr2uaddr)
+__weak_alias(uaddr2taddr,_uaddr2taddr)
+#endif
+
 struct handle {
        NCONF_HANDLE *nhandle;
        int nflag;              /* Whether NETPATH or NETCONFIG */
diff -r 13f7744c1a4b -r 7c7ce1d8417e tests/fs/common/nfsrpc/rpcb_clnt.c
--- a/tests/fs/common/nfsrpc/rpcb_clnt.c        Thu Sep 23 07:31:10 2010 +0000
+++ b/tests/fs/common/nfsrpc/rpcb_clnt.c        Thu Sep 23 09:38:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpcb_clnt.c,v 1.1 2010/07/26 15:56:45 pooka Exp $      */
+/*     $NetBSD: rpcb_clnt.c,v 1.2 2010/09/23 09:38:14 he Exp $ */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)rpcb_clnt.c 1.30 89/06/21 Copyr 1988 Sun Micro";
 #else
-__RCSID("$NetBSD: rpcb_clnt.c,v 1.1 2010/07/26 15:56:45 pooka Exp $");
+__RCSID("$NetBSD: rpcb_clnt.c,v 1.2 2010/09/23 09:38:14 he Exp $");
 #endif
 #endif
 
@@ -78,6 +78,14 @@
 
 #include "rpc_internal.h"
 
+#ifdef __weak_alias
+__weak_alias(rpcb_set,_rpcb_set)
+__weak_alias(rpcb_unset,_rpcb_unset)
+__weak_alias(rpcb_getmaps,_rpcb_getmaps)
+__weak_alias(rpcb_taddr2uaddr,_rpcb_taddr2uaddr)
+__weak_alias(rpcb_uaddr2taddr,_rpcb_uaddr2taddr)
+#endif
+
 static struct timeval tottimeout = { 60, 0 };
 static const struct timeval rmttimeout = { 3, 0 };
 
diff -r 13f7744c1a4b -r 7c7ce1d8417e tests/fs/common/nfsrpc/svc.c
--- a/tests/fs/common/nfsrpc/svc.c      Thu Sep 23 07:31:10 2010 +0000
+++ b/tests/fs/common/nfsrpc/svc.c      Thu Sep 23 09:38:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svc.c,v 1.3 2010/07/26 18:51:02 pooka Exp $    */
+/*     $NetBSD: svc.c,v 1.4 2010/09/23 09:38:14 he Exp $       */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
 static char *sccsid = "@(#)svc.c 1.44 88/02/08 Copyr 1984 Sun Micro";
 static char *sccsid = "@(#)svc.c       2.4 88/08/11 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: svc.c,v 1.3 2010/07/26 18:51:02 pooka Exp $");
+__RCSID("$NetBSD: svc.c,v 1.4 2010/09/23 09:38:14 he Exp $");
 #endif
 #endif
 
@@ -67,6 +67,27 @@
 #include "rpc_internal.h"
 #include "svc_fdset.h"
 
+#ifdef __weak_alias
+__weak_alias(svc_getreq,_svc_getreq)
+__weak_alias(svc_getreqset,_svc_getreqset)
+__weak_alias(svc_getreq_common,_svc_getreq_common)
+__weak_alias(svc_register,_svc_register)
+__weak_alias(svc_reg,_svc_reg)
+__weak_alias(svc_unreg,_svc_unreg)
+__weak_alias(svc_sendreply,_svc_sendreply)
+__weak_alias(svc_unregister,_svc_unregister)
+__weak_alias(svcerr_auth,_svcerr_auth)
+__weak_alias(svcerr_decode,_svcerr_decode)
+__weak_alias(svcerr_noproc,_svcerr_noproc)
+__weak_alias(svcerr_noprog,_svcerr_noprog)
+__weak_alias(svcerr_progvers,_svcerr_progvers)
+__weak_alias(svcerr_systemerr,_svcerr_systemerr)
+__weak_alias(svcerr_weakauth,_svcerr_weakauth)
+__weak_alias(xprt_register,_xprt_register)
+__weak_alias(xprt_unregister,_xprt_unregister)
+__weak_alias(rpc_control,_rpc_control)
+#endif
+
 SVCXPRT **__svc_xports;
 int __svc_maxrec;
 
diff -r 13f7744c1a4b -r 7c7ce1d8417e tests/fs/common/nfsrpc/svc_dg.c
--- a/tests/fs/common/nfsrpc/svc_dg.c   Thu Sep 23 07:31:10 2010 +0000
+++ b/tests/fs/common/nfsrpc/svc_dg.c   Thu Sep 23 09:38:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svc_dg.c,v 1.1 2010/07/26 15:56:45 pooka Exp $ */
+/*     $NetBSD: svc_dg.c,v 1.2 2010/09/23 09:38:14 he Exp $    */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -44,7 +44,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: svc_dg.c,v 1.1 2010/07/26 15:56:45 pooka Exp $");
+__RCSID("$NetBSD: svc_dg.c,v 1.2 2010/09/23 09:38:14 he Exp $");
 #endif
 
 #include "namespace.h"
@@ -73,6 +73,10 @@
 #define        su_data(xprt)   ((struct svc_dg_data *)(xprt->xp_p2))
 #define        rpc_buffer(xprt) ((xprt)->xp_p1)
 
+#ifdef __weak_alias
+__weak_alias(svc_dg_create,_svc_dg_create)
+#endif
+
 #ifndef MAX
 #define        MAX(a, b)       (((a) > (b)) ? (a) : (b))
 #endif
diff -r 13f7744c1a4b -r 7c7ce1d8417e tests/fs/common/nfsrpc/svc_vc.c
--- a/tests/fs/common/nfsrpc/svc_vc.c   Thu Sep 23 07:31:10 2010 +0000
+++ b/tests/fs/common/nfsrpc/svc_vc.c   Thu Sep 23 09:38:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svc_vc.c,v 1.2 2010/07/26 18:47:36 pooka Exp $ */
+/*     $NetBSD: svc_vc.c,v 1.3 2010/09/23 09:38:14 he Exp $    */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,7 @@
 static char *sccsid = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
 static char *sccsid = "@(#)svc_tcp.c   2.2 88/08/01 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: svc_vc.c,v 1.2 2010/07/26 18:47:36 pooka Exp $");
+__RCSID("$NetBSD: svc_vc.c,v 1.3 2010/09/23 09:38:14 he Exp $");
 #endif
 #endif
 
@@ -74,6 +74,11 @@
 #include "rpc_internal.h"
 #include "svc_fdset.h"
 
+#ifdef __weak_alias
+__weak_alias(svc_fd_create,_svc_fd_create)
+__weak_alias(svc_vc_create,_svc_vc_create)
+#endif
+
 #ifdef _REENTRANT
 extern rwlock_t svc_fd_lock;
 #endif



Home | Main Index | Thread Index | Old Index