|
From: Bob R. <bob...@co...> - 2007-04-28 10:36:37
|
On Fri, Apr 27, 2007 at 09:39:45PM +0200, Francisco González Morell wrote: > On vie, 2007-04-27 at 14:57 -0400, Bob Rossi wrote: > > On Fri, Apr 27, 2007 at 11:32:16AM -0700, Brian Dessent wrote: > > > 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. > > > > Or consider changing your application to use a portability layer. Once > > you do that, porting to mingw should be much easier. > > > > Bob Rossi > > > Is there any GPL portability layer already written? Well, there is - apr http://apr.apache.org/ - ACE http://www.cs.wustl.edu/~schmidt/ACE.html - boost http://www.boost.org/ - qt http://www.trolltech.com/products/qt and there is probably more. Bob Rossi |