diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-04-24 14:03:39 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-04-24 14:03:39 +0000 |
commit | 7c5b7a03fd36a0164dc742cfa755e8a77b77fb57 (patch) | |
tree | 9ca351f936bf3ef0489324384d346ea7b97b8187 /lib/libcrypto | |
parent | 931a80118c15fe9a6a3634d9fbdf57e07483cf98 (diff) |
You want signals?!? I'll give you signals!!! Oh, and we have termios as
well...
ok beck@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/ui/ui_openssl.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/libcrypto/ui/ui_openssl.c b/lib/libcrypto/ui/ui_openssl.c index 7ae1601e532..a67cf53f2af 100644 --- a/lib/libcrypto/ui/ui_openssl.c +++ b/lib/libcrypto/ui/ui_openssl.c @@ -141,27 +141,13 @@ * TERMIO, TERMIOS, VMS, MSDOS and SGTTY */ -#ifdef _LIBC -#undef TERMIOS -#define TERMIO -#undef SGTTY -#endif -#ifdef TERMIOS #include <termios.h> #define TTY_STRUCT struct termios #define TTY_FLAGS c_lflag #define TTY_get(tty,data) tcgetattr(tty,data) #define TTY_set(tty,data) tcsetattr(tty,TCSANOW,data) -#endif -#ifdef TERMIO -#include <termio.h> -#define TTY_STRUCT struct termio -#define TTY_FLAGS c_lflag -#define TTY_get(tty,data) ioctl(tty,TCGETA,data) -#define TTY_set(tty,data) ioctl(tty,TCSETA,data) -#endif #include <sys/ioctl.h> @@ -171,11 +157,7 @@ /* Define globals. They are protected by a lock */ -#ifdef SIGACTION static struct sigaction savsig[NX509_SIG]; -#else -static void (*savsig[NX509_SIG]) (int); -#endif static TTY_STRUCT tty_orig, tty_new; static FILE *tty_in, *tty_out; @@ -416,36 +398,22 @@ static void pushsig(void) { int i; -#ifdef SIGACTION struct sigaction sa; memset(&sa, 0, sizeof sa); sa.sa_handler = recsig; -#endif for (i = 1; i < NX509_SIG; i++) { -#ifdef SIGUSR1 if (i == SIGUSR1) continue; -#endif -#ifdef SIGUSR2 if (i == SIGUSR2) continue; -#endif -#ifdef SIGKILL if (i == SIGKILL) /* We can't make any action on that. */ continue; -#endif -#ifdef SIGACTION sigaction(i, &sa, &savsig[i]); -#else - savsig[i] = signal(i, recsig); -#endif } -#ifdef SIGWINCH signal(SIGWINCH, SIG_DFL); -#endif } static void @@ -457,11 +425,7 @@ popsig(void) continue; if (i == SIGUSR2) continue; -#ifdef SIGACTION sigaction(i, &savsig[i], NULL); -#else - signal(i, savsig[i]); -#endif } } |