| delorie.com/archives/browse.cgi | search | 
| X-Recipient: | archive-cygwin AT delorie DOT com | 
| DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org CA06838708AE | 
| DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; | 
| s=default; t=1598815324; | |
| bh=4P/PC4EqCi4t1gAMBMl2DLBlkzXLV1bKW0TOtGPRU8g=; | |
| h=To:Subject:Date:References:List-Id:List-Unsubscribe:List-Archive: | |
| List-Post:List-Help:List-Subscribe:From:Reply-To:From; | |
| b=FEbmx6yJ0SpPzA6aj/C1wYt/xhS6BPp3skJk4HnjcKwMdyZlNE9Cnp3phrKpmFEv1 | |
| zB+jqeW1yGNftV6iIUt5rEm7YqmT+89l5KiMQX/XaNTj/ReKsc7GnxY4LsW3Pr3Z/3 | |
| BYOTA7qC5TTqj5I0Ig7qjnQBpgp5HS2cp4s0fPSo= | |
| X-Original-To: | cygwin AT cygwin DOT com | 
| Delivered-To: | cygwin AT cygwin DOT com | 
| DMARC-Filter: | OpenDMARC Filter v1.3.2 sourceware.org 6E1673857809 | 
| X-Injected-Via-Gmane: | http://gmane.org/ | 
| To: | cygwin AT cygwin DOT com | 
| Subject: | Re: cpp /usr/include/threads.h fails; modfl segfaults | 
| Date: | Sun, 30 Aug 2020 15:21:35 -0400 | 
| Message-ID: | <vriumu2cvt1c.fsf@mail.aol.com> | 
| References: | <02b16d2e-9d51-de58-807b-3b31b2565b59 DOT ref AT aol DOT com> | 
| <02b16d2e-9d51-de58-807b-3b31b2565b59 AT aol DOT com> | |
| <20200830130005 DOT GR3272 AT calimero DOT vinschen DOT de> | |
| Mime-Version: | 1.0 | 
| User-Agent: | Gnus/5.13 (Gnus v5.13) Emacs/27.1 (cygwin) | 
| Cancel-Lock: | sha1:TA8uuObsezx/x69/1MgajkenXfc= | 
| X-Spam-Status: | No, score=-3.1 required=5.0 tests=BAYES_00, | 
| FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, | |
| KAM_DMARC_STATUS, KAM_GOODAOL, SPF_HELO_NONE, SPF_PASS, | |
| TXREP autolearn=ham autolearn_force=no version=3.4.2 | |
| X-Spam-Checker-Version: | SpamAssassin 3.4.2 (2018-09-13) on | 
| server2.sourceware.org | |
| 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-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: | airplanemath--- via Cygwin <cygwin AT cygwin DOT com> | 
| Reply-To: | airplanemath AT aol DOT com | 
| Sender: | "Cygwin" <cygwin-bounces AT cygwin DOT com> | 
Corinna Vinschen writes:
> On Aug 29 08:52, airplanemath via Cygwin wrote:
>> Hello,
>> 
>> I have two reports.  A brief description of the system:
>> $ uname -a | sed "s/${HOSTNAME}/\${HOSTNAME}/g"
>> CYGWIN_NT-10.0 ${HOSTNAME} 3.1.7(0.340/5/3) 2020-08-22 17:48 x86_64 Cygwin
>> 
>> The first report:
>> 
>> $ cpp /usr/include/threads.h
>> # 1 "/usr/include/threads.h"
>> # 1 "<built-in>"
>> # 1 "<command-line>"
>> # 1 "/usr/include/threads.h"
>> /usr/include/threads.h:30:10: fatal error: machine/_threads.h: No such
>> file or directory
>>    30 | #include <machine/_threads.h>
>>       |          ^~~~~~~~~~~~~~~~~~~~
>> compilation terminated.
>
> The reason for this is, as Ken already pointed out, that
> machine/_threads.h only existed for RTEMS, not for any other target
> supported by newlib.  Worse, Cygwin never got around to implement the
> C11 threads functions yet.
>
> I added these functions as wrappers around pthread functionality, code
> taken from FreeBSD.  I ran the glibc testsuite on them, and after fixing
> the bugs in the glibc testsuite (d'oh), the tests ran successfully.
>
The header makes it through the preprocessor for me now.  Thank you.
>> $ cat test.c
>> #include <math.h>
>> #include <stdio.h>
>> #include <stdlib.h>
>> 
>> int main(int argc, char *argv[]) {
>>   long double a, b, c;
>>   char *num_end = NULL;
>>   a = b = c = 0.0L;
>>   if (argc != 2) {
>>     fprintf(stderr, "Usage: %s NUMBER\n", argv[0]);
>>     exit(1);
>>   }
>>   a = strtold(argv[1], &num_end);
>>   b = modfl(a, &c);
>>   printf("%Lf %Lf %Lf\n", a, b, c);
>>   return 0;
>> }
>
> This is a bug in the assembler code taken from Mingw-w64.  The bug has
> been fixed upstream, so I just pulled in the upstream fixes.
The test program now finishes without segfaulting, and gives the
expected answer.  Thanks again.
>
> Thus, both of the above problems should be fixed now.  I created a
> developer snapshot and uploaed it to https://cygwin.com/snapshots/ You
> need to grab the full tar file and install at least the following files
> to your installation after backing up the original files from 3.1.7:
>
>   usr/bin/cygwin1.dll	(this is pre-release 3.2.0)
>   usr/lib/libcygwin.a
>   usr/include/limits.h
>   usr/include/pthread.h
>   usr/include/machine/_threads.h
>
Is it okay to leave these in place to be overwritten by 3.2.0, or should
I move the old versions back?
> Thanks for the report.
>
Thanks for the prompt response.
>
> 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
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |