diff options
-rw-r--r-- | src/ChangeLog | 10 | ||||
-rw-r--r-- | src/graph/viewman/sselect.c | 14 | ||||
-rw-r--r-- | src/graph/viewman/viewman.c | 11 | ||||
-rw-r--r-- | src/hyper/hyper.c | 6 | ||||
-rw-r--r-- | src/include/bsdsignal.h | 8 | ||||
-rw-r--r-- | src/lib/fnct_key.c | 8 |
6 files changed, 22 insertions, 35 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index cddbd22d..1d8a5b18 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,15 @@ 2008-04-04 Gabriel Dos Reis <gdr@cs.tamu.edu> + * include/bsdsignal.h: Include <signal.h>. + (OPENAXIOM_SIGCHLD): New macro. + * hyper/hyper.c (main): Use OPENAXIOM_SIGCHLD. + * graph/viewman/viewman.c: Don't include <signal.h> directly. + (main): Use OPENAXIOM_SIGCHLD. + * graph/viewman/sselect.c: Don't include <signal.h> directly. + (superSelect): Tidy. Use OPENAXIOM_SIGCHLD. + +2008-04-04 Gabriel Dos Reis <gdr@cs.tamu.edu> + * lib/Makefile.in (libopen_axiom_core_objects): Tidy. 2008-04-03 Gabriel Dos Reis <gdr@cs.tamu.edu> diff --git a/src/graph/viewman/sselect.c b/src/graph/viewman/sselect.c index a9b16528..96516be2 100644 --- a/src/graph/viewman/sselect.c +++ b/src/graph/viewman/sselect.c @@ -40,7 +40,6 @@ #include <errno.h> #include <sys/time.h> #include <sys/wait.h> -#include <signal.h> #include "viewman.h" #include "bsdsignal.h" @@ -61,14 +60,7 @@ *******************************************/ int -#ifdef _NO_PROTO -superSelect(n, rd, wr, ex, timeout) - int n; - int *rd, *wr, *ex; - char *timeout; -#else superSelect(int n, int *rd, int *wr, int *ex, char *timeout) -#endif { int waiting; @@ -89,11 +81,7 @@ superSelect(int n, int *rd, int *wr, int *ex, char *timeout) /* flush(spadSock); */ /* send_int(spadSock,1); acknowledge to spad */ checkClosedChild = no; -#if defined(BSDplatform) || defined(MACOSXplatform) - bsdSignal(SIGCHLD,endChild,DontRestartSystemCalls); -#else - bsdSignal(SIGCLD,endChild,DontRestartSystemCalls); -#endif + bsdSignal(OPENAXIOM_SIGCHLD,endChild,DontRestartSystemCalls); } } ret_val = select(n, (void *)rd, (void *)wr, (void *)ex, (void *)timeout); diff --git a/src/graph/viewman/viewman.c b/src/graph/viewman/viewman.c index aaacef25..96a6e13f 100644 --- a/src/graph/viewman/viewman.c +++ b/src/graph/viewman/viewman.c @@ -41,7 +41,6 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#include <signal.h> #include "viewman.h" #include "mode.h" #include "actions.h" @@ -86,22 +85,14 @@ char *s1, int -#ifdef _NO_PROTO -main () -#else main (void) -#endif { graphStruct *aGraph; int keepLooking,code; bsdSignal(SIGPIPE,brokenPipe,DontRestartSystemCalls); -#if defined(BSDplatform) || defined (MACOSXplatform) - bsdSignal(SIGCHLD,endChild,RestartSystemCalls); -#else - bsdSignal(SIGCLD,endChild,RestartSystemCalls); -#endif + bsdSignal(OPENAXIOM_SIGCHLD,endChild,RestartSystemCalls); bsdSignal(SIGTERM,goodbye,DontRestartSystemCalls); /* Connect up to AXIOM server */ diff --git a/src/hyper/hyper.c b/src/hyper/hyper.c index ef00c891..152ccc35 100644 --- a/src/hyper/hyper.c +++ b/src/hyper/hyper.c @@ -258,11 +258,7 @@ main(int argc, char **argv) */ bsdSignal(SIGUSR2, sigusr2_handler,RestartSystemCalls); bsdSignal(SIGUSR1, SIG_IGN,RestartSystemCalls); -#if defined(BSDplatform) || defined(MACOSXplatform) - bsdSignal(SIGCHLD, sigcld_handler,RestartSystemCalls); -#else - bsdSignal(SIGCLD, sigcld_handler,RestartSystemCalls); -#endif + bsdSignal(OPENAXIOM_SIGCHLD, sigcld_handler,RestartSystemCalls); bsdSignal(SIGINT, SIG_IGN,RestartSystemCalls); /* diff --git a/src/include/bsdsignal.h b/src/include/bsdsignal.h index 5b724bbf..1a55293c 100644 --- a/src/include/bsdsignal.h +++ b/src/include/bsdsignal.h @@ -38,6 +38,14 @@ #include "open-axiom.h" +#include <signal.h> + +#ifdef SIGCHLD +# define OPENAXIOM_SIGCHLD SIGCHLD +#elif defined (SIGCLD) +# define OPENAXIOM_SIGCHLD SIGCLD +#endif + #define RestartSystemCalls 1 #define DontRestartSystemCalls 0 diff --git a/src/lib/fnct_key.c b/src/lib/fnct_key.c index c9240fd6..9e9e08f2 100644 --- a/src/lib/fnct_key.c +++ b/src/lib/fnct_key.c @@ -44,8 +44,6 @@ #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> -#include <signal.h> - #include "edible.h" #include "bsdsignal.h" @@ -309,11 +307,7 @@ handle_function_key(int key,int chann) close(fd); } } -#if defined(MACOSXplatform) || defined(BSDplatform) - bsdSignal(SIGCHLD, null_fnct,RestartSystemCalls); -#else - bsdSignal(SIGCLD, null_fnct,RestartSystemCalls); -#endif + bsdSignal(OPENAXIOM_SIGCHLD, null_fnct,RestartSystemCalls); switch (id = fork()) { case -1: perror("Special key"); |