X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: HARY Newsgroups: comp.os.msdos.djgpp Subject: SIGWINCH and SIGPIPE Date: Sun, 30 Dec 2001 13:10:14 +0000 (UTC) Organization: Wielki samotnik w swoim zamku. Lines: 54 Message-ID: NNTP-Posting-Host: pf126.wroclaw.cvx.ppp.tpnet.pl X-Trace: news.tpi.pl 1009717814 8559 217.99.224.126 (30 Dec 2001 13:10:14 GMT) X-Complaints-To: usenet AT tpi DOT pl NNTP-Posting-Date: Sun, 30 Dec 2001 13:10:14 +0000 (UTC) User-Agent: slrn/0.9.7.0 (pl-1.1.1) (Linux) X-Pi: 3141592653589793 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, I was trying to compile some UNIX program. Compiler gives an error message "`SIGWINCH' undeclared " for the following code fragment: --[cut]-- void signal_handler () { signal (SIGINT, handle_crash); /* handle ^C */ signal (SIGTERM, handle_crash); /* handle soft kill */ signal (SIGSEGV, handle_crash); /* handle seg. fault */ signal (SIGHUP, handle_crash); /* handle hup signal */ signal (SIGWINCH, handle_window_resize); sigblock (sigmask (SIGPIPE)); /* block broken pipe signal */ } --[/cut]-- When I defined SIGWINCH with '-DSIGWINCH=301' (just to see if it compiles) the message was: signal_h.c:36: warning: left shift count >= width of type coming from line: sigblock (sigmask (SIGPIPE)); 'sigblock' and 'sigmask' are defined in header file as follows: --[cut]-- #ifndef sigmask /* from bash */ #define sigmask(x) (1 << ((x)-1)) /* from glibc */ /* #define sigmask(sig) (((sigset_t) 1) << ((sig) - 1)) */ #endif /* HAVE_SIGMASK */ #ifndef HAVE_SIGBLOCK int sigblock (int mask); #endif /* HAVE_SIGBLOCK */ --[/cut]-- Here are my questions: 1. Why isn't SIGWINCH defined in djgpp, may be even as some meaningless value, to make porting easier? 2. How should I modify code to compile it? Is SIGPIPE handling needed under DOS/Win or can I simply remove it? Thanks in advance, HARY