delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/02/06/17:51:48

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F7483858C2D
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1675723858;
bh=3ELfVIyLzoV9YSYXovYnNHZ9cSANYLczp6b7t/teiy0=;
h=Date:Subject:To:Cc:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=H4MUhh2HQqRr9XrwCwRqjnboAFLGqBOGLZf4FPuM6e9OxcA5gX8sYPGg4vUi8NO/K
MQP/AB85n+HOIAsTxQdi3GgjIDv4cEf2Sf3tP5jLmrrDHfVysXr9iWHp5BfHWr9Eay
D5IE0mguGj2/of3gkQRK0qFudtkXfdPpn2Ky46eE=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2ED5B3858D1E
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=cP+iEl721OHhm+U8972lzvep6EZoCI0I+UfEGnhfoq3FbyGD9ByPUp2m/Xr+Vb1KijktGeu58uLeR+vuJjGhgZigGQ4XEZu6TFT+T5mYkwYRX9WdbwnGfnYdGMtO0oVEoibPoD1DB+z1HafWugr865ZPa+t/ZJ31SaUUVgctPgm00C56Y0O7VgJc3jfoyjR8JOlX1q7IoFy4Dmjf53PtBNqe/8qZNyeoXYjFTXO4VNcZ0nZ4XdJqjmtAC12KwRZii4FBcX8l5kc+eFuGWYnAHrxnDffLnZcc66pzdvAUJvdJhdQDnTuiKRjjLKmH6aLoQPdLzxLpc2oASNcgjBTujQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=pEN83W8MrbYTJOSnK2dl7Cdp/tbi16x6SR4rR95Vb8Q=;
b=aIt/A7NDwaiOUthwgX/hZK7PX3ZYn+gd4Ea4eeFAGLYSGzwySllZ5Eia88ctxK/aGVF/68+Li/68Nsenhc/qBcVy8DEejdixQv1ZrTerLQloJjXDhMcts3imVlEeDm4q4LFM7LEFe7q7T6dVIlBb2Lty3/Tnk1szanMvwOEAwEDnYbEUVvBPH+zkJhPYD/QWAB9GIiOaQeWlszrHaQzS2MX6sHOufspe2qOjpF+o0ylM10esc1hfuHBmdHZ+GMkzDD75XOEM426gQQjQtyCqa6b5heLjABsRGf1kfJA6mzJLZzGVsM+SnN2fOTUi95w686n4IedXctUwwTRVuYztFw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
dkim=none; arc=none
Message-ID: <SA1PR05MB9907A2EC272CDB4EEC51F4BBA4DA9@SA1PR05MB9907.namprd05.prod.outlook.com>
Date: Tue, 7 Feb 2023 06:50:07 +0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Subject: Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin
To: gs-cygwin DOT com AT gluelogic DOT com
Cc: cygwin AT cygwin DOT com
References: <PH0PR05MB991811F96A93962E56F6DCC0A4DA9 AT PH0PR05MB9918 DOT namprd05 DOT prod DOT outlook DOT com>
<Y+FjUILtLFxXFVL5 AT xps13>
<PH0PR05MB9918AF2713B83F72042577ACA4DA9 AT PH0PR05MB9918 DOT namprd05 DOT prod DOT outlook DOT com>
<Y+FqT9AbejDHsg7h AT xps13>
In-Reply-To: <Y+FqT9AbejDHsg7h@xps13>
X-TMN: [rlZjhg8Hx2delRUc17fldkKkIU7f0ziF]
X-ClientProxiedBy: SG2PR01CA0194.apcprd01.prod.exchangelabs.com
(2603:1096:4:189::22) To SA1PR05MB9907.namprd05.prod.outlook.com
(2603:10b6:806:337::13)
X-Microsoft-Original-Message-ID: <c905819d-93ac-34dc-4efb-a8041a1ac7c7 AT hotmail DOT com>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: SA1PR05MB9907:EE_|PH7PR05MB9778:EE_
X-MS-Office365-Filtering-Correlation-Id: 8fb6936f-6587-43e1-c8ac-08db08948275
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: P1Ek2px+4nOXoZCOvd1bJYBinazzk+S6M2ZJigeLwxmgPFg5QgdYOOqAA39MYsNkjhg+ln5J05SO4rovyik/Id10hOE/LjVWNUNuLxG8rOhdqGMvSE4WQu+EFMriDHsXnRtmu/EZEXoDRi3OkC4afT43xbs3Vk+fTNROmLyj98tgLMKq4oMKdycf0HtHoDGvfH6Yx4/trXLPdJCPz7Qn062IJ/biKE0igZRYJTV5b51nbxLgKzPEYaGwEvzynCFMy+2DV975vyfJQOxGDub+IoY/fp6dIjKUMiZyy0BDKt4SBCYC+mgdAoQ99RflzYJ47wPaZN2RLNHZFTm4TiCU6aFCgNJuz9FoUH37arsl1TomO2sE1vhYGtNNV1cGSAW7qqlbF9ivxRGdv6RFv1AV7+42YMPpFydxYWzLs+DSrsxw+Dc+uVJOJemEr0RmxB370KGrwL7n1/OWU4gutti033Xs2DCS4rNrwX72+qUC0WLO2EpPynebHtke1bWMqcoRNZOwhmEURMOxIRMv+PIOlK94y4rbstSC+6O09cblWZQFhdIc6+LME6Zhf+QHcu2Av7asVa4Fxyc+Jr3xyvGUebbENfkJe5ynyroDsO7agKv8ys/1XA2LxI+hB07wY5f0L5OLmgwhUbYbt6hVeXafEjGKZuCamAW4jGy2+ksQHxYQClJS3HmaV9eG26g6swABsLyu70DnePODPdN3IzG/lA==
X-MS-Exchange-AntiSpam-MessageData-ChunkC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aVA2UldlbFUwRUViQlJRPT0=?=
X-OriginatorOrg: sct-15-20-4823-7-msonline-outlook-84f76.templateTenant
X-MS-Exchange-CrossTenant-Network-Message-Id: 8fb6936f-6587-43e1-c8ac-08db08948275
X-MS-Exchange-CrossTenant-AuthSource: SA1PR05MB9907.namprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2023 22:50:14.5755 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR05MB9778
X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_00, BODY_8BITS,
DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_MUA_MOZILLA,
FREEMAIL_FROM, HTML_MESSAGE, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.6
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Yeo Kai Wei via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Yeo Kai Wei <yeokaiwei AT hotmail DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 316MpNCc006762

