Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/rpc Only do the compat cruft if we are compiling libc.



details:   https://anonhg.NetBSD.org/src/rev/c028f82082cf
branches:  trunk
changeset: 811629:c028f82082cf
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Nov 08 02:46:53 2015 +0000

description:
Only do the compat cruft if we are compiling libc.

diffstat:

 lib/libc/rpc/rpc_commondata.c |  6 ++++--
 lib/libc/rpc/svc_fdset.c      |  8 ++++++--
 lib/libc/rpc/svc_fdset.h      |  4 +++-
 3 files changed, 13 insertions(+), 5 deletions(-)

diffs (91 lines):

diff -r ed343901eecb -r c028f82082cf lib/libc/rpc/rpc_commondata.c
--- a/lib/libc/rpc/rpc_commondata.c     Sun Nov 08 02:45:16 2015 +0000
+++ b/lib/libc/rpc/rpc_commondata.c     Sun Nov 08 02:46:53 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc_commondata.c,v 1.13 2015/11/07 14:21:32 christos Exp $     */
+/*     $NetBSD: rpc_commondata.c,v 1.14 2015/11/08 02:46:53 christos Exp $     */
 
 /*
  * Copyright (c) 2010, Oracle America, Inc.
@@ -36,7 +36,7 @@
 #if 0
 static char *sccsid = "@(#)rpc_commondata.c    2.1 88/07/29 4.0 RPCSRC";
 #else
-__RCSID("$NetBSD: rpc_commondata.c,v 1.13 2015/11/07 14:21:32 christos Exp $");
+__RCSID("$NetBSD: rpc_commondata.c,v 1.14 2015/11/08 02:46:53 christos Exp $");
 #endif
 #endif
 
@@ -48,10 +48,12 @@
  * by public interfaces 
  */
 struct opaque_auth _null_auth;
+#ifdef _LIBC
 #undef svc_fdset
 __fd_set_256 svc_fdset;
 #undef svc_maxfd
 int svc_maxfd = -1;
+#endif
 #ifndef _REENTRANT
 #undef rpc_createerr
 struct rpc_createerr rpc_createerr;
diff -r ed343901eecb -r c028f82082cf lib/libc/rpc/svc_fdset.c
--- a/lib/libc/rpc/svc_fdset.c  Sun Nov 08 02:45:16 2015 +0000
+++ b/lib/libc/rpc/svc_fdset.c  Sun Nov 08 02:46:53 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svc_fdset.c,v 1.10 2015/11/07 23:17:09 christos Exp $  */
+/*     $NetBSD: svc_fdset.c,v 1.11 2015/11/08 02:46:53 christos Exp $  */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: svc_fdset.c,v 1.10 2015/11/07 23:17:09 christos Exp $");
+__RCSID("$NetBSD: svc_fdset.c,v 1.11 2015/11/08 02:46:53 christos Exp $");
 
 
 #include "reentrant.h"
@@ -53,7 +53,9 @@
 
 #undef svc_fdset
 #undef svc_maxfd
+#ifdef _LIBC
 extern __fd_set_256 svc_fdset;
+#endif
 extern int svc_maxfd;
 int __svc_flags;
 
@@ -132,11 +134,13 @@
 {
        while (fds->fdmax >= 0 && !FD_ISSET(fds->fdmax, fds->fdset))
                fds->fdmax--;
+#ifdef _LIBC
        /* Compat update */
        if (fds == &__svc_fdset) {
                svc_fdset = *(__fd_set_256 *)__svc_fdset.fdset;
                svc_maxfd = __svc_fdset.fdmax;
        }
+#endif
 }
 
 static void
diff -r ed343901eecb -r c028f82082cf lib/libc/rpc/svc_fdset.h
--- a/lib/libc/rpc/svc_fdset.h  Sun Nov 08 02:45:16 2015 +0000
+++ b/lib/libc/rpc/svc_fdset.h  Sun Nov 08 02:46:53 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: svc_fdset.h,v 1.3 2015/11/07 00:42:04 christos Exp $   */
+/*     $NetBSD: svc_fdset.h,v 1.4 2015/11/08 02:46:53 christos Exp $   */
 
 # ifdef RUMP_RPC
 #  include <rump/rump.h>
@@ -17,6 +17,8 @@
 #  define      select(a, b, c, d, e)   rump_sys_select(a, b, c, d, e)
 # endif
 
+#ifdef _LIBC
 typedef struct __fd_set_256 {
        __fd_mask fds_bits[__NFD_LEN(256)];
 } __fd_set_256;
+#endif



Home | Main Index | Thread Index | Old Index