|
From: Brian D. <br...@de...> - 2007-04-27 18:32:20
|
DCent wrote: > I want to use some signals in my programme, but there is no termios.h on > Windows, and only signal.h does not work: > > d321go.c: In function `main': > d321go.c:154: error: storage size of 'sig_int_struct' isn't known > d321go.c:166: error: `SIGCHLD' undeclared (first use in this function) > d321go.c:166: error: (Each undeclared identifier is reported only once > d321go.c:166: error: for each function it appears in.) > d321go.c:172: error: `SIGUSR1' undeclared (first use in this function) > d321go.c:178: error: `SIGHUP' undeclared (first use in this function) > > Is there an other solution than termios.h? (it does not work on Windows if I > copy it to the include-dir) You're going to run into countless problems like this unless you change your expectations. MinGW targets the native Windows API, that means no POSIX emulation. Windows does not have signals natively. Yes, technically MSVCRT supports an few signal functions for ANSI C compatibility, but it's really meaningless once you read MSDN and find out that they don't really work. So, you can't just expect to compile your code unchanged with MinGW. You have to port it to windows. If you don't want to do that, then you'll have to use Cygwin. Brian |