delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <49CB0834.3010904@gmail.com> |
Date: | Thu, 26 Mar 2009 04:44:36 +0000 |
From: | Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com> |
User-Agent: | Thunderbird 2.0.0.17 (Windows/20080914) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: [1.7] <signal.h> does not compile with -ansi |
References: | <49CAFB8B DOT 7090909 AT users DOT sourceforge DOT net> |
In-Reply-To: | <49CAFB8B.7090909@users.sourceforge.net> |
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 |
Yaakov (Cygwin/X) wrote: > <sys/signal.h> #includes <sys/types.h> only #ifdef _POSIX_THREADS, which > is not defined if the -ansi compiler flag is passed. STC: > > $ echo '#include <signal.h>' > test-signal.c > > $ gcc-4 -ansi -c test-signal.c > In file included from /usr/include/sys/signal.h:107, > from /usr/include/signal.h:5, > from test.c:1: > /usr/include/cygwin/signal.h:74: error: expected > specifier-qualifier-list before 'pthread_attr_t' > /usr/include/cygwin/signal.h:80: error: expected > specifier-qualifier-list before '__uint32_t' > /usr/include/cygwin/signal.h:96: error: expected > specifier-qualifier-list before 'pid_t' > /usr/include/cygwin/signal.h:270: error: expected ')' before 'int' > In file included from /usr/include/signal.h:5, > from test.c:1: > /usr/include/sys/signal.h:152: error: expected ')' before 'int' Posix realtime signals are an extension to the standard C90 spec. The "-ansi" documentation mentions this: The macro `__STRICT_ANSI__' is predefined when the `-ansi' option is used. Some header files may notice this macro and refrain from declaring certain functions or defining certain macros that the ISO standard doesn't call for; this is to avoid interfering with any programs that might use these names for other things. Should signal.h perhaps wrap the stuff tagged 'CX' and 'RTS' at http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html in #ifndef __STICT_ANSI__ ? cheers, DaveK -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |