]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Replace usage of _NSIG with SIGRTMAX 672/head
authorEric N. Vander Weele <ericvw@gmail.com>
Fri, 18 Mar 2016 21:31:12 +0000 (14:31 -0700)
committerEric N. Vander Weele <ericvw@gmail.com>
Fri, 18 Mar 2016 21:31:12 +0000 (14:31 -0700)
POSIX specification defines SIGRTMAX.  _NSIG is not defined on all
platforms (e.g, AIX).

Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com>
libarchive_fe/passphrase.c

index 96d8f0a7b49841eafefd99cf59f5e5bed95b14bc..c9eaba641eaae5a100a0aff9e7156bce02eb7758 100644 (file)
@@ -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) {