delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/12/30/11:40:07

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 <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp AT delorie DOT com
Subject: Re: SIGWINCH and SIGPIPE
In-Reply-To: <slrn.pl.a2u49o.di.Hary@localhost.localdomain>
Message-ID: <Pine.SUN.3.91.1011230160410.11150B-100000@is>
MIME-Version: 1.0
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

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019