On 7/2/2023 4:59 am, gs-cygwin DOT com AT gluelogic DOT com wrote:
> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote:
>> Hi All,
>>
>> Thanks for the help.
>>
>> I tried adding "#include <sys/select.h>".
>>
>> However, this is the error message that was returned to me.
>>
>> $ gcc -o selectStdIn selectStdIn.c
>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory
>>   #include <sys/select.h>
>>
>> Thank you.
>>
>> On 7/2/2023 4:30 am,gs-cygwin DOT com AT gluelogic DOT com  wrote:
>>> On Tue, Feb 07, 2023 at 04:25:22AM +0800, Yeo Kai Wei via Cygwin wrote:
>>>> Hi,
>>>>
>>>> I would like to report an issue with Cygwin 3.4.2 on Windows.
>>>>
>>>> It doesn't seem to be able to work with  fd_set, FD_ZERO, FD_SET, FD_SETSIZE
>>>> macros.
>>>>
>>>> The code is in italics. The filename was selectStdIn.c. The terminal command
>>>> used was "gcc -o selectStdIn selectStdIn.c"
>>>>
>>>> Thank you.
>>>>
>>>> /
>>>> /
>>>>
>>>> /CODE
>>>> /
>>>>
>>>> /#include <stdio.h>//
>>>> //#include <stdlib.h>//
>>>> //#include <sys/time.h>//
>>>> //#include <unistd.h>//
>>>> / /
>>>> //void main()//
>>>> //{//
>>>> //    fd_set fds; //set of file descriptors//
>>>> / /
>>>> //    struct timeval tv;//
>>>> / /
>>>> //    int flag;//
>>>> / /
>>>> //    char byte;//
>>>> / /
>>>> //    FD_ZERO(&fds);//
>>>> / /
>>>> //    FD_SET(0, &fds);//
>>>> / /
>>>> //    tv.tv_sec = 5;//
>>>> / /
>>>> //    tv.tv_usec = 0;//
>>>> / /
>>>> //    flag = select(FD_SETSIZE, //
>>>> //            &fds,//
>>>> //            NULL,//
>>>> //            NULL,//
>>>> //            &tv);//
>>>> / /
>>>> //    if(-1 == flag)//
>>>> //        perror("select error");//
>>>> //    else if(flag)//
>>>> //    {//
>>>> //        read(0,&byte,1);//
>>>> / /
>>>> //        puts("data read");//
>>>> //    }//
>>>> / /
>>>> //    if(flag)//
>>>> //        printf("The byte value is %c\n", byte);//
>>>> ////
>>>> //}/
>>>>
>>>>
>>>> TERMINAL COMMANDS
>>>>
>>>> $ gcc -o selectStdIn selectStdIn.c
>>>> selectStdIn.c: In function 'main':
>>>> selectStdIn.c:8:2: error: unknown type name 'fd_set'; did you mean 'fpos_t'?
>>>>     fd_set fds; //set of file descriptors
>>>>     ^~~~~~
>>>>     fpos_t
>>>> selectStdIn.c:16:2: warning: implicit declaration of function 'FD_ZERO'
>>>> [-Wimpli
>>>> cit-function-declaration]
>>>>     FD_ZERO(&fds);
>>>>     ^~~~~~~
>>>> selectStdIn.c:18:2: warning: implicit declaration of function 'FD_SET'
>>>> [-Wimplic
>>>> it-function-declaration]
>>>>     FD_SET(0, &fds);
>>>>     ^~~~~~
>>>> selectStdIn.c:24:9: warning: implicit declaration of function 'select'; did
>>>> you
>>>> mean 'sleep'? [-Wimplicit-function-declaration]
>>>>     flag = select(FD_SETSIZE,
>>>>            ^~~~~~
>>>>            sleep
>>>> selectStdIn.c:24:16: error: 'FD_SETSIZE' undeclared (first use in this
>>>> function)
>>>>     flag = select(FD_SETSIZE,
>>>>                   ^~~~~~~~~~
>>>> selectStdIn.c:24:16: note: each undeclared identifier is reported only once
>>>> for
>>>> each function it appears in
>>> $ man select
>>>
>>> #include <sys/select.h>
> Please post at bottom of messages on this mailing list.
>
> You need to install the cygwin-devel package to get <sys/select.h>
>
> Cheers, Glenn

Hi All,

Thanks for the help.

Is this the correct link?

https://www.cygwin.com/packages/summary/cygwin-devel.html

I assume I should download the following

3.4.5-1 	310 KiB 	2023-01-19 19:25 	[list of files 
<https://www.cygwin.com/packages/x86_64/cygwin-devel/cygwin-devel-3.4.5-1>] 
	stable


Thank you very much.


Kind Regards,

YEO Kai Wei


-- 
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

- Raw text -


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