delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/07/11/20:01:41

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:date:from:to:subject:message-id:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=rsN
v94OqjUv6tQcd3hYX3jK56ZSqNrH5ooaxRp5NRv+daFwKz6+Z4W6sHiw4/LJAZ0m
hPAuTo6UEDwNq3InBq9mG68C5156ep9bSoCLUUcr3WgKOaKun+28DGJQuWtf0YYj
0+oTHGa1QG8d70O2pEIs1UAOYz+MbY5FSj32er+4=
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:date:from:to:subject:message-id:mime-version
:content-type:content-transfer-encoding; s=default; bh=ES+WYo8L2
MNsc+IPaDxiOhlgkUI=; b=oB6Upf8lm3ylt8SbJP9CuOXeovSlKFbEPxU7uhRHP
W2CHA34L/Urp/UR1s4Xc1+iCGuX1RT8TS+eveqOTPMyOcLejF9BbjLtF0NNUSo69
E8TWYSU6R5SvcbRa0Alpdcao/BDfSZRMJ8dFZC9ZguuRDPtCRCUCfYQqk8IL5oAz
x4=
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=1.1 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,LIKELY_SPAM_FROM,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*r:sk:mail.nu, H*RU:sk:mail.nu, Hx-spam-relays-external:sk:mail.nu, HContent-Transfer-Encoding:8bit
X-HELO: mail.nullprogram.com
Date: Tue, 11 Jul 2017 20:01:07 -0400
From: Christopher Wellons <wellons AT nullprogram DOT com>
To: cygwin AT cygwin DOT com
Subject: Error from signal.h when _POSIX_C_SOURCE == 1
Message-ID: <20170712000107.GJ17540@nullprogram.com>
MIME-Version: 1.0
User-Agent: Mutt/1.5.23 (2014-03-12)

A two-line source file demonstrates this bug:

    #define _POSIX_C_SOURCE 1
    #include <signal.h>

Then when compiled:

    $ gcc -c tmp.c
    In file included from /usr/include/sys/signal.h:22:0,
                     from /usr/include/signal.h:6,
                     from tmp.c:2:
    /usr/include/cygwin/signal.h:328:34: error: unknown type name ‘siginfo_t’
         void  (*sa_sigaction) ( int, siginfo_t *, void * );
                                      ^

Since _POSIX_C_SOURCE < 199309L, siginfo_t isn't defined. However, 
cygwin/signal.h erroneously uses this type anyway when defining struct 
sigaction. The sa_sigaction field in struct sigaction must also be 
guarded by the same feature test macro.

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