X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 829303858012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1657117436; bh=OyIzMBBgZL6GOIYWuZpX+pdDQVKRHndFc5bJgNm78CA=; h=Date:From:To:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=TSgTawekMnclOiEXj1zBoEUDx1B58EpMeCVu72lkhN0KkWCaq7e5RuBZAfajhXBIt IWZlHM0ehFDTcc/aazMYGn64rWcwZRg+5xx3zuCkQ8Z+g2ZM3kYX9HdtLtvnxHWSxW eLjhxo1MtzbzN+Se8LCSQOVOqGhjWbg7pflzlaV4= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C2CF93858D39 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Date: Wed, 6 Jul 2022 16:22:47 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Typo in ? Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: <1c3256fd-ed7b-8ee3-adcd-b1d8ef2fff84 AT cornell DOT edu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:K8XSiJCaZqpdKAS0YBNG8e0vRTyhKi8GlnvYTN6sH3bfZMa/UyF JHwxi+DrfCg9g9GsqbsLplkoBqaWRN3DZZW1D+OOipI+vOTY/JnjaucloHWJO95IiQqSSME gRvupo36hq7HNJuhP6wjNXw2ujg/crtf4IqQcei4gmuUXuoYchNpFw8xX+EO7KkdYb5xNw/ PHCdLXMs7V/8UhCO2bnLQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:HC0yktORBr4=:yjL/1Oo/Dt2+hCOXuoJLDr fyuhvwmVC7px7mtNcDntTOaVjy7uqPCCIhyDCPoG0/AzbJPWnEVcJDStyymTv07Kqks70Xp5t bO2Ku7qeNn2RzgG89TVCjjptftFN4JNjOuTXrGteSeRLuacFVNwcgSjxZMCS5xiYJr+IZDEau udf1uE6Gy7TdDRI8ZKR9kdTtNxoEzqdKwOE2DmWP5ybSxHLQdSthC5pnGHa6a5cRUmaYL6n8U nXHirDuh86ti5vChwojQRdxk/UeFHNbVqUzQHGNURkproIDdP/ADmNVO7XmEpLHyddKVxsALQ EMt0uU+zL+WYHeZ4rr0QXs+gPMl0/yV9McABPPxG88m2kJqaRin5zv+8o3+11W3rMPpmTU8iA Nmn9MAa+gbJgafUg4ZPhJc0ptRb+fKnM9AEDE9gtvxu9CM75oTa2IMN/v68DfmLGW97AycSpp 2A8J6TQZdHJaU9WUqdzzfBKyGf0z5tKXQbg/C1YYEWhBasm5nbmxUoTQjop1HNHTdH+KD6MVM rRGj4vSC78DJimXsrfztdVkHJ19GWKt3a6l9x9z4W3EMZYls/H56gzgslV1Jro9sNjHhuZi87 UYNeNbhVEGq1am3TsGmut4HojCaOHp9Zroh/ElVrI5yC06PrFqS0sVXocXRxdAjV9sXMNClrM fbXO1c83mazdFSI9bYzOYt698AbaIj9ZL4uXQAQM4/94cxzlq+M8Lr1zQi5DcCqtZ2WFoJF/Y L+/ztSjND6CMwDb+aNdEeFNHYymqpSV2Tqp/PzU1QUPb8TekOz6uB6w5bKo= X-Spam-Status: No, score=-95.0 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_FAIL, SPF_HELO_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Jul 6 16:15, Corinna Vinschen wrote: > On Jul 6 15:01, Jon Turney wrote: > > Remember that 64 is MAXIMUM_WAIT_OBJECTS for WaitForMultipleObjects(), the > > underlying Win32 API used to implement select(), so using more than 64 hits > > some complex code to work around that... > > This isn't what FD_SETSIZE is about. FD_SETSIZE does *NOT* define the > maximum count of fd's in an fd_set. > > It defines the maximum fd number usable in an fd_set. > > So if FD_SETSIZE is defined low enough: > > #define FD_SETSIZE 3 > #include > > /* Only fd's 0, 1, and 2 will be allowed in this fd_set */ > fd_set set; > > FD_ZERO (&set); > /* This will probaly set fd to 3 */ > fd = open ("foo", O_RDONLY); > /* So this will (hopefully) fail */ > FD_SET (fd, &set); Right, this isn't quite how it works, given fd_set is a bitfield using unsigned long as basetype under the hood. This should just outline the idea behind FD_SETSIZE. Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple