This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
cygwin: cygwin-1.5.17-1 Win OS tested: Windows 2000 The sa_handler entry of the sigaction structure is not accessible when I compile with `gcc -ansi' (Makefile and example `signal-test.c' attached): gcc -ansi -o signal-ansi signal.c signal.c: In function `main': signal.c:13: error: structure has no member named `sa_handler' The following line caused the error: sa_on.sa_handler = sighandler; The same program is compilable with `gcc -std=gnu89'. I assume that the anonymous union in `struct sigaction' in /usr/include/cygwin/signal.h is not iso9899:1990 conform. Is compiling with the `-ansi' option not supported by cygwin or is this a bug? In case of it is a bug in cygwin I've also included an example patch which fixes the problem, the code which fixes the problem is taken from /usr/include/signal.h. Regards, Andreas Anschuetz
Attachment:
signal.patch
Description: Text document
#include <signal.h> void sighandler(int sig) { } int main(int argc, char* argv[]) { static struct sigaction sa_on; sa_on.sa_flags = 0; sa_on.sa_mask = (sigset_t)(0); sa_on.sa_handler = sighandler; }
Attachment:
Makefile
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |