diff options
author | Marcus Holland-Moritz <mhx-perl@gmx.net> | 2003-08-26 00:02:17 +0200 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-25 19:25:08 +0000 |
commit | ad517f75025ba4de08890f9694f2e535efc32ab4 (patch) | |
tree | 45584bf67c9b3c97d238cc155a9bc8e819bbd510 /pp_sys.c | |
parent | b61e04d6d59d5a9594816ff8471fd03aaebac56d (diff) | |
download | perl-ad517f75025ba4de08890f9694f2e535efc32ab4.tar.gz |
more valgrinding: select problem?
From: "Marcus Holland-Moritz" <mhx-perl@gmx.net>
Message-ID: <008301c36b43$cfe26f10$0c2f1fac@R2D2>
In glibc, just use the __FD_SETSIZE since that's
the size of the buffer (usually 1024 bits, much
more than the selectminbits of 32).
p4raw-id: //depot/perl@20893
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1024,15 +1024,19 @@ PP(pp_sselect) Zero(&fd_sets[0], 4, char*); #endif -# if SELECT_MIN_BITS > 1 +# if SELECT_MIN_BITS == 1 + growsize = sizeof(fd_set); +# else +# if defined(__GLIBC__) && defined(__FD_SETSIZE) +# undef SELECT_MIN_BITS +# define SELECT_MIN_BITS __FD_SETSIZE +# endif /* 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, Darwin) the smallest quantum select() operates * on (sets/tests/clears bits) is 32 bits. */ growsize = maxlen + (SELECT_MIN_BITS/8 - (maxlen % (SELECT_MIN_BITS/8))); -# else - growsize = sizeof(fd_set); # endif sv = SP[4]; |