|
@@ -56,7 +56,7 @@
|
|
* [including the GNU Public Licence.]
|
|
* [including the GNU Public Licence.]
|
|
*/
|
|
*/
|
|
|
|
|
|
-#if !defined(MSDOS) && !defined(VMS) && !defined(WIN32)
|
|
|
|
|
|
+#if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_WIN32)
|
|
#include <openssl/opensslconf.h>
|
|
#include <openssl/opensslconf.h>
|
|
#ifdef OPENSSL_UNISTD
|
|
#ifdef OPENSSL_UNISTD
|
|
# include OPENSSL_UNISTD
|
|
# include OPENSSL_UNISTD
|
|
@@ -78,7 +78,7 @@
|
|
/* #define SIGACTION */ /* Define this if you have sigaction() */
|
|
/* #define SIGACTION */ /* Define this if you have sigaction() */
|
|
|
|
|
|
#ifdef WIN16TTY
|
|
#ifdef WIN16TTY
|
|
-#undef WIN16
|
|
|
|
|
|
+#undef OPENSSL_SYS_WIN16
|
|
#undef _WINDOWS
|
|
#undef _WINDOWS
|
|
#include <graph.h>
|
|
#include <graph.h>
|
|
#endif
|
|
#endif
|
|
@@ -92,7 +92,7 @@
|
|
#include <setjmp.h>
|
|
#include <setjmp.h>
|
|
#include <errno.h>
|
|
#include <errno.h>
|
|
|
|
|
|
-#ifdef VMS /* prototypes for sys$whatever */
|
|
|
|
|
|
+#ifdef OPENSSL_SYS_VMS /* prototypes for sys$whatever */
|
|
#include <starlet.h>
|
|
#include <starlet.h>
|
|
#ifdef __DECC
|
|
#ifdef __DECC
|
|
#pragma message disable DOLLARID
|
|
#pragma message disable DOLLARID
|
|
@@ -127,7 +127,7 @@
|
|
#undef SGTTY
|
|
#undef SGTTY
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#if !defined(TERMIO) && !defined(TERMIOS) && !defined(VMS) && !defined(MSDOS) && !defined(MAC_OS_pre_X) && !defined(MAC_OS_GUSI_SOURCE)
|
|
|
|
|
|
+#if !defined(TERMIO) && !defined(TERMIOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_MSDOS) && !defined(MAC_OS_pre_X) && !defined(MAC_OS_GUSI_SOURCE)
|
|
#undef TERMIOS
|
|
#undef TERMIOS
|
|
#undef TERMIO
|
|
#undef TERMIO
|
|
#define SGTTY
|
|
#define SGTTY
|
|
@@ -157,16 +157,16 @@
|
|
#define TTY_set(tty,data) ioctl(tty,TIOCSETP,data)
|
|
#define TTY_set(tty,data) ioctl(tty,TIOCSETP,data)
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#if !defined(_LIBC) && !defined(MSDOS) && !defined(VMS) && !defined(MAC_OS_pre_X)
|
|
|
|
|
|
+#if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(MAC_OS_pre_X)
|
|
#include <sys/ioctl.h>
|
|
#include <sys/ioctl.h>
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#if defined(MSDOS) && !defined(__CYGWIN32__)
|
|
|
|
|
|
+#if defined(OPENSSL_SYS_MSDOS) && !defined(__CYGWIN32__)
|
|
#include <conio.h>
|
|
#include <conio.h>
|
|
#define fgets(a,b,c) noecho_fgets(a,b,c)
|
|
#define fgets(a,b,c) noecho_fgets(a,b,c)
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#ifdef VMS
|
|
|
|
|
|
+#ifdef OPENSSL_SYS_VMS
|
|
#include <ssdef.h>
|
|
#include <ssdef.h>
|
|
#include <iodef.h>
|
|
#include <iodef.h>
|
|
#include <ttdef.h>
|
|
#include <ttdef.h>
|
|
@@ -195,7 +195,7 @@ static void read_till_nl(FILE *);
|
|
static void recsig(int);
|
|
static void recsig(int);
|
|
static void pushsig(void);
|
|
static void pushsig(void);
|
|
static void popsig(void);
|
|
static void popsig(void);
|
|
-#if defined(MSDOS) && !defined(WIN16)
|
|
|
|
|
|
+#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN16)
|
|
static int noecho_fgets(char *buf, int size, FILE *tty);
|
|
static int noecho_fgets(char *buf, int size, FILE *tty);
|
|
#endif
|
|
#endif
|
|
#ifdef SIGACTION
|
|
#ifdef SIGACTION
|
|
@@ -216,7 +216,7 @@ int des_read_pw_string(char *buf, int length, const char *prompt,
|
|
return(ret);
|
|
return(ret);
|
|
}
|
|
}
|
|
|
|
|
|
-#ifndef WIN16
|
|
|
|
|
|
+#ifndef OPENSSL_SYS_WIN16
|
|
|
|
|
|
static void read_till_nl(FILE *in)
|
|
static void read_till_nl(FILE *in)
|
|
{
|
|
{
|
|
@@ -233,14 +233,14 @@ static void read_till_nl(FILE *in)
|
|
int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
|
int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
|
int verify)
|
|
int verify)
|
|
{
|
|
{
|
|
-#ifdef VMS
|
|
|
|
|
|
+#ifdef OPENSSL_SYS_VMS
|
|
struct IOSB iosb;
|
|
struct IOSB iosb;
|
|
$DESCRIPTOR(terminal,"TT");
|
|
$DESCRIPTOR(terminal,"TT");
|
|
long tty_orig[3], tty_new[3];
|
|
long tty_orig[3], tty_new[3];
|
|
long status;
|
|
long status;
|
|
unsigned short channel = 0;
|
|
unsigned short channel = 0;
|
|
#else
|
|
#else
|
|
-#ifndef MSDOS
|
|
|
|
|
|
+#ifndef OPENSSL_SYS_MSDOS
|
|
TTY_STRUCT tty_orig,tty_new;
|
|
TTY_STRUCT tty_orig,tty_new;
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
@@ -265,7 +265,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
|
is_a_tty=1;
|
|
is_a_tty=1;
|
|
tty=NULL;
|
|
tty=NULL;
|
|
|
|
|
|
-#ifdef MSDOS
|
|
|
|
|
|
+#ifdef OPENSSL_SYS_MSDOS
|
|
if ((tty=fopen("con","r")) == NULL)
|
|
if ((tty=fopen("con","r")) == NULL)
|
|
tty=stdin;
|
|
tty=stdin;
|
|
#elif defined(MAC_OS_pre_X)
|
|
#elif defined(MAC_OS_pre_X)
|
|
@@ -277,7 +277,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
|
tty=stdin;
|
|
tty=stdin;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#if defined(TTY_get) && !defined(VMS)
|
|
|
|
|
|
+#if defined(TTY_get) && !defined(OPENSSL_SYS_VMS)
|
|
if (TTY_get(fileno(tty),&tty_orig) == -1)
|
|
if (TTY_get(fileno(tty),&tty_orig) == -1)
|
|
{
|
|
{
|
|
#ifdef ENOTTY
|
|
#ifdef ENOTTY
|
|
@@ -296,7 +296,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
|
}
|
|
}
|
|
memcpy(&(tty_new),&(tty_orig),sizeof(tty_orig));
|
|
memcpy(&(tty_new),&(tty_orig),sizeof(tty_orig));
|
|
#endif
|
|
#endif
|
|
-#ifdef VMS
|
|
|
|
|
|
+#ifdef OPENSSL_SYS_VMS
|
|
status = sys$assign(&terminal,&channel,0,0);
|
|
status = sys$assign(&terminal,&channel,0,0);
|
|
if (status != SS$_NORMAL)
|
|
if (status != SS$_NORMAL)
|
|
return(-1);
|
|
return(-1);
|
|
@@ -312,7 +312,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
|
tty_new.TTY_FLAGS &= ~ECHO;
|
|
tty_new.TTY_FLAGS &= ~ECHO;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-#if defined(TTY_set) && !defined(VMS)
|
|
|
|
|
|
+#if defined(TTY_set) && !defined(OPENSSL_SYS_VMS)
|
|
if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1))
|
|
if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1))
|
|
#ifdef OPENSSL_SYS_MPE
|
|
#ifdef OPENSSL_SYS_MPE
|
|
; /* MPE lies -- echo really has been disabled */
|
|
; /* MPE lies -- echo really has been disabled */
|
|
@@ -320,7 +320,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
|
return(-1);
|
|
return(-1);
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
-#ifdef VMS
|
|
|
|
|
|
+#ifdef OPENSSL_SYS_VMS
|
|
tty_new[0] = tty_orig[0];
|
|
tty_new[0] = tty_orig[0];
|
|
tty_new[1] = tty_orig[1] | TT$M_NOECHO;
|
|
tty_new[1] = tty_orig[1] | TT$M_NOECHO;
|
|
tty_new[2] = tty_orig[2];
|
|
tty_new[2] = tty_orig[2];
|
|
@@ -370,10 +370,10 @@ error:
|
|
perror("fgets(tty)");
|
|
perror("fgets(tty)");
|
|
#endif
|
|
#endif
|
|
/* What can we do if there is an error? */
|
|
/* What can we do if there is an error? */
|
|
-#if defined(TTY_set) && !defined(VMS)
|
|
|
|
|
|
+#if defined(TTY_set) && !defined(OPENSSL_SYS_VMS)
|
|
if (ps >= 2) TTY_set(fileno(tty),&tty_orig);
|
|
if (ps >= 2) TTY_set(fileno(tty),&tty_orig);
|
|
#endif
|
|
#endif
|
|
-#ifdef VMS
|
|
|
|
|
|
+#ifdef OPENSSL_SYS_VMS
|
|
if (ps >= 2)
|
|
if (ps >= 2)
|
|
status = sys$qiow(0,channel,IO$_SETMODE,&iosb,0,0
|
|
status = sys$qiow(0,channel,IO$_SETMODE,&iosb,0,0
|
|
,tty_orig,12,0,0,0,0);
|
|
,tty_orig,12,0,0,0,0);
|
|
@@ -381,13 +381,13 @@ error:
|
|
|
|
|
|
if (ps >= 1) popsig();
|
|
if (ps >= 1) popsig();
|
|
if (stdin != tty) fclose(tty);
|
|
if (stdin != tty) fclose(tty);
|
|
-#ifdef VMS
|
|
|
|
|
|
+#ifdef OPENSSL_SYS_VMS
|
|
status = sys$dassgn(channel);
|
|
status = sys$dassgn(channel);
|
|
#endif
|
|
#endif
|
|
return(!ok);
|
|
return(!ok);
|
|
}
|
|
}
|
|
|
|
|
|
-#else /* WIN16 */
|
|
|
|
|
|
+#else /* OPENSSL_SYS_WIN16 */
|
|
|
|
|
|
int des_read_pw(char *buf, char *buff, int size, char *prompt, int verify)
|
|
int des_read_pw(char *buf, char *buff, int size, char *prompt, int verify)
|
|
{
|
|
{
|
|
@@ -460,7 +460,7 @@ static void recsig(int i)
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
-#if defined(MSDOS) && !defined(WIN16)
|
|
|
|
|
|
+#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN16)
|
|
static int noecho_fgets(char *buf, int size, FILE *tty)
|
|
static int noecho_fgets(char *buf, int size, FILE *tty)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|