X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECB68384605A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1598792418; bh=oGyYuV/CyJXlKaRwiwY0Xmb3PWeSsIrhCc2tm1XUeWw=; h=Date:From:To:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=kuORSOwmnMg09n7kNcNZMeIdltXFZ0coPlxNv2HC6rLK2FdIIzXjrtpnVIMb2RF0h iRG+SHtJeN+IBJG/Kleo49wGF3J7pVNRytAdklBCfqKW3mrRtMTOf1YKXq7TYCWuYP g+xMX7NBfJ4DLnfA1HwRVkAEAQc9KXQB6ctUjbfI= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 537E43857836 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=corinna-cygwin AT cygwin DOT com Date: Sun, 30 Aug 2020 15:00:05 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: cpp /usr/include/threads.h fails; modfl segfaults Message-ID: <20200830130005.GR3272@calimero.vinschen.de> Mail-Followup-To: cygwin AT cygwin DOT com References: <02b16d2e-9d51-de58-807b-3b31b2565b59 DOT ref AT aol DOT com> <02b16d2e-9d51-de58-807b-3b31b2565b59 AT aol DOT com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <02b16d2e-9d51-de58-807b-3b31b2565b59@aol.com> X-Provags-ID: V03:K1:jKsibkGlswLes84IZrlyk/FPLfeD/vqg+r9yToEY/R/8+kukrsG pCwwNrXEW02s9DFNFHZNMuxMIfB3wGEisMMOiI5C1pDy25WvZDfBNhy5mDXrhCjZPw0pP6a 3s7LGSxPQg7D4rIm79Um7wirbhqhQ0kdaKV933cCgI/fge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FROM_CORINNA_CYGWIN, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_NEUTRAL, TXREP, T_SPF_HELO_TEMPERROR 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 07UD0lBR020322 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 "" > # 1 "" > # 1 "/usr/include/threads.h" > /usr/include/threads.h:30:10: fatal error: machine/_threads.h: No such > file or directory >    30 | #include >       |          ^~~~~~~~~~~~~~~~~~~~ > 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. > $ cat test.c > #include > #include > #include > > 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. 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 Thanks for the report. Corinna -- Corinna Vinschen Cygwin Maintainer -- 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