summaryrefslogtreecommitdiff
path: root/src/csplit.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-10-04 03:46:35 +0000
committerJim Meyering <jim@meyering.net>1995-10-04 03:46:35 +0000
commita9de4d485ab79fd92396d35722c118dbe3b649e0 (patch)
treef19a87ed66ad7b7e35c55dbbd3e89c88d9ecfeb1 /src/csplit.c
parent111cb717e8a982aa7030b891c99cd2c9c135bf22 (diff)
downloadcoreutils-a9de4d485ab79fd92396d35722c118dbe3b649e0.tar.xz
Test SA_INTERRUPT, not _POSIX_VERSION,
to determine whether `sigaction' functions are available. Reported by Paul Nevai <nevai@ops.mps.ohio-state.edu>. Fix suggested by Karl Berry.
Diffstat (limited to 'src/csplit.c')
-rw-r--r--src/csplit.c8
1 files changed, 4 insertions, 4 deletions
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)