Correct support for SunOS 4.1.3_U1.
[openssl.git] / crypto / ui / ui_openssl.c
index 4e121654101f14973a03a38786b8012f74153696..793846cbc64f4b86a67917574d40b77f0dcd0aa6 100644 (file)
 # define SGTTY
 #endif
 
-#if defined(OPENSSL_SYS_VSWORKS)
+#if defined(OPENSSL_SYS_VXWORKS)
 #undef TERMIOS
 #undef TERMIO
 #undef SGTTY
 # define TTY_set(tty,data)     ioctl(tty,TIOCSETP,data)
 #endif
 
-#if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_MACINTOSH_CLASSIC)
+#if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && !defined(OPENSSL_SYS_SUNOS)
 # include <sys/ioctl.h>
 #endif
 
@@ -241,6 +241,10 @@ struct IOSB {
        };
 #endif
 
+#ifdef OPENSSL_SYS_SUNOS
+       typedef int sig_atomic_t;
+#endif
+
 #if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(MAC_OS_GUSI_SOURCE)
 /*
  * This one needs work. As a matter of fact the code is unoperational
@@ -269,7 +273,7 @@ static long tty_orig[3], tty_new[3]; /* XXX   Is there any guarantee that this w
 static long status;
 static unsigned short channel = 0;
 #else
-#ifndef OPENSSL_SYS_MSDOS
+#if !defined(OPENSSL_SYS_MSDOS) || defined(__DJGPP__)
 static TTY_STRUCT tty_orig,tty_new;
 #endif
 #endif
@@ -378,7 +382,7 @@ static void read_till_nl(FILE *in)
                } while (strchr(buf,'\n') == NULL);
        }
 
-static sig_atomic_t intr_signal;
+static volatile sig_atomic_t intr_signal;
 
 static int read_string_inner(UI *ui, UI_STRING *uis, int echo, int strip_nl)
        {
@@ -450,7 +454,7 @@ static int open_console(UI *ui)
        CRYPTO_w_lock(CRYPTO_LOCK_UI);
        is_a_tty = 1;
 
-#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_VSWORKS)
+#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_VXWORKS)
        tty_in=stdin;
        tty_out=stderr;
 #else