Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2001 15:32:51 -0500 (EST)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        "Andrew R. Reiter" <arr@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: libfetch kqueue patch
Message-ID:  <200111262032.fAQKWpY21910@khavrinen.lcs.mit.edu>
In-Reply-To: <Pine.NEB.3.96L.1011126152347.97819A-100000@fledge.watson.org>
References:  <20011126201312.A75451@walton.maths.tcd.ie> <Pine.NEB.3.96L.1011126152347.97819A-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Mon, 26 Nov 2001 15:27:45 -0500 (EST), "Andrew R. Reiter" <arr@FreeBSD.org> said:

> As from OpenBSD (in shorter form):

> 	fd_set *fds = calloc(howmany(fd+1, NFDBITS), sizeof(fd_mask));

But this is not portable.  The application is not allowed to assume
anything about the structure of an fd_set, or the existence of a type
`fd_mask', or the existence of a macro `howmany' (which is actually
prohibited).  The only portable (in the sense of officially
standardized) interface that doesn't suffer from this problem is
poll().

-GAWollman


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111262032.fAQKWpY21910>