[PATCH] fix gcc -std=c89 in <sys/signal.h>

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Wed Oct 7 17:07:00 GMT 2009


On latest Cygwin:

$ echo "#include <sys/signal.h>" > test.c
$ gcc -c test.c
$ gcc -c -std=c89 test.c
In file included from /usr/include/sys/signal.h:107,
                   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 test.c:1:
/usr/include/sys/signal.h:152: error: expected ')' before 'int'

The problem is that both <cygwin/signal.h> and an (__CYGWIN__ || 
__rtems__) section of <sys/signal.h> need those typedefs from 
<sys/types.h>, but the latter is only #include'd #ifdef _POSIX_THREADS, 
which is off in C89 mode.

Patch attached.


Yaakov
Cygwin/X

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: newlib-sys-signal-c89.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20091007/dc03536e/attachment.ksh>


More information about the Newlib mailing list