delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/08/06/13:01:03

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=IuksnfzNyebMykbZ
GWQfa0VTA0TEVsQVA+qE3hgpCRzuZiaOz/iwi/MSk/C6mrXeYafYmQmV9cytb94u
X/Sgog2SW+qsBrnE/17aWiuvlTIa4n1SoMzVnAxeI3ymm8gNdjYcJjSLbxx0Ngpa
k76Te8fPgPdP/NHvb5PS+0hmnwk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=di6tk958ZSZPyWZZiS6Nh3
vL4Xc=; b=nICNitmJfsVOyqsp423Q9nIH7DLIdO8J7zqDHpY1S6d4bvNwEo0gYC
nhPQp6hcWfcii+I6IxwGBkbXXwZIdWtmJpqtb/xcL6hGLNiFii4SQ6unKUpLejRR
BXPHZ/kQBLtTc/pTcXo20inwgy4qQWTUUZTSCjOEZwXqQG2UobQ2c=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=jn, JN, Hx-languages-length:2113, HContent-Transfer-Encoding:8bit
X-HELO: mail-wm0-f53.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=lE82mbMJHd1aorSrRdP7Bc8quUAJ33KWDva+oTjxztw=; b=D7rVoH5+9hMnKFYYdOH+rLQzc96Mw/MSubYJkJaM13nJS1ivazzN7aRzRrh43q9ndf hYrNb4h9JvJvBkPM9JjNzrUm7eUtR9jWD3lRkSaVc/PdYFL/P0oOa56N91MPyLTZ38SY /VWrqcawLP/uhaGOx7b12k6FsdBXa0dp55/I/Rw+koQo4mIL+a2JkFx8bMkT1RyYeaiJ cRDhYNemPa89P1lOj/s7DdYZFmi92mNGrxUkGS+qlGbs9Bj9fmIv7VIqL9Al3LQjqjyh C53tcwEt3DpGON/k6K+d/upUPfHWfrlM7S1Q7tKJN0NuzkUhni+yGk5McMC824OtQscV dsBw==
X-Gm-Message-State: AHYfb5hpqykRzsV/5J6CMGtqMefneJ0+3+760h/LP3v2dvbFyRSXTqfx 4W0MQXo8ZKVac6er
X-Received: by 10.28.2.84 with SMTP id 81mr4788423wmc.1.1502038826814; Sun, 06 Aug 2017 10:00:26 -0700 (PDT)
Subject: =?UTF-8?B?UmU6IOKAmFNJR19TRVRNQVNL4oCZIGFuZCAtc3RkPWM5OQ==?=
To: cygwin AT cygwin DOT com
References: <2adce715-b45b-ed1c-567e-68bc826710ec AT gmail DOT com> <87vam16nez DOT fsf AT Rainer DOT invalid> <77932431-b0cc-0e23-3cb8-0659a5c3307a AT gmail DOT com> <aa7a837b-e64f-c4fb-9a4f-3c8de1dc7284 AT cornell DOT edu>
From: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Message-ID: <cb33e319-512a-0ce8-5839-34efc85613cd@gmail.com>
Date: Sun, 6 Aug 2017 18:59:33 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <aa7a837b-e64f-c4fb-9a4f-3c8de1dc7284@cornell.edu>
X-IsSubscribed: yes

On 06/08/2017 18:16, Ken Brown wrote:
> On 8/6/2017 10:51 AM, Marco Atzeri wrote:
>> On 06/08/2017 11:44, Achim Gratz wrote:
>>> The "-std=c*" options are not meant to expose any symbols that are not
>>> defined in the respective C standard.  You almost always want to use
>>> "-std=gnu*" instead if you target POSIX-y systems.
>>
>> formally you are right. However it seems that Cygwin is now
>> more stringent than Linux where this problem does not arise.
>
> That's not what I see on Linux (Scientific Linux 7.2):
>

thanks Ken for the check.

I should have reported the full error

error: ‘SIG_SETMASK’ undeclared (first use in this function)
      #define HDsigsetjmp(J,N)  sigsetjmp(J,N)


from the macro definition in
/usr/include/machine/setjmp.h

It seems sigsetjmp is export anyway and using SIG_SETMASK

---------------------------------------------------
#ifdef __CYGWIN__
/* Per POSIX, siglongjmp has to be implemented as function.  Cygwin
    provides functions for both, siglongjmp and sigsetjmp since 2.2.0. */
extern void siglongjmp (sigjmp_buf, int) __attribute__ ((__noreturn__));
extern int sigsetjmp (sigjmp_buf, int);
#endif

#if defined(__GNUC__)

#define sigsetjmp(env, savemask) \
             __extension__ \
             ({ \
               sigjmp_buf *_sjbuf = &(env); \
               ((*_sjbuf)[_SAVEMASK] = savemask,\
               __SIGMASK_FUNC (SIG_SETMASK, 0, (sigset_t *)((*_sjbuf) + 
_SIGMASK)),\
               setjmp (*_sjbuf)); \
             })

#define siglongjmp(env, val) \
             __extension__ \
             ({ \
               sigjmp_buf *_sjbuf = &(env); \
               ((((*_sjbuf)[_SAVEMASK]) ? \
                __SIGMASK_FUNC (SIG_SETMASK, (sigset_t *)((*_sjbuf) + 
_SIGMASK), 0)\
                : 0), \
                longjmp (*_sjbuf, val)); \
             })

#else /* !__GNUC__ */

#define sigsetjmp(env, savemask) ((env)[_SAVEMASK] = savemask,\
                __SIGMASK_FUNC (SIG_SETMASK, 0, (sigset_t *) ((env) + 
_SIGMASK)),\
                setjmp (env))

#define siglongjmp(env, val) ((((env)[_SAVEMASK])?\
                __SIGMASK_FUNC (SIG_SETMASK, (sigset_t *) ((env) + 
_SIGMASK), 0):0),\
                longjmp (env, val))

#endif

------------------------------------------------------

hdf5 seems wrong to use sigsetjmp and C99 but Cygwin seems to
have a consistency issue.

Regards
Marco


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019