Mail Archives: djgpp/2001/12/30/11:40:07
On Sun, 30 Dec 2001, HARY wrote:
> 1. Why isn't SIGWINCH defined in djgpp, may be even as some meaningless
> value, to make porting easier?
Because many applications will assume SIGWINCH is actually supported if
we define it, and will try to run code (in your case, in the function
handle_window_resize) that has no hope of working.
In general, the convention is that if some feature isn't supported, its
manifest constants and symbols should not be defined. Portable code
should do the likes of the following:
#ifdef SIGWINCH
signal (SIGWINCH, handle_window_resize);
#endif
Program which doesn't do that is non-portable.
> 2. How should I modify code to compile it? Is SIGPIPE handling needed
> under DOS/Win or can I simply remove it?
You will never get a SIGPIPE in DJGPP, unless you raise() it manually.
In general, DJGPP doesn't support the old sigmask/sigblock machinery;
instead, we support the newer Posix sigaddset/sigprocmask. So if you do
need to mask signals, you will have to rewrite the code to use the Posix
functions supported by DJGPP.
- Raw text -