delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/06/23/06:55:00

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; q=dns; s=default; b=HKUvDT1H/8//7+/xHLzNjMlzlgrTy
PHaocjTLcH0SsnF5gH+kmXv/UkGqGK7jlVRchCP/vwUtVsyyqbqCeRW51wBJXxO6
M8CvsbJmoc5Rp4EizDpvjSoJIYF6eiPZRQKPFjVL2mk40H1tw3dB+x6S9G+A9YF/
eNJyaGxWsg96hE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; s=default; bh=Ffquan21qSPSjxtgdxvX21Efb88=; b=VcN
acwOzt3o3HH9HRCmY1QUIJD5k7evE/PCKtTErxR5bcibVNYr58oPe6BjXAr587I3
IpwlyITlLtdf6CcEzLtPBcqYP0WsuPeZ3BpwOo+bW7J2ntu/fdbhOsfyaeIXxgOd
HhOPLeyLwNtThq58+4//Z45GoWdavSRS+gpgHbI8=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:766, stdout, H*RU:15.01.0523.019, H*f:sk:nkfenq$
X-HELO: na01-bl2-obe.outbound.protection.outlook.com
From: Steven Bardwell <SBardwell AT lbmsys DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: FD_SETSIZE and sizeof(fd_set)
Date: Thu, 23 Jun 2016 10:54:29 +0000
Message-ID: <DM3PR18MB0841BD59B02E2CDAE372F2CCDB2D0@DM3PR18MB0841.namprd18.prod.outlook.com>
References: <DM3PR18MB084148FC4EFA327DA33DB267DB2C0 AT DM3PR18MB0841 DOT namprd18 DOT prod DOT outlook DOT com> <nkf6f4$304$1 AT ger DOT gmane DOT org> <nkfenq$n3h$1 AT ger DOT gmane DOT org>
In-Reply-To: <nkfenq$n3h$1@ger.gmane.org>
authentication-results: spf=none (sender IP is ) smtp.mailfrom=SBardwell AT lbmsys DOT com;
x-ms-office365-filtering-correlation-id: af79ff8b-74b8-4dad-29d8-08d39b54c0a0
x-microsoft-exchange-diagnostics: 1;DM3PR18MB0842;6:WgO1fDJQo3cJ1PMLFoc7EtC3KtDK9luPxPDRXpis4s6bNSpl87tMmcWi+4EXYfqjbjR6rd3VxzCwL1lz5TVQVJ4a6dzgdJ1W0kl3ZbCuM8RIXWZi1DEJVDLWJNQbxMsmNQmRI/QP30m040eIseI8AApHHFxV4xx3mt1ctGJ3IEi2MA0eH/HSC+GgLE2//+LiU01VVmIH8y+i0wMLrD1kpPcGMiqREYmJPE5jXqXc9+gf6sdOTQkjHaHQZ4nTk4CIE6Ln1MGOju3qOjEp26mmQbQRs5R+P82rjMheYrv1Yud9UH8/4f4OzKSHx+IKy9UzkkVu82XUKh6PsndsZH/C0A==;5:eBeyw0a1bd1WcK64rUuDVmgyai8bYHBGGExXvyhIfG5KDvoNcreDR0VYr7CZqoH6Zk7JNX+4GQd/GD8vavtSJvLc4uTKrBYm4debV0u32NallxT7gwsr1yYV55T/AW3vMQxWDz0k3+R4QXd89vxUTw==;24:5w9/t5vg7RYNge98v8s8oLmcVYVR9NcfxazAlyetHCJarlyZhJyUzQlW+IJZvSptc2OB2DsZE7r3/sueamfs783C4AEf5sWpFbEQ/YX2vuw=;7:Ig1jfBaLiWnGbf/qtdSDrZ185sbhFHBI+nutjULt8PZi58ltcwtTGEZMlOpoglAigLfLD8o3386cihnVlsMTcIqUTubZ6JTV/nGQV0atFP6lClXahx2h9l2ng+Yuhz/8W+RQA91TNTLga8yRkLHDvqY+9EiZLXmLWacZiKl3ImtuTJiUA4s/bPpjt+UMft/CphPRX/pGwJW6wRMleJfjYX1g4e5Ee9sfXfEpRQm4t6vtTvK/10bj9c2MdQGZSt032EGYSMCcCW2AFESjLI1nRA==
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM3PR18MB0842;
x-microsoft-antispam-prvs: <DM3PR18MB0842CAAD766941377F2AE8BDDB2D0 AT DM3PR18MB0842 DOT namprd18 DOT prod DOT outlook DOT com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040130)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041072)(6043046);SRVR:DM3PR18MB0842;BCL:0;PCL:0;RULEID:;SRVR:DM3PR18MB0842;
x-forefront-prvs: 098291215C
x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(199003)(189002)(68736007)(8936002)(9686002)(97736004)(80792005)(450100001)(2501003)(7696003)(5003600100003)(7846002)(50986999)(305945005)(7736002)(66066001)(3280700002)(3660700001)(54356999)(5640700001)(101416001)(76176999)(76576001)(5002640100001)(10400500002)(189998001)(77096005)(102836003)(586003)(6116002)(2351001)(86362001)(2950100001)(2900100001)(3846002)(87936001)(81166006)(1730700003)(92566002)(74316001)(33656002)(122556002)(81156014)(107886002)(110136002)(99286002)(106356001)(2906002)(8676002)(105586002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM3PR18MB0842;H:DM3PR18MB0841.namprd18.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en;
received-spf: None (protection.outlook.com: lbmsys.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
MIME-Version: 1.0
X-OriginatorOrg: lbmsys.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2016 10:54:29.6558 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 2cb46dcc-5f81-474e-b16b-96065648dbca
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR18MB0842
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u5NAsufO014420

> >
> > There are (of course) a lot of other included files, and
> > <sys/select.h> is one of them. In my code it comes  AFTER  the
> > redefinition of FD_SETSIZE and <sys/types.h>.  I don't think this
> > could be the issue.
> 
> It is if you are mixing Windows API and Cygwin.
> 
> Just look at sys/select.h and you'll understand.
> --
> René Berber



Here is a "program" that shows the issue I am worried about. It is so simple that I must be overlooking something really obvious:

#include <stdio.h>
#undef FD_SETSIZE
#define FD_SETSIZE 256
#include <sys/types.h>
#include <sys/select.h>

main()
{
        fd_set rfds;
        fprintf(stdout, "FD_SETSIZE=%d\n", FD_SETSIZE);
        fprintf(stdout, "sizeof(fd_set)=%d\n", sizeof(fd_set));
}

Steve Bardwell


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019