Followup to previous commit; change fd_mask from signed to unsigned as

it should have been to start with.  The implications of that are not
pleasant when combined with >> as it breaks on multiples of NFDBITS.
Right shifting of a signed value fills with a copy of the sign bit,
not a zero.

Reported by:	bde
This commit is contained in:
Peter Wemm 2000-02-20 15:01:37 +00:00
parent 83463004f1
commit 6ecfb1da44

View File

@ -167,7 +167,7 @@ typedef _BSD_TIMER_T_ timer_t;
#define FD_SETSIZE 1024
#endif
typedef long fd_mask;
typedef unsigned long fd_mask;
#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
#ifndef howmany