* [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin @ 2023-02-06 20:25 Yeo Kai Wei 2023-02-06 20:30 ` gs-cygwin.com 2023-02-06 20:31 ` Eliot Moss 0 siblings, 2 replies; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-06 20:25 UTC (permalink / raw) To: cygwin [-- Attachment #1: Type: text/plain, Size: 2125 bytes --] 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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 20:25 [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin Yeo Kai Wei @ 2023-02-06 20:30 ` gs-cygwin.com 2023-02-06 20:33 ` Yeo Kai Wei 2023-02-06 20:31 ` Eliot Moss 1 sibling, 1 reply; 25+ messages in thread From: gs-cygwin.com @ 2023-02-06 20:30 UTC (permalink / raw) To: Yeo Kai Wei; +Cc: cygwin 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> ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 20:30 ` gs-cygwin.com @ 2023-02-06 20:33 ` Yeo Kai Wei 2023-02-06 20:59 ` gs-cygwin.com 0 siblings, 1 reply; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-06 20:33 UTC (permalink / raw) To: gs-cygwin.com; +Cc: cygwin 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.com@gluelogic.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> ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 20:33 ` Yeo Kai Wei @ 2023-02-06 20:59 ` gs-cygwin.com 2023-02-06 22:50 ` Yeo Kai Wei 2023-02-06 23:03 ` Yeo Kai Wei 0 siblings, 2 replies; 25+ messages in thread From: gs-cygwin.com @ 2023-02-06 20:59 UTC (permalink / raw) To: Yeo Kai Wei; +Cc: cygwin 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.com@gluelogic.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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 20:59 ` gs-cygwin.com @ 2023-02-06 22:50 ` Yeo Kai Wei 2023-02-06 23:03 ` Yeo Kai Wei 1 sibling, 0 replies; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-06 22:50 UTC (permalink / raw) To: gs-cygwin.com; +Cc: cygwin [-- Attachment #1: Type: text/plain, Size: 3703 bytes --] On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.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.com@gluelogic.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 ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 20:59 ` gs-cygwin.com 2023-02-06 22:50 ` Yeo Kai Wei @ 2023-02-06 23:03 ` Yeo Kai Wei 2023-02-06 23:19 ` gs-cygwin.com 2023-02-06 23:27 ` Eliot Moss 1 sibling, 2 replies; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-06 23:03 UTC (permalink / raw) To: gs-cygwin.com; +Cc: cygwin On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.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.com@gluelogic.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, I updated Cygwin to 3.4.5-1.x86_64. $ uname -a CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin However, the same problem occurs. Cygwn-devel doesn't seem to work. $ gcc -o selectStdIn selectStdIn.c selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory #include <sys/select.h> ^~~~~~~~~~~~~~ compilation terminated. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 23:03 ` Yeo Kai Wei @ 2023-02-06 23:19 ` gs-cygwin.com 2023-02-06 23:27 ` Eliot Moss 1 sibling, 0 replies; 25+ messages in thread From: gs-cygwin.com @ 2023-02-06 23:19 UTC (permalink / raw) To: Yeo Kai Wei; +Cc: cygwin On Tue, Feb 07, 2023 at 07:03:23AM +0800, Yeo Kai Wei wrote: > > On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.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.com@gluelogic.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, > > I updated Cygwin to 3.4.5-1.x86_64. > > $ uname -a > CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC > x86_64 Cygwin > > > However, the same problem occurs. > > Cygwn-devel doesn't seem to work. > > $ gcc -o selectStdIn selectStdIn.c > selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory > #include <sys/select.h> > ^~~~~~~~~~~~~~ > compilation terminated. https://www.cygwin.com/packages/x86_64/cygwin-devel/cygwin-devel-3.4.5-1 /usr/include/sys/select.h is included in the cygwin-devel package. Did you install the cygwin-devel package? Does /usr/include/sys/select.h exist in your cygwin environment? Perhaps you accidentally have multiple cygwin installations on your system and you installed cygwin-devel into a different location? Since you did not have the cygwin-devel package installed on your system, you are likely very new to developing on cygwin. You also seem to be very new to cygwin and installing cygwin packages. You may want to spend more time reading the available documentation on how to use cygwin and develop on cygwin, as you seem to be having trouble with some very elementary steps. https://www.cygwin.com/ The documentation is very good. Please read through it. (This is my way of saying I won't be responding further to this thread.) Cheers, Glenn ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 23:03 ` Yeo Kai Wei 2023-02-06 23:19 ` gs-cygwin.com @ 2023-02-06 23:27 ` Eliot Moss 2023-02-06 23:48 ` Yeo Kai Wei 2023-02-07 0:34 ` Yeo Kai Wei 1 sibling, 2 replies; 25+ messages in thread From: Eliot Moss @ 2023-02-06 23:27 UTC (permalink / raw) To: Yeo Kai Wei, gs-cygwin.com; +Cc: cygwin On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: > > On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: > I updated Cygwin to 3.4.5-1.x86_64. > > $ uname -a > CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin > > > However, the same problem occurs. > > Cygwn-devel doesn't seem to work. > > $ gcc -o selectStdIn selectStdIn.c > selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory > #include <sys/select.h> > ^~~~~~~~~~~~~~ > compilation terminated. Well, on my system cygcheck -f /usr/include/sys/select.h clearly says that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled cygwin-devel ? You do have to select the package explicitly, too. EM ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 23:27 ` Eliot Moss @ 2023-02-06 23:48 ` Yeo Kai Wei 2023-02-06 23:50 ` Eliot Moss 2023-02-07 0:34 ` Yeo Kai Wei 1 sibling, 1 reply; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-06 23:48 UTC (permalink / raw) To: moss, gs-cygwin.com; +Cc: cygwin On 7/2/2023 7:27 am, Eliot Moss wrote: > On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >> >> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: > >> I updated Cygwin to 3.4.5-1.x86_64. >> >> $ uname -a >> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 >> UTC x86_64 Cygwin >> >> >> However, the same problem occurs. >> >> Cygwn-devel doesn't seem to work. >> >> $ gcc -o selectStdIn selectStdIn.c >> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory >> #include <sys/select.h> >> ^~~~~~~~~~~~~~ >> compilation terminated. > > Well, on my system cygcheck -f /usr/include/sys/select.h clearly says > that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled > cygwin-devel ? You do have to select the package explicitly, too. > > EM Hi Eliot, Thanks for the help. There's probably some error somewhere. I'll just uninstall the whole thing and reinstall from scratch. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 23:48 ` Yeo Kai Wei @ 2023-02-06 23:50 ` Eliot Moss 2023-02-06 23:53 ` Yeo Kai Wei [not found] ` <PH0PR05MB9918F39B0B689DFF52980D11A4DB9@PH0PR05MB9918.namprd05.prod.outlook.com> 0 siblings, 2 replies; 25+ messages in thread From: Eliot Moss @ 2023-02-06 23:50 UTC (permalink / raw) To: Yeo Kai Wei, gs-cygwin.com; +Cc: cygwin On 2/7/2023 10:48 AM, Yeo Kai Wei wrote: > > On 7/2/2023 7:27 am, Eliot Moss wrote: >> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>> >>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: >> >>> I updated Cygwin to 3.4.5-1.x86_64. >>> >>> $ uname -a >>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin >>> >>> >>> However, the same problem occurs. >>> >>> Cygwn-devel doesn't seem to work. >>> >>> $ gcc -o selectStdIn selectStdIn.c >>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory >>> #include <sys/select.h> >>> ^~~~~~~~~~~~~~ >>> compilation terminated. >> >> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says >> that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled >> cygwin-devel ? You do have to select the package explicitly, too. >> >> EM > > > Hi Eliot, > > Thanks for the help. > > There's probably some error somewhere. > > I'll just uninstall the whole thing and reinstall from scratch. Well, sometimes that's best, but between the other responses and mine, I suspect you're not actually selecting and downloading cygwin-devel. It could be problematic if you've installed cygwin in more than one place, perhaps without realizing it ... Pay attention to what the cygwin root directory is for your installation :-) ... Best - EM ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 23:50 ` Eliot Moss @ 2023-02-06 23:53 ` Yeo Kai Wei [not found] ` <PH0PR05MB9918F39B0B689DFF52980D11A4DB9@PH0PR05MB9918.namprd05.prod.outlook.com> 1 sibling, 0 replies; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-06 23:53 UTC (permalink / raw) To: moss, gs-cygwin.com; +Cc: cygwin On 7/2/2023 7:50 am, Eliot Moss wrote: > On 2/7/2023 10:48 AM, Yeo Kai Wei wrote: >> >> On 7/2/2023 7:27 am, Eliot Moss wrote: >>> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>>> >>>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: >>> >>>> I updated Cygwin to 3.4.5-1.x86_64. >>>> >>>> $ uname -a >>>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 >>>> 19:09 UTC x86_64 Cygwin >>>> >>>> >>>> However, the same problem occurs. >>>> >>>> Cygwn-devel doesn't seem to work. >>>> >>>> $ gcc -o selectStdIn selectStdIn.c >>>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or >>>> directory >>>> #include <sys/select.h> >>>> ^~~~~~~~~~~~~~ >>>> compilation terminated. >>> >>> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says >>> that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled >>> cygwin-devel ? You do have to select the package explicitly, too. >>> >>> EM >> >> >> Hi Eliot, >> >> Thanks for the help. >> >> There's probably some error somewhere. >> >> I'll just uninstall the whole thing and reinstall from scratch. > > Well, sometimes that's best, but between the other responses and mine, > I suspect you're not actually selecting and downloading cygwin-devel. > > It could be problematic if you've installed cygwin in more than one > place, perhaps without realizing it ... Pay attention to what the > cygwin root directory is for your installation :-) ... > > Best - EM Hi Eliot, I think I made that mistake. I installed to C:\cygwin but I updated to C:\Desktop. To prevent any issues, I'll just reinstall from scratch. Another reason is that extracting the file.tar.xz files results in some administrator right issues. So, I'll just make sure it's a clean install, no merge errors or missing files. ^ permalink raw reply [flat|nested] 25+ messages in thread
[parent not found: <PH0PR05MB9918F39B0B689DFF52980D11A4DB9@PH0PR05MB9918.namprd05.prod.outlook.com>]
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin [not found] ` <PH0PR05MB9918F39B0B689DFF52980D11A4DB9@PH0PR05MB9918.namprd05.prod.outlook.com> @ 2023-02-07 1:53 ` Eliot Moss 0 siblings, 0 replies; 25+ messages in thread From: Eliot Moss @ 2023-02-07 1:53 UTC (permalink / raw) To: Yeo Kai Wei, gs-cygwin.com; +Cc: cygwin On 2/7/2023 11:21 AM, Yeo Kai Wei wrote: > > On 7/2/2023 7:50 am, Eliot Moss wrote: >> On 2/7/2023 10:48 AM, Yeo Kai Wei wrote: >>> >>> On 7/2/2023 7:27 am, Eliot Moss wrote: >>>> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>>>> >>>>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: What you showed says nothing about which packages you've installed. Do you realize cygwin is not a single thing, but a base library plus a huge collection of packages from which you need to choose? (And don't choose them all - that's huge and unnecessary. You can install things incrementally as you need them.) Best - EM ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 23:27 ` Eliot Moss 2023-02-06 23:48 ` Yeo Kai Wei @ 2023-02-07 0:34 ` Yeo Kai Wei 2023-02-07 1:54 ` Eliot Moss 1 sibling, 1 reply; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-07 0:34 UTC (permalink / raw) To: moss, gs-cygwin.com; +Cc: cygwin On 7/2/2023 7:27 am, Eliot Moss wrote: > On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >> >> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: > >> I updated Cygwin to 3.4.5-1.x86_64. >> >> $ uname -a >> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 >> UTC x86_64 Cygwin >> >> >> However, the same problem occurs. >> >> Cygwn-devel doesn't seem to work. >> >> $ gcc -o selectStdIn selectStdIn.c >> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory >> #include <sys/select.h> >> ^~~~~~~~~~~~~~ >> compilation terminated. > > Well, on my system cygcheck -f /usr/include/sys/select.h clearly says > that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled > cygwin-devel ? You do have to select the package explicitly, too. > > EM Hi Eliot, I just reinstalled Cygwin but I'm unsure of what I missed. I did "cygcheck -f /usr/include/sys/select.h" and it seems to tell me that I do have cygwin-devel-3.4.5-1 Did I miss a step? $ gcc -o selectStdIn selectStdIn.c selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory #include <sys/select.h> ^~~~~~~~~~~~~~ compilation terminated. $ uname -a CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin $ cygcheck -f /usr/include/sys/select.h cygwin-devel-3.4.5-1 ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-07 0:34 ` Yeo Kai Wei @ 2023-02-07 1:54 ` Eliot Moss 2023-02-07 3:15 ` Yeo Kai Wei ` (2 more replies) 0 siblings, 3 replies; 25+ messages in thread From: Eliot Moss @ 2023-02-07 1:54 UTC (permalink / raw) To: Yeo Kai Wei, gs-cygwin.com; +Cc: cygwin On 2/7/2023 11:34 AM, Yeo Kai Wei wrote: > > On 7/2/2023 7:27 am, Eliot Moss wrote: >> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>> >>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: >> >>> I updated Cygwin to 3.4.5-1.x86_64. >>> >>> $ uname -a >>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin >>> >>> >>> However, the same problem occurs. >>> >>> Cygwn-devel doesn't seem to work. >>> >>> $ gcc -o selectStdIn selectStdIn.c >>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory >>> #include <sys/select.h> >>> ^~~~~~~~~~~~~~ >>> compilation terminated. >> >> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says >> that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled >> cygwin-devel ? You do have to select the package explicitly, too. >> >> EM > > > Hi Eliot, > > I just reinstalled Cygwin but I'm unsure of what I missed. > > I did "cygcheck -f /usr/include/sys/select.h" and it seems to tell me that I do have > cygwin-devel-3.4.5-1 > > Did I miss a step? What gcc are you running? Maybe not cygwin's? EM ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-07 1:54 ` Eliot Moss @ 2023-02-07 3:15 ` Yeo Kai Wei 2023-02-07 3:56 ` Yeo Kai Wei 2023-02-07 4:28 ` Yeo Kai Wei 2 siblings, 0 replies; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-07 3:15 UTC (permalink / raw) To: moss, gs-cygwin.com; +Cc: cygwin [-- Attachment #1: Type: text/plain, Size: 1652 bytes --] I thought it was the Cygwin GCC. How do I check? ________________________________ From: Eliot Moss <moss@cs.umass.edu> Sent: Tuesday, February 7, 2023 9:54:33 AM To: Yeo Kai Wei <yeokaiwei@hotmail.com>; gs-cygwin.com@gluelogic.com <gs-cygwin.com@gluelogic.com> Cc: cygwin@cygwin.com <cygwin@cygwin.com> Subject: Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin On 2/7/2023 11:34 AM, Yeo Kai Wei wrote: > > On 7/2/2023 7:27 am, Eliot Moss wrote: >> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>> >>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: >> >>> I updated Cygwin to 3.4.5-1.x86_64. >>> >>> $ uname -a >>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin >>> >>> >>> However, the same problem occurs. >>> >>> Cygwn-devel doesn't seem to work. >>> >>> $ gcc -o selectStdIn selectStdIn.c >>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory >>> #include <sys/select.h> >>> ^~~~~~~~~~~~~~ >>> compilation terminated. >> >> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says >> that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled >> cygwin-devel ? You do have to select the package explicitly, too. >> >> EM > > > Hi Eliot, > > I just reinstalled Cygwin but I'm unsure of what I missed. > > I did "cygcheck -f /usr/include/sys/select.h" and it seems to tell me that I do have > cygwin-devel-3.4.5-1 > > Did I miss a step? What gcc are you running? Maybe not cygwin's? EM ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-07 1:54 ` Eliot Moss 2023-02-07 3:15 ` Yeo Kai Wei @ 2023-02-07 3:56 ` Yeo Kai Wei 2023-02-07 4:44 ` Eliot Moss 2023-02-07 4:28 ` Yeo Kai Wei 2 siblings, 1 reply; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-07 3:56 UTC (permalink / raw) To: moss, gs-cygwin.com; +Cc: cygwin On 7/2/2023 9:54 am, Eliot Moss wrote: > On 2/7/2023 11:34 AM, Yeo Kai Wei wrote: >> >> On 7/2/2023 7:27 am, Eliot Moss wrote: >>> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>>> >>>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: >>> >>>> I updated Cygwin to 3.4.5-1.x86_64. >>>> >>>> $ uname -a >>>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 >>>> 19:09 UTC x86_64 Cygwin >>>> >>>> >>>> However, the same problem occurs. >>>> >>>> Cygwn-devel doesn't seem to work. >>>> >>>> $ gcc -o selectStdIn selectStdIn.c >>>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or >>>> directory >>>> #include <sys/select.h> >>>> ^~~~~~~~~~~~~~ >>>> compilation terminated. >>> >>> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says >>> that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled >>> cygwin-devel ? You do have to select the package explicitly, too. >>> >>> EM >> >> >> Hi Eliot, >> >> I just reinstalled Cygwin but I'm unsure of what I missed. >> >> I did "cygcheck -f /usr/include/sys/select.h" and it seems to tell me >> that I do have cygwin-devel-3.4.5-1 >> >> Did I miss a step? > > What gcc are you running? Maybe not cygwin's? > > EM Hi Eliot, I used "cygcheck -cd" to show all the packages I have. I can see "cygwin-devel 3.4.5-1". $ cygcheck -cd Cygwin Package Information Package Version _autorebase 001091-1 alternatives 1.3.30c-10 base-cygwin 3.8-2 base-files 4.3-3 bash 4.4.12-3 bzip2 1.0.8-1 ca-certificates 2022.2.54-3 coreutils 9.0-1 crypto-policies 20190218-1 cygutils 1.4.17-1 cygwin 3.4.5-1 cygwin-devel 3.4.5-1 dash 0.5.12-1 diffutils 3.9-1 editrights 1.03-1 file 5.44-1 findutils 4.9.0-1 gawk 5.2.1-2 getent 2.18.90-5 grep 3.8-2 groff 1.22.4-1 gzip 1.12-1 hostname 3.13-1 info 7.0.2-1 ipc-utils 1.0-2 less 590-1 libargp 20110921-3 libattr1 2.5.1-1.20.g0981a7bfe487 libblkid1 2.33.1-2 libbz2_1 1.0.8-1 libfdisk1 2.33.1-2 libffi6 3.2.1-2 libgcc1 11.3.0-1 libgdbm6 1.18.1-1 libgmp10 6.2.1-2 libiconv2 1.17-1 libintl8 0.21.1-2 liblz4_1 1.9.4-1 liblzma5 5.4.1-1 libmpfr6 4.2.0-1 libncursesw10 6.3-1.20220416 libp11-kit0 0.23.20-1 libpcre2_8_0 10.42-1 libpipeline1 1.5.6-1 libpopt-common 1.18-1 libpopt0 1.18-1 libreadline7 8.2-2 libsigsegv2 2.10-2 libsmartcols1 2.33.1-2 libssl1.1 1.1.1s-1 libstdc++6 11.3.0-1 libtasn1_6 4.14-1 libuuid1 2.33.1-2 libzstd1 1.5.2-1 login 1.13-1 man-db 2.11.2-1 mintty 3.6.3-1 ncurses 6.3-1.20220416 openssl 1.1.1s-1 p11-kit 0.23.20-1 p11-kit-trust 0.23.20-1 rebase 4.6.2-2 run 1.3.4-2 sed 4.9-1 tar 1.34-1 terminfo 6.3-1.20220416 terminfo-extra 6.3-1.20220416 tzcode 2022g-1 tzdata 2022g-1 util-linux 2.33.1-2 vim-minimal 8.2.4372-1 which 2.20-2 xz 5.4.1-1 zlib0 1.2.13-1 zstd 1.5.2-1 Additionally, what packages do I need to download for the following? $ gcc -o basicFork basicFork.c basicFork.c: In function 'main': basicFork.c:14:9: error: 'SIGCHILD' undeclared (first use in this function); did you mean 'SIGILL'? signal(SIGCHILD, SIG_IGN); ^~~~~~~~ SIGILL basicFork.c:14:9: note: each undeclared identifier is reported only once for eac h function it appears in basicFork.c:19:14: warning: implicit declaration of function 'fork' [-Wimplicit- function-declaration] pid_t pid = fork(); Thank you. Kind Regards, YEO Kai Wei ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-07 3:56 ` Yeo Kai Wei @ 2023-02-07 4:44 ` Eliot Moss 0 siblings, 0 replies; 25+ messages in thread From: Eliot Moss @ 2023-02-07 4:44 UTC (permalink / raw) To: Yeo Kai Wei, gs-cygwin.com; +Cc: cygwin On 2/7/2023 2:56 PM, Yeo Kai Wei wrote: > > On 7/2/2023 9:54 am, Eliot Moss wrote: >> On 2/7/2023 11:34 AM, Yeo Kai Wei wrote: >>> >>> On 7/2/2023 7:27 am, Eliot Moss wrote: >>>> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>>>> >>>>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: >>>> >>>>> I updated Cygwin to 3.4.5-1.x86_64. >>>>> >>>>> $ uname -a >>>>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin >>>>> >>>>> >>>>> However, the same problem occurs. >>>>> >>>>> Cygwn-devel doesn't seem to work. >>>>> >>>>> $ gcc -o selectStdIn selectStdIn.c >>>>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory >>>>> #include <sys/select.h> >>>>> ^~~~~~~~~~~~~~ >>>>> compilation terminated. >>>> >>>> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says >>>> that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled >>>> cygwin-devel ? You do have to select the package explicitly, too. >>>> >>>> EM >>> >>> >>> Hi Eliot, >>> >>> I just reinstalled Cygwin but I'm unsure of what I missed. >>> >>> I did "cygcheck -f /usr/include/sys/select.h" and it seems to tell me that I do have >>> cygwin-devel-3.4.5-1 >>> >>> Did I miss a step? >> >> What gcc are you running? Maybe not cygwin's? >> >> EM > > Hi Eliot, > > I used "cygcheck -cd" to show all the packages I have. > > I can see "cygwin-devel 3.4.5-1". > > > $ cygcheck -cd > Cygwin Package Information > Package Version > _autorebase 001091-1 > alternatives 1.3.30c-10 > base-cygwin 3.8-2 > base-files 4.3-3 > bash 4.4.12-3 > bzip2 1.0.8-1 > ca-certificates 2022.2.54-3 > coreutils 9.0-1 > crypto-policies 20190218-1 > cygutils 1.4.17-1 > cygwin 3.4.5-1 > cygwin-devel 3.4.5-1 > dash 0.5.12-1 > diffutils 3.9-1 > editrights 1.03-1 > file 5.44-1 > findutils 4.9.0-1 > gawk 5.2.1-2 > getent 2.18.90-5 > grep 3.8-2 > groff 1.22.4-1 > gzip 1.12-1 > hostname 3.13-1 > info 7.0.2-1 > ipc-utils 1.0-2 > less 590-1 > libargp 20110921-3 > libattr1 2.5.1-1.20.g0981a7bfe487 > libblkid1 2.33.1-2 > libbz2_1 1.0.8-1 > libfdisk1 2.33.1-2 > libffi6 3.2.1-2 > libgcc1 11.3.0-1 > libgdbm6 1.18.1-1 > libgmp10 6.2.1-2 > libiconv2 1.17-1 > libintl8 0.21.1-2 > liblz4_1 1.9.4-1 > liblzma5 5.4.1-1 > libmpfr6 4.2.0-1 > libncursesw10 6.3-1.20220416 > libp11-kit0 0.23.20-1 > libpcre2_8_0 10.42-1 > libpipeline1 1.5.6-1 > libpopt-common 1.18-1 > libpopt0 1.18-1 > libreadline7 8.2-2 > libsigsegv2 2.10-2 > libsmartcols1 2.33.1-2 > libssl1.1 1.1.1s-1 > libstdc++6 11.3.0-1 > libtasn1_6 4.14-1 > libuuid1 2.33.1-2 > libzstd1 1.5.2-1 > login 1.13-1 > man-db 2.11.2-1 > mintty 3.6.3-1 > ncurses 6.3-1.20220416 > openssl 1.1.1s-1 > p11-kit 0.23.20-1 > p11-kit-trust 0.23.20-1 > rebase 4.6.2-2 > run 1.3.4-2 > sed 4.9-1 > tar 1.34-1 > terminfo 6.3-1.20220416 > terminfo-extra 6.3-1.20220416 > tzcode 2022g-1 > tzdata 2022g-1 > util-linux 2.33.1-2 > vim-minimal 8.2.4372-1 > which 2.20-2 > xz 5.4.1-1 > zlib0 1.2.13-1 > zstd 1.5.2-1 > > > Additionally, what packages do I need to download for the following? > > > $ gcc -o basicFork basicFork.c > basicFork.c: In function 'main': > basicFork.c:14:9: error: 'SIGCHILD' undeclared (first use in this function); did > you mean 'SIGILL'? > signal(SIGCHILD, SIG_IGN); > ^~~~~~~~ > SIGILL > basicFork.c:14:9: note: each undeclared identifier is reported only once for eac > h function it appears in > basicFork.c:19:14: warning: implicit declaration of function 'fork' [-Wimplicit- > function-declaration] > pid_t pid = fork(); Yes, but not gcc. You're using some other installation of gcc. In bash `type -all gcc` will show you the gcc's it finds, in order. (It may find the same one multiple times because of links.) bash is happy to invoke things in the Windows directories if they're on your path. For example, `type cmd` shows the Windows cmd command line for me. I believe the signal's name is SIGCHLD, not SIGCHILD. Best - EM ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-07 1:54 ` Eliot Moss 2023-02-07 3:15 ` Yeo Kai Wei 2023-02-07 3:56 ` Yeo Kai Wei @ 2023-02-07 4:28 ` Yeo Kai Wei 2023-02-07 4:46 ` Eliot Moss 2023-02-07 5:53 ` Brian Inglis 2 siblings, 2 replies; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-07 4:28 UTC (permalink / raw) To: moss, gs-cygwin.com; +Cc: cygwin On 7/2/2023 9:54 am, Eliot Moss wrote: > On 2/7/2023 11:34 AM, Yeo Kai Wei wrote: >> >> On 7/2/2023 7:27 am, Eliot Moss wrote: >>> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>>> >>>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: >>> >>>> I updated Cygwin to 3.4.5-1.x86_64. >>>> >>>> $ uname -a >>>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 >>>> 19:09 UTC x86_64 Cygwin >>>> >>>> >>>> However, the same problem occurs. >>>> >>>> Cygwn-devel doesn't seem to work. >>>> >>>> $ gcc -o selectStdIn selectStdIn.c >>>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or >>>> directory >>>> #include <sys/select.h> >>>> ^~~~~~~~~~~~~~ >>>> compilation terminated. >>> >>> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says >>> that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled >>> cygwin-devel ? You do have to select the package explicitly, too. >>> >>> EM >> >> >> Hi Eliot, >> >> I just reinstalled Cygwin but I'm unsure of what I missed. >> >> I did "cygcheck -f /usr/include/sys/select.h" and it seems to tell me >> that I do have cygwin-devel-3.4.5-1 >> >> Did I miss a step? > > What gcc are you running? Maybe not cygwin's? > > EM Hi Eliot, I think I'm running MinGW's gcc. I typed in "gcc --version" and this is what Cygwin returned. $ gcc --version gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. What should I do next? Thank you. Kind Regards, YEO Kai Wei ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-07 4:28 ` Yeo Kai Wei @ 2023-02-07 4:46 ` Eliot Moss 2023-02-07 5:21 ` Yeo Kai Wei 2023-02-07 5:53 ` Brian Inglis 1 sibling, 1 reply; 25+ messages in thread From: Eliot Moss @ 2023-02-07 4:46 UTC (permalink / raw) To: Yeo Kai Wei, gs-cygwin.com; +Cc: cygwin On 2/7/2023 3:28 PM, Yeo Kai Wei wrote: > > On 7/2/2023 9:54 am, Eliot Moss wrote: >> On 2/7/2023 11:34 AM, Yeo Kai Wei wrote: >>> >>> On 7/2/2023 7:27 am, Eliot Moss wrote: >>>> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>>>> >>>>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: >>>> >>>>> I updated Cygwin to 3.4.5-1.x86_64. >>>>> >>>>> $ uname -a >>>>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin >>>>> >>>>> >>>>> However, the same problem occurs. >>>>> >>>>> Cygwn-devel doesn't seem to work. >>>>> >>>>> $ gcc -o selectStdIn selectStdIn.c >>>>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory >>>>> #include <sys/select.h> >>>>> ^~~~~~~~~~~~~~ >>>>> compilation terminated. >>>> >>>> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says >>>> that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled >>>> cygwin-devel ? You do have to select the package explicitly, too. >>>> >>>> EM >>> >>> >>> Hi Eliot, >>> >>> I just reinstalled Cygwin but I'm unsure of what I missed. >>> >>> I did "cygcheck -f /usr/include/sys/select.h" and it seems to tell me that I do have >>> cygwin-devel-3.4.5-1 >>> >>> Did I miss a step? >> >> What gcc are you running? Maybe not cygwin's? >> >> EM > > > Hi Eliot, > > I think I'm running MinGW's gcc. > > I typed in "gcc --version" and this is what Cygwin returned. > > $ gcc --version > gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0 > Copyright (C) 2018 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > What should I do next? Install the relevant gcc and program building packages. But I think you're reaching the limit of the handholding the community may be prepared to offer ... Also, you never said what you're *really* trying to accomplish. EM ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-07 4:46 ` Eliot Moss @ 2023-02-07 5:21 ` Yeo Kai Wei 2023-02-07 5:51 ` Eliot Moss 0 siblings, 1 reply; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-07 5:21 UTC (permalink / raw) To: moss, gs-cygwin.com; +Cc: cygwin [-- Attachment #1: Type: text/plain, Size: 2991 bytes --] Hi Eliot, Thanks for the help. No pressure. I only want help from those who are willing to help. Those who are NOT interested may kindly ignore my messages. There is no obligation at all. The issues I highlighted have been a recurring problem on Google. So, there is a recurring pattern emerging and perhaps this thread could solve it once and for all. As for what I am using it for, I am trying to complete a book called Modern C. I wish to finish it. Thank you. Kind Regards, YEO Kai Wei ________________________________ From: Eliot Moss <moss@cs.umass.edu> Sent: Tuesday, February 7, 2023 12:46:32 PM To: Yeo Kai Wei <yeokaiwei@hotmail.com>; gs-cygwin.com@gluelogic.com <gs-cygwin.com@gluelogic.com> Cc: cygwin@cygwin.com <cygwin@cygwin.com> Subject: Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin On 2/7/2023 3:28 PM, Yeo Kai Wei wrote: > > On 7/2/2023 9:54 am, Eliot Moss wrote: >> On 2/7/2023 11:34 AM, Yeo Kai Wei wrote: >>> >>> On 7/2/2023 7:27 am, Eliot Moss wrote: >>>> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>>>> >>>>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: >>>> >>>>> I updated Cygwin to 3.4.5-1.x86_64. >>>>> >>>>> $ uname -a >>>>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin >>>>> >>>>> >>>>> However, the same problem occurs. >>>>> >>>>> Cygwn-devel doesn't seem to work. >>>>> >>>>> $ gcc -o selectStdIn selectStdIn.c >>>>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory >>>>> #include <sys/select.h> >>>>> ^~~~~~~~~~~~~~ >>>>> compilation terminated. >>>> >>>> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says >>>> that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled >>>> cygwin-devel ? You do have to select the package explicitly, too. >>>> >>>> EM >>> >>> >>> Hi Eliot, >>> >>> I just reinstalled Cygwin but I'm unsure of what I missed. >>> >>> I did "cygcheck -f /usr/include/sys/select.h" and it seems to tell me that I do have >>> cygwin-devel-3.4.5-1 >>> >>> Did I miss a step? >> >> What gcc are you running? Maybe not cygwin's? >> >> EM > > > Hi Eliot, > > I think I'm running MinGW's gcc. > > I typed in "gcc --version" and this is what Cygwin returned. > > $ gcc --version > gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0 > Copyright (C) 2018 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > What should I do next? Install the relevant gcc and program building packages. But I think you're reaching the limit of the handholding the community may be prepared to offer ... Also, you never said what you're *really* trying to accomplish. EM ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-07 5:21 ` Yeo Kai Wei @ 2023-02-07 5:51 ` Eliot Moss 0 siblings, 0 replies; 25+ messages in thread From: Eliot Moss @ 2023-02-07 5:51 UTC (permalink / raw) To: Yeo Kai Wei, gs-cygwin.com; +Cc: cygwin Ok ... assuming the "Modern C" is more or less POSIX based and does not use things outside the realm of what cygwin supplies, I think the answer is straightforward: Make sure you install every program and every library that the book uses. There's not really such a thing as a "full install" for Cygwin (and it would huge anyway), so you'll have to figure out what going through the book demands. Fortunately, you can somewhat do that as you go, finding packages that need to be installed. Best wishes - EM ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-07 4:28 ` Yeo Kai Wei 2023-02-07 4:46 ` Eliot Moss @ 2023-02-07 5:53 ` Brian Inglis 2023-02-07 6:59 ` Yeo Kai Wei 1 sibling, 1 reply; 25+ messages in thread From: Brian Inglis @ 2023-02-07 5:53 UTC (permalink / raw) To: cygwin; +Cc: Yeo Kai Wei On 2023-02-06 21:28, Yeo Kai Wei via Cygwin wrote: > On 7/2/2023 9:54 am, Eliot Moss wrote: >> On 2/7/2023 11:34 AM, Yeo Kai Wei wrote: >>> On 7/2/2023 7:27 am, Eliot Moss wrote: >>>> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>>>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: >>>>> I updated Cygwin to 3.4.5-1.x86_64. >>>>> $ uname -a >>>>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC >>>>> x86_64 Cygwin >>>>> However, the same problem occurs. >>>>> Cygwn-devel doesn't seem to work. >>>>> $ gcc -o selectStdIn selectStdIn.c >>>>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory >>>>> #include <sys/select.h> >>>>> ^~~~~~~~~~~~~~ >>>>> compilation terminated. >>>> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says >>>> that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled >>>> cygwin-devel ? You do have to select the package explicitly, too. >>> I just reinstalled Cygwin but I'm unsure of what I missed. >>> I did "cygcheck -f /usr/include/sys/select.h" and it seems to tell me that I >>> do have cygwin-devel-3.4.5-1 >>> Did I miss a step? >> What gcc are you running? Maybe not cygwin's? > I think I'm running MinGW's gcc. > I typed in "gcc --version" and this is what Cygwin returned. > $ gcc --version > gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0 > Copyright (C) 2018 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > What should I do next? If you choose to install cygwin-devel in Cygwin Setup, it will install all the tools and files needed to develop under Cygwin, as well as rebuild Cygwin itself and most of the components and packages. If you use the provided Desktop and Start Menu shortcuts to run bash under mintty, or both under Cygwin/X, you should be able to work as if under any Linux or similar distro. You must have the virtual Cygwin paths /home/$USER/bin:/usr/bin:/bin:/usr/sbin:/sbin:... first in PATH and similar /usr/share/{man,info,awk} /usr/lib/gawk for {MAN,INFO,AWK,AWKLIB}PATH in your preferred shell initialization files e.g. in bash $OSTYPE == "cygwin". -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-07 5:53 ` Brian Inglis @ 2023-02-07 6:59 ` Yeo Kai Wei 2023-02-07 8:43 ` Hans-Bernhard Bröker 0 siblings, 1 reply; 25+ messages in thread From: Yeo Kai Wei @ 2023-02-07 6:59 UTC (permalink / raw) To: cygwin On 7/2/2023 1:53 pm, Brian Inglis wrote: > On 2023-02-06 21:28, Yeo Kai Wei via Cygwin wrote: >> On 7/2/2023 9:54 am, Eliot Moss wrote: >>> On 2/7/2023 11:34 AM, Yeo Kai Wei wrote: >>>> On 7/2/2023 7:27 am, Eliot Moss wrote: >>>>> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote: >>>>>> On 7/2/2023 4:59 am, gs-cygwin.com@gluelogic.com wrote: >>>>>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote: >>>>>> I updated Cygwin to 3.4.5-1.x86_64. >>>>>> $ uname -a >>>>>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 >>>>>> 19:09 UTC x86_64 Cygwin >>>>>> However, the same problem occurs. >>>>>> Cygwn-devel doesn't seem to work. >>>>>> $ gcc -o selectStdIn selectStdIn.c >>>>>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or >>>>>> directory >>>>>> #include <sys/select.h> >>>>>> ^~~~~~~~~~~~~~ >>>>>> compilation terminated. >>>>> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says >>>>> that the file came from cygwin-devel-3.4.3-1. Maybe you misspelled >>>>> cygwin-devel ? You do have to select the package explicitly, too. >>>> I just reinstalled Cygwin but I'm unsure of what I missed. >>>> I did "cygcheck -f /usr/include/sys/select.h" and it seems to tell >>>> me that I do have cygwin-devel-3.4.5-1 >>>> Did I miss a step? >>> What gcc are you running? Maybe not cygwin's? >> I think I'm running MinGW's gcc. >> I typed in "gcc --version" and this is what Cygwin returned. >> $ gcc --version >> gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0 >> Copyright (C) 2018 Free Software Foundation, Inc. >> This is free software; see the source for copying conditions. There >> is NO >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR >> PURPOSE. >> What should I do next? > > If you choose to install cygwin-devel in Cygwin Setup, it will install > all the tools and files needed to develop under Cygwin, as well as > rebuild Cygwin itself and most of the components and packages. > > If you use the provided Desktop and Start Menu shortcuts to run bash > under mintty, or both under Cygwin/X, you should be able to work as if > under any Linux or similar distro. > > You must have the virtual Cygwin paths > /home/$USER/bin:/usr/bin:/bin:/usr/sbin:/sbin:... first in PATH and > similar /usr/share/{man,info,awk} /usr/lib/gawk for > {MAN,INFO,AWK,AWKLIB}PATH in your preferred shell initialization files > e.g. in bash $OSTYPE == "cygwin". Hi Brian, Thank you for the help. I think I found the issue, I believe it's due to MinGW's build of gcc (I could be wrong). I downloaded "gcc -core" and it worked. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-07 6:59 ` Yeo Kai Wei @ 2023-02-07 8:43 ` Hans-Bernhard Bröker 0 siblings, 0 replies; 25+ messages in thread From: Hans-Bernhard Bröker @ 2023-02-07 8:43 UTC (permalink / raw) To: cygwin Am 07.02.2023 um 07:59 schrieb Yeo Kai Wei via Cygwin: > I think I found the issue, I believe it's due to MinGW's build of gcc (I > could be wrong). > > I downloaded "gcc -core" and it worked. You keep talking of "downloading" and "unpacking" things. That indicates a continuing misunderstanding of how Cygwin is supposed to be installed and configured on your machine, and has been the cause of rather a lot of the confusion you've been going through. You should never be doing any of that yourself. You simply (re-)run Cygwin setup and select which packages to install. As such, the process is really a case of "installing" things. Downloading, unpacking and all that is handled by the setup program and its underlying database of packages and their relationships. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin 2023-02-06 20:25 [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin Yeo Kai Wei 2023-02-06 20:30 ` gs-cygwin.com @ 2023-02-06 20:31 ` Eliot Moss 1 sibling, 0 replies; 25+ messages in thread From: Eliot Moss @ 2023-02-06 20:31 UTC (permalink / raw) To: Yeo Kai Wei, cygwin On 2/7/2023 7:25 AM, 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. My guess is that those fd set things aren't POSIX, and cygwin tries to model POSIX. Comments at the top of /usr/include/sys/select.h suggest that. -- Eliot Moss ^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2023-02-07 8:43 UTC | newest] Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-02-06 20:25 [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin Yeo Kai Wei 2023-02-06 20:30 ` gs-cygwin.com 2023-02-06 20:33 ` Yeo Kai Wei 2023-02-06 20:59 ` gs-cygwin.com 2023-02-06 22:50 ` Yeo Kai Wei 2023-02-06 23:03 ` Yeo Kai Wei 2023-02-06 23:19 ` gs-cygwin.com 2023-02-06 23:27 ` Eliot Moss 2023-02-06 23:48 ` Yeo Kai Wei 2023-02-06 23:50 ` Eliot Moss 2023-02-06 23:53 ` Yeo Kai Wei [not found] ` <PH0PR05MB9918F39B0B689DFF52980D11A4DB9@PH0PR05MB9918.namprd05.prod.outlook.com> 2023-02-07 1:53 ` Eliot Moss 2023-02-07 0:34 ` Yeo Kai Wei 2023-02-07 1:54 ` Eliot Moss 2023-02-07 3:15 ` Yeo Kai Wei 2023-02-07 3:56 ` Yeo Kai Wei 2023-02-07 4:44 ` Eliot Moss 2023-02-07 4:28 ` Yeo Kai Wei 2023-02-07 4:46 ` Eliot Moss 2023-02-07 5:21 ` Yeo Kai Wei 2023-02-07 5:51 ` Eliot Moss 2023-02-07 5:53 ` Brian Inglis 2023-02-07 6:59 ` Yeo Kai Wei 2023-02-07 8:43 ` Hans-Bernhard Bröker 2023-02-06 20:31 ` Eliot Moss
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).