Re: thrd_sleep

2021-01-30 Thread Hans-Bernhard Bröker

Am 29.01.2021 um 00:36 schrieb Rafał Jopek via Cygwin:

Hi,

What package should be installed ?


None.  This is quite certainly a packaging mistake on a package you 
already have installed.


In short: that file should be in cygwin-devel, but it isn't.

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


Re: thrd_sleep

2021-01-28 Thread Ken Brown via Cygwin

On 1/28/2021 6:36 PM, Rafał Jopek via Cygwin wrote:

Hi,

What package should be installed ?

I use gcc under Cygwin:
gcc (GCC) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.

C11 standard (ISO/IEC 9899:2011):7.26.5.7
The thrd_sleep function (p: 385)

the code that compiles:
``` c
#include 
#include 
#include 

int main(void)
{
 printf("Time: %s", ctime(&(time_t){time(NULL)}));
 thrd_sleep(&(struct timespec){.tv_sec=1}, NULL);
 printf("Time: %s", ctime(&(time_t){time(NULL)}));
}
```
compile error:
/usr/include/threads.h:30:10: fatal error: machine/_threads.h: No such file or 
directory
30 | #include 


This has been fixed.  You'll need to try a snapshot to get the fix.  See

  https://cygwin.com/pipermail/cygwin/2020-August/246070.html

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


thrd_sleep

2021-01-28 Thread Rafał Jopek via Cygwin
Hi,

What package should be installed ?

I use gcc under Cygwin:
gcc (GCC) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.

C11 standard (ISO/IEC 9899:2011):7.26.5.7
The thrd_sleep function (p: 385)

the code that compiles:
``` c
#include 
#include 
#include 

int main(void)
{
printf("Time: %s", ctime(&(time_t){time(NULL)}));
thrd_sleep(&(struct timespec){.tv_sec=1}, NULL);
printf("Time: %s", ctime(&(time_t){time(NULL)}));
}
```
compile error:
/usr/include/threads.h:30:10: fatal error: machine/_threads.h: No such file or 
directory
   30 | #include 


- Rafał

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