Module Name: src
Committed By: christos
Date: Sat Nov 7 00:42:04 UTC 2015
Modified Files:
src/lib/libc/rpc: rpc_commondata.c svc_fdset.c svc_fdset.h
Log Message:
Introduce a binary compatible __fd_set_256 that is what the original fdset
size was for libc. Now we can bump it.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/rpc/rpc_commondata.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/rpc/svc_fdset.c
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/rpc/svc_fdset.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/rpc/rpc_commondata.c
diff -u src/lib/libc/rpc/rpc_commondata.c:1.11 src/lib/libc/rpc/rpc_commondata.c:1.12
--- src/lib/libc/rpc/rpc_commondata.c:1.11 Fri Nov 6 18:11:09 2015
+++ src/lib/libc/rpc/rpc_commondata.c Fri Nov 6 19:42:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: rpc_commondata.c,v 1.11 2015/11/06 23:11:09 christos Exp $ */
+/* $NetBSD: rpc_commondata.c,v 1.12 2015/11/07 00:42:04 christos Exp $ */
/*
* Copyright (c) 2010, Oracle America, Inc.
@@ -38,11 +38,12 @@
#if 0
static char *sccsid = "@(#)rpc_commondata.c 2.1 88/07/29 4.0 RPCSRC";
#else
-__RCSID("$NetBSD: rpc_commondata.c,v 1.11 2015/11/06 23:11:09 christos Exp $");
+__RCSID("$NetBSD: rpc_commondata.c,v 1.12 2015/11/07 00:42:04 christos Exp $");
#endif
#endif
#include <rpc/rpc.h>
+#include "svc_fdset.h"
/*
* This file should only contain common data (global data) that is exported
@@ -50,7 +51,7 @@ __RCSID("$NetBSD: rpc_commondata.c,v 1.1
*/
struct opaque_auth _null_auth;
#undef svc_fdset
-fd_set svc_fdset;
+__fd_set_256 svc_fdset;
#undef svc_maxfd
int svc_maxfd = -1;
#ifndef _REENTRANT
Index: src/lib/libc/rpc/svc_fdset.c
diff -u src/lib/libc/rpc/svc_fdset.c:1.4 src/lib/libc/rpc/svc_fdset.c:1.5
--- src/lib/libc/rpc/svc_fdset.c:1.4 Fri Nov 6 18:11:09 2015
+++ src/lib/libc/rpc/svc_fdset.c Fri Nov 6 19:42:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: svc_fdset.c,v 1.4 2015/11/06 23:11:09 christos Exp $ */
+/* $NetBSD: svc_fdset.c,v 1.5 2015/11/07 00:42:04 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: svc_fdset.c,v 1.4 2015/11/06 23:11:09 christos Exp $");
+__RCSID("$NetBSD: svc_fdset.c,v 1.5 2015/11/07 00:42:04 christos Exp $");
#include "reentrant.h"
@@ -39,12 +39,20 @@ __RCSID("$NetBSD: svc_fdset.c,v 1.4 2015
#include <rpc/rpc.h>
+#ifdef FDSET_DEBUG
+#include <stdio.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <lwp.h>
+#endif
#include <stdlib.h>
#include <string.h>
+#include "svc_fdset.h"
+
#undef svc_fdset
#undef svc_maxfd
-extern fd_set svc_fdset;
+extern __fd_set_256 svc_fdset;
extern int svc_maxfd;
struct svc_fdset {
@@ -59,10 +67,6 @@ static struct svc_fdset __svc_fdset;
static thread_key_t fdsetkey = -2;
#ifdef FDSET_DEBUG
-#include <stdio.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include <lwp.h>
static void __printflike(3, 0)
svc_header(const char *func, size_t line, const char *fmt, va_list ap)
@@ -123,7 +127,7 @@ svc_fdset_sanitize(struct svc_fdset *fds
fds->fdmax--;
/* Compat update */
if (fds == &__svc_fdset) {
- svc_fdset = *__svc_fdset.fdset;
+ svc_fdset = *(__fd_set_256 *)__svc_fdset.fdset;
svc_maxfd = __svc_fdset.fdmax;
}
}
Index: src/lib/libc/rpc/svc_fdset.h
diff -u src/lib/libc/rpc/svc_fdset.h:1.2 src/lib/libc/rpc/svc_fdset.h:1.3
--- src/lib/libc/rpc/svc_fdset.h:1.2 Fri Nov 6 14:34:13 2015
+++ src/lib/libc/rpc/svc_fdset.h Fri Nov 6 19:42:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: svc_fdset.h,v 1.2 2015/11/06 19:34:13 christos Exp $ */
+/* $NetBSD: svc_fdset.h,v 1.3 2015/11/07 00:42:04 christos Exp $ */
# ifdef RUMP_RPC
# include <rump/rump.h>
@@ -16,3 +16,7 @@
# undef select
# define select(a, b, c, d, e) rump_sys_select(a, b, c, d, e)
# endif
+
+typedef struct __fd_set_256 {
+ __fd_mask fds_bits[__NFD_LEN(256)];
+} __fd_set_256;