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