From owner-freebsd-current Mon Nov 26 12:32:54 2001 Delivered-To: freebsd-current@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 1A1A237B416; Mon, 26 Nov 2001 12:32:52 -0800 (PST) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.4) id fAQKWpY21910; Mon, 26 Nov 2001 15:32:51 -0500 (EST) (envelope-from wollman) Date: Mon, 26 Nov 2001 15:32:51 -0500 (EST) From: Garrett Wollman Message-Id: <200111262032.fAQKWpY21910@khavrinen.lcs.mit.edu> To: "Andrew R. Reiter" Cc: freebsd-current@FreeBSD.org Subject: Re: libfetch kqueue patch In-Reply-To: References: <20011126201312.A75451@walton.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: 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