search for: __nfdbits

Displaying 3 results from an estimated 3 matches for "__nfdbits".

Did you mean: __nbits
2000 Sep 12
0
OpenSSH 2.2.0p1 port to QNX 4
...* LIBWRAP */ + #if defined(__QNX__) && !defined(__QNXNTO__) + /* Define some things not available under QNX */ + + /* from Linux's <sys/param.h> */ + #ifndef howmany + # define howmany(x, y) (((x)+((y)-1))/(y)) + #endif /* !howmany */ + /* from the Linux kernel */ + //#define __NFDBITS (8 * sizeof(unsigned long)) /* results in 32 under QNX and Linux (A.S.) */ + + /* from Linux's <bits/types.h> */ + /* One element in the file descriptor mask array. */ + typedef unsigned long int __fd_mask; + /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ + #d...
2003 May 17
0
opensshd fd_set definition problem
...t *fdset; ...snip... fdsetsz = howmany(maxfd+1, NFDBITS) * sizeof(fd_mask); fdset = (fd_set *)xmalloc(fdsetsz); ...snip... ret = select(maxfd+1, fdset, NULL, NULL, NULL); My question is why don't you use: fdsetsz = sizeof( fd_set ); The 2.4.20 Linux kernel defines fd_set like this: #define __NFDBITS (8 * sizeof(unsigned long)) #define __FD_SETSIZE 1024 #define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS) typedef struct { uns...
2012 Sep 25
1
[PATCH] Fix <sys/time.h> for Linux 3.5.1
...FD_SETSIZE is defined. --- usr/include/sys/time.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr/include/sys/time.h b/usr/include/sys/time.h index 7a2f8b9..178a4c6 100644 --- a/usr/include/sys/time.h +++ b/usr/include/sys/time.h @@ -15,6 +15,8 @@ double-underscore ones, except __NFDBITS, __FD_SETSIZE and __FDSET_LONGS which are defined in <linux/posix_types.h>. + From 3.5.1, <linux/time.h> does not even define FD_ZERO etc. + Unfortunately, some architectures define the double-underscore ones as inlines, so we can't use a simple #ifdef test. Thus, t...