From: Jarkko Hietaniemi Date: Fri, 16 Oct 1998 15:24:45 +0000 (+0300) Subject: commented version of a patch suggested by Drago Goricanec X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f2da832e840f54013cb015f86420ceda75823b28;p=p5sagit%2Fp5-mst-13.2.git commented version of a patch suggested by Drago Goricanec Message-ID: Subject: Re: [PATCH 5.005_52] Linux select fails with more than 32 FDs p4raw-id: //depot/perl@2056 --- diff --git a/pp_sys.c b/pp_sys.c index 4439b1c..1cd1cda 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -868,7 +868,12 @@ PP(pp_sselect) /* little endians can use vecs directly */ #if BYTEORDER == 0x1234 || BYTEORDER == 0x12345678 # if SELECT_MIN_BITS > 1 - growsize = SELECT_MIN_BITS / 8; + /* If SELECT_MIN_BITS is greater than one we most probably will want + * to align the sizes with SELECT_MIN_BITS/8 because for example + * in many little-endian (Intel, Alpha) systems (Linux, OS/2, Digital + * UNIX, Solaris, NeXT) the smallest quantum select() operates on + * (sets bit) is 32 bits. */ + growsize = maxlen + (SELECT_MIN_BITS/8 - (maxlen % (SELECT_MIN_BITS/8))); # else growsize = sizeof(fd_set); # endif