Mercurial > hg > xemacs-beta
comparison src/syssignal.h @ 2286:04bc9d2f42c7
[xemacs-hg @ 2004-09-20 19:18:55 by james]
Mark all unused parameters as unused. Also eliminate some unneeded local
variables.
author | james |
---|---|
date | Mon, 20 Sep 2004 19:20:08 +0000 |
parents | 13e47461d509 |
children | 3580ae2ce979 |
comparison
equal
deleted
inserted
replaced
2285:914c5afaac33 | 2286:04bc9d2f42c7 |
---|---|
146 sigprocmask (0, NULL, &ES_mask); \ | 146 sigprocmask (0, NULL, &ES_mask); \ |
147 sigdelset (&ES_mask, sig); \ | 147 sigdelset (&ES_mask, sig); \ |
148 sigsuspend (&ES_mask); \ | 148 sigsuspend (&ES_mask); \ |
149 } while (0) | 149 } while (0) |
150 #define EMACS_REESTABLISH_SIGNAL(sig, handler) | 150 #define EMACS_REESTABLISH_SIGNAL(sig, handler) |
151 #define SIG_ARG_MAYBE_UNUSED(decl) UNUSED (decl) | |
151 | 152 |
152 #elif defined (HAVE_SIGBLOCK) | 153 #elif defined (HAVE_SIGBLOCK) |
153 | 154 |
154 /* The older BSD way (signal/sigvec, sigblock, sigsetmask, sigpause) */ | 155 /* The older BSD way (signal/sigvec, sigblock, sigsetmask, sigpause) */ |
155 | 156 |
171 { \ | 172 { \ |
172 int ES_mask = sigblock (0); \ | 173 int ES_mask = sigblock (0); \ |
173 sigpause (ES_mask & ~sigmask (sig)); \ | 174 sigpause (ES_mask & ~sigmask (sig)); \ |
174 } while (0) | 175 } while (0) |
175 #define EMACS_REESTABLISH_SIGNAL(sig, handler) | 176 #define EMACS_REESTABLISH_SIGNAL(sig, handler) |
177 #define SIG_ARG_MAYBE_UNUSED(decl) UNUSED (decl) | |
176 | 178 |
177 #elif defined (HAVE_SIGHOLD) | 179 #elif defined (HAVE_SIGHOLD) |
178 | 180 |
179 /* The older SYSV way (signal/sigset, sighold, sigrelse, sigignore, | 181 /* The older SYSV way (signal/sigset, sighold, sigrelse, sigignore, |
180 sigpause) */ | 182 sigpause) */ |
186 Since EMACS_UNBLOCK_ALL_SIGNALS() is only called once (at startup), | 188 Since EMACS_UNBLOCK_ALL_SIGNALS() is only called once (at startup), |
187 it's probably OK to just ignore it. */ | 189 it's probably OK to just ignore it. */ |
188 #define EMACS_UNBLOCK_ALL_SIGNALS() 0 | 190 #define EMACS_UNBLOCK_ALL_SIGNALS() 0 |
189 #define EMACS_WAIT_FOR_SIGNAL(sig) sigpause (sig) | 191 #define EMACS_WAIT_FOR_SIGNAL(sig) sigpause (sig) |
190 #define EMACS_REESTABLISH_SIGNAL(sig, handler) | 192 #define EMACS_REESTABLISH_SIGNAL(sig, handler) |
193 #define SIG_ARG_MAYBE_UNUSED(decl) UNUSED (decl) | |
191 | 194 |
192 #elif defined (WIN32_NATIVE) | 195 #elif defined (WIN32_NATIVE) |
193 | 196 |
194 /* MS Windows signal emulation (in turns emulates the sigset/sighold | 197 /* MS Windows signal emulation (in turns emulates the sigset/sighold |
195 paradigm) */ | 198 paradigm) */ |
201 Since EMACS_UNBLOCK_ALL_SIGNALS() is only called once (at startup), | 204 Since EMACS_UNBLOCK_ALL_SIGNALS() is only called once (at startup), |
202 it's probably OK to just ignore it. */ | 205 it's probably OK to just ignore it. */ |
203 #define EMACS_UNBLOCK_ALL_SIGNALS() 0 | 206 #define EMACS_UNBLOCK_ALL_SIGNALS() 0 |
204 #define EMACS_WAIT_FOR_SIGNAL(sig) mswindows_sigpause (sig) | 207 #define EMACS_WAIT_FOR_SIGNAL(sig) mswindows_sigpause (sig) |
205 #define EMACS_REESTABLISH_SIGNAL(sig, handler) | 208 #define EMACS_REESTABLISH_SIGNAL(sig, handler) |
209 #define SIG_ARG_MAYBE_UNUSED(decl) UNUSED (decl) | |
206 | 210 |
207 /* Defines that we need that aren't in the standard signal.h */ | 211 /* Defines that we need that aren't in the standard signal.h */ |
208 #define SIGHUP 1 /* Hang up */ | 212 #define SIGHUP 1 /* Hang up */ |
209 #define SIGQUIT 3 /* Quit process */ | 213 #define SIGQUIT 3 /* Quit process */ |
210 #define SIGKILL 9 /* Die, die die */ | 214 #define SIGKILL 9 /* Die, die die */ |
225 { \ | 229 { \ |
226 int old_errno = errno; \ | 230 int old_errno = errno; \ |
227 signal (sig, handler); \ | 231 signal (sig, handler); \ |
228 errno = old_errno; \ | 232 errno = old_errno; \ |
229 } while (0) | 233 } while (0) |
234 #define SIG_ARG_MAYBE_UNUSED(decl) decl | |
230 | 235 |
231 /* Under SYSV, setting a signal handler for SIGCLD causes | 236 /* Under SYSV, setting a signal handler for SIGCLD causes |
232 SIGCLD to immediately be sent if there any unwaited processes | 237 SIGCLD to immediately be sent if there any unwaited processes |
233 out there. This means that the SIGCLD handler *must* call | 238 out there. This means that the SIGCLD handler *must* call |
234 wait() to reap the status of all processes -- it cannot | 239 wait() to reap the status of all processes -- it cannot |