]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/ui/ui_openssl.c
Netware-specific changes,
[thirdparty/openssl.git] / crypto / ui / ui_openssl.c
index 75318d48a14290ddd7dc84eeba9ba2486d368634..fad17024a03e09c84800ddffc8bdb28a02f593dd 100644 (file)
 
 #include <openssl/e_os2.h>
 
+#define _POSIX_C_SOURCE 1
+#include <signal.h>
+#include <stdio.h>
+#undef _POSIX_C_SOURCE
+#include <string.h>
+#include <errno.h>
+
 #if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS)
 # ifdef OPENSSL_UNISTD
 #  include OPENSSL_UNISTD
 /* 06-Apr-92 Luke Brennan    Support for VMS */
 #include "ui_locl.h"
 #include "cryptlib.h"
-#include <signal.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
 
 #ifdef OPENSSL_SYS_VMS         /* prototypes for sys$whatever */
 # include <starlet.h>
 #undef SGTTY
 #endif
 
+#if defined(OPENSSL_SYS_NETWARE)
+#undef TERMIOS
+#undef TERMIO
+#undef SGTTY
+#endif
+
 #ifdef TERMIOS
 # include <termios.h>
 # define TTY_STRUCT            struct termios
@@ -247,7 +256,7 @@ struct IOSB {
        typedef int sig_atomic_t;
 #endif
 
-#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(MAC_OS_GUSI_SOURCE)
+#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(MAC_OS_GUSI_SOURCE) || defined(OPENSSL_SYS_NETWARE)
 /*
  * This one needs work. As a matter of fact the code is unoperational
  * and this is only a trick to get it compiled.
@@ -460,7 +469,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_VXWORKS)
+#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE)
        tty_in=stdin;
        tty_out=stderr;
 #else
@@ -476,7 +485,7 @@ static int open_console(UI *ui)
 #endif
 
 #if defined(TTY_get) && !defined(OPENSSL_SYS_VMS)
-       if (TTY_get(fileno(tty_in),&tty_orig) == -1)
+       if (TTY_get(fileno(tty_in),&tty_orig) == -1)
                {
 #ifdef ENOTTY
                if (errno == ENOTTY)