From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17935 invoked by alias); 13 Sep 2019 14:54:39 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 17921 invoked by uid 89); 13 Sep 2019 14:54:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-5.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Envelope-From:sk:michael, H*r:4.77, main=e2, HContent-Transfer-Encoding:8bit?= X-HELO: atfriesa01.ssi-schaefer.com Received: from atfriesa01.ssi-schaefer.com (HELO atfriesa01.ssi-schaefer.com) (193.186.16.100) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Sep 2019 14:54:36 +0000 Received: from samail03.wamas.com (HELO mailhost.salomon.at) ([172.28.33.235]) by atfriesa01.ssi-schaefer.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Sep 2019 16:54:33 +0200 Received: from [172.28.42.244] by mailhost.salomon.at with esmtp (Exim 4.77) (envelope-from ) id 1i8my0-0004se-9U; Fri, 13 Sep 2019 16:54:32 +0200 Subject: Re: [ANNOUNCEMENT] cygwin 3.1.0-0.4 (TEST) To: cygwin@cygwin.com References: From: Michael Haubenwallner Openpgp: preference=signencrypt Message-ID: <855a9543-6908-42f0-576a-0f161777f715@ssi-schaefer.com> Date: Fri, 13 Sep 2019 18:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-09/txt/msg00160.txt.bz2 On 9/5/19 3:16 PM, Ken Brown wrote: > The following packages have been uploaded to the Cygwin distribution > as test releases: > > * cygwin-3.1.0-0.4 > * cygwin-devel-3.1.0-0.4 > * cygwin-doc-3.1.0-0.4 > - New APIs: sched_getaffinity, sched_setaffinity, pthread_getaffinity_np, > pthread_setaffinity_np, plus CPU_SET macros. There's some problem with , seen with boost-1.71.0/bootstrap.sh, even after tweaking their sysinfo.cpp like this to include : -#if defined(OS_LINUX) +#if defined(OS_LINUX) || defined(OS_CYGWIN) This boils down to a test case like this that succeeds to *compile* on Linux, although requires _GNU_SOURCE to be defined earlier to perform anything useful: $ cat > test.cc <<'EOF' #ifdef LIKE_BOOST # include # define _GNU_SOURCE #endif #include int main() { #if defined(CPU_COUNT_S) ::cpu_set_t cpu_set; if (::sched_getaffinity(0, sizeof(cpu_set_t), &cpu_set) == 0) { return CPU_COUNT_S(sizeof(cpu_set_t), &cpu_set); } #endif return 0; } EOF Both these commands fail to compile on Cygwin with identical error: $ g++ test.c -DLIKE_BOOST $ g++ test.c test.c: In function ‘main’: test.c:10:7: warning: implicit declaration of function ‘sched_getaffinity’; did you mean ‘sched_getparam’? [-Wimplicit-function-declaration] if (sched_getaffinity(0, sizeof(cpu_set_t), &cpu_set) == 0) ^~~~~~~~~~~~~~~~~ sched_getparam Actually it is boost's fault to include before defining _GNU_SOURCE, but it feels like Cygwin should *not* define CPU_COUNT_S without _GNU_SOURCE. Thoughts? /haubi/ PS: This does work as expected: $ g++ test.c -D_GNU_SOURCE -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple