ref: db97bc62e54fed5b11a0859356153b5086cff131
parent: 02c2ed32fab95df4ce2ea9be16f8d40370bde268
author: Naveen Narayanan <zerous@simple-cc.org>
date: Mon Aug 31 17:24:49 EDT 2020
cmd: Check before throwing SIGQUIT in ar.c Check if SIGQUIT is exposed before throwing it as the c99/89 interface does not expose it. scc limits the posix namespace in order to make use of certain function names (such as getline) using feature test macros.
--- a/src/cmd/ar.c
+++ b/src/cmd/ar.c
@@ -640,7 +640,9 @@
usage();
signal(SIGINT, sigfun);
+#ifdef SIGQUIT
signal(SIGQUIT, sigfun);
+#endif
signal(SIGTERM, sigfun);
arfile = *argv;