X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Sun, 30 Dec 2001 16:13:06 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp AT delorie DOT com Subject: Re: SIGWINCH and SIGPIPE In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.