summaryrefslogtreecommitdiff
path: root/libarchive_fe
diff options
context:
space:
mode:
authorEric N. Vander Weele <ericvw@gmail.com>2016-03-18 14:31:12 -0700
committerEric N. Vander Weele <ericvw@gmail.com>2016-03-18 14:31:12 -0700
commitb505af9a3a9b2813d3359194ac5a0b9221944850 (patch)
treee3714862f220cc68207876beefb112ab41a718c7 /libarchive_fe
parentdf2b46bf40d073bc9547c4c96f486a1fa05bd4cc (diff)
downloadlibarchive-b505af9a3a9b2813d3359194ac5a0b9221944850.tar.gz
Replace usage of _NSIG with SIGRTMAX
POSIX specification defines SIGRTMAX. _NSIG is not defined on all platforms (e.g, AIX). Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com>
Diffstat (limited to 'libarchive_fe')
-rw-r--r--libarchive_fe/passphrase.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libarchive_fe/passphrase.c b/libarchive_fe/passphrase.c
index 96d8f0a7..c9eaba64 100644
--- a/libarchive_fe/passphrase.c
+++ b/libarchive_fe/passphrase.c
@@ -142,7 +142,7 @@ readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
# define _POSIX_VDISABLE VDISABLE
#endif
-static volatile sig_atomic_t signo[_NSIG];
+static volatile sig_atomic_t signo[SIGRTMAX];
static void
handler(int s)
@@ -168,7 +168,7 @@ readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
}
restart:
- for (i = 0; i < _NSIG; i++)
+ for (i = 0; i < SIGRTMAX; i++)
signo[i] = 0;
nr = -1;
save_errno = 0;
@@ -273,7 +273,7 @@ restart:
* If we were interrupted by a signal, resend it to ourselves
* now that we have restored the signal handlers.
*/
- for (i = 0; i < _NSIG; i++) {
+ for (i = 0; i < SIGRTMAX; i++) {
if (signo[i]) {
kill(getpid(), i);
switch (i) {