From a9de4d485ab79fd92396d35722c118dbe3b649e0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 4 Oct 1995 03:46:35 +0000 Subject: Test SA_INTERRUPT, not _POSIX_VERSION, to determine whether `sigaction' functions are available. Reported by Paul Nevai . Fix suggested by Karl Berry. --- src/csplit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/csplit.c') diff --git a/src/csplit.c b/src/csplit.c index e80917d17..a81144a66 100644 --- a/src/csplit.c +++ b/src/csplit.c @@ -1435,9 +1435,9 @@ main (argc, argv) char **argv; { int optc; -#ifdef _POSIX_VERSION +#ifdef SA_INTERRUPT struct sigaction oldact, newact; -#endif /* _POSIX_VERSION */ +#endif /* SA_INTERRUPT */ program_name = argv[0]; global_argv = argv; @@ -1447,7 +1447,7 @@ main (argc, argv) remove_files = TRUE; prefix = DEFAULT_PREFIX; -#ifdef _POSIX_VERSION +#ifdef SA_INTERRUPT newact.sa_handler = interrupt_handler; sigemptyset (&newact.sa_mask); newact.sa_flags = 0; @@ -1467,7 +1467,7 @@ main (argc, argv) sigaction (SIGTERM, NULL, &oldact); if (oldact.sa_handler != SIG_IGN) sigaction (SIGTERM, &newact, NULL); -#else /* !_POSIX_VERSION */ +#else if (signal (SIGHUP, SIG_IGN) != SIG_IGN) signal (SIGHUP, interrupt_handler); if (signal (SIGINT, SIG_IGN) != SIG_IGN) -- cgit v1.2.3-70-g09d2