From 12bed479ec5777392077ac70c0996bbc44bd5a20 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 2 Jul 2005 06:22:14 +0000 Subject: [PATCH] * configure.in: check select_large_fdset. * eval.c: use select_large_fdset to support large file descriptors on Solaris. [ruby-dev:26404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ configure.in | 2 +- eval.c | 10 ++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8c35ea54df..919e1daa12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Jul 2 15:19:41 2005 Tanaka Akira + + * configure.in: check select_large_fdset. + + * eval.c: use select_large_fdset to support large file descriptors + on Solaris. [ruby-dev:26404] + Fri Jul 1 17:55:08 2005 Yukihiro Matsumoto * bignum.c (rb_big_neg): may be accessing bogus pointer value. diff --git a/configure.in b/configure.in index eab3a824ac..2028f89a77 100644 --- a/configure.in +++ b/configure.in @@ -492,7 +492,7 @@ AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall chroot fsync getcwd getpriority getrlimit setrlimit\ dlopen sigprocmask sigaction _setjmp\ setsid telldir seekdir fchmod mktime timegm cosh sinh tanh\ - setuid setgid daemon \ + setuid setgid daemon select_large_fdset \ _UNW_createContextForSelf) AC_ARG_ENABLE(setreuid, [ --enable-setreuid use setreuid()/setregid() according to need even if obsolete.], diff --git a/eval.c b/eval.c index 442b57bdb2..4b946c0e6b 100644 --- a/eval.c +++ b/eval.c @@ -179,6 +179,16 @@ typedef jmp_buf rb_jmpbuf_t; #include #endif +/* + Solaris sys/select.h switches select to select_large_fdset to support larger + file descriptors if FD_SETSIZE is larger than 1024 on 32bit environment. + But Ruby doesn't change FD_SETSIZE because fd_set is allocated dynamically. + So following definition is required to use select_large_fdset. +*/ +#ifdef HAVE_SELECT_LARGE_FDSET +#define select(n, r, w, e, t) select_large_fdset(n, r, w, e, t) +#endif + #ifdef HAVE_SYS_PARAM_H #include #endif