diff options
Diffstat (limited to 'crypto/des')
-rw-r--r-- | crypto/des/des.c | 22 | ||||
-rw-r--r-- | crypto/des/des_locl.h | 12 | ||||
-rw-r--r-- | crypto/des/des_opts.c | 8 | ||||
-rw-r--r-- | crypto/des/destest.c | 6 | ||||
-rw-r--r-- | crypto/des/read_pwd.c | 42 | ||||
-rw-r--r-- | crypto/des/speed.c | 6 |
6 files changed, 48 insertions, 48 deletions
diff --git a/crypto/des/des.c b/crypto/des/des.c index 215d7413c0..eebc3a71d6 100644 --- a/crypto/des/des.c +++ b/crypto/des/des.c @@ -59,25 +59,25 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#ifndef MSDOS -#ifndef VMS #include <openssl/opensslconf.h> +#ifndef OPENSSL_SYS_MSDOS +#ifndef OPENSSL_SYS_VMS #include OPENSSL_UNISTD -#else /* VMS */ +#else /* OPENSSL_SYS_VMS */ #ifdef __DECC #include <unistd.h> #else /* not __DECC */ #include <math.h> #endif /* __DECC */ -#endif /* VMS */ -#else /* MSDOS */ +#endif /* OPENSSL_SYS_VMS */ +#else /* OPENSSL_SYS_MSDOS */ #include <io.h> #endif #include <time.h> #include "des_ver.h" -#ifdef VMS +#ifdef OPENSSL_SYS_VMS #include <types.h> #include <stat.h> #else @@ -99,7 +99,7 @@ int uudecode(unsigned char *in,int num,unsigned char *out); void des_3cbc_encrypt(des_cblock *input,des_cblock *output,long length, des_key_schedule sk1,des_key_schedule sk2, des_cblock *ivec1,des_cblock *ivec2,int enc); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS #define EXIT(a) exit(a&0x10000000L) #else #define EXIT(a) exit(a) @@ -258,12 +258,12 @@ int main(int argc, char **argv) #endif if ( (in != NULL) && (out != NULL) && -#ifndef MSDOS +#ifndef OPENSSL_SYS_MSDOS (stat(in,&ins) != -1) && (stat(out,&outs) != -1) && (ins.st_dev == outs.st_dev) && (ins.st_ino == outs.st_ino)) -#else /* MSDOS */ +#else /* OPENSSL_SYS_MSDOS */ (strcmp(in,out) == 0)) #endif { @@ -298,7 +298,7 @@ int main(int argc, char **argv) EXIT(5); } -#ifdef MSDOS +#ifdef OPENSSL_SYS_MSDOS /* This should set the file to binary mode. */ { #include <fcntl.h> @@ -367,7 +367,7 @@ void doencryption(void) des_cblock kk,k2; FILE *O; int Exit=0; -#ifndef MSDOS +#ifndef OPENSSL_SYS_MSDOS static unsigned char buf[BUFSIZE+8],obuf[BUFSIZE+8]; #else static unsigned char *buf=NULL,*obuf=NULL; diff --git a/crypto/des/des_locl.h b/crypto/des/des_locl.h index c75bc52c7a..5a9ba36fb3 100644 --- a/crypto/des/des_locl.h +++ b/crypto/des/des_locl.h @@ -60,8 +60,8 @@ #define HEADER_DES_LOCL_H #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) -#ifndef MSDOS -#define MSDOS +#ifndef OPENSSL_SYS_MSDOS +#define OPENSSL_SYS_MSDOS #endif #endif @@ -70,8 +70,8 @@ #include <openssl/opensslconf.h> -#ifndef MSDOS -#if !defined(VMS) || defined(__DECC) +#ifndef OPENSSL_SYS_MSDOS +#if !defined(OPENSSL_SYS_VMS) || defined(__DECC) #ifdef OPENSSL_UNISTD # include OPENSSL_UNISTD #else @@ -82,14 +82,14 @@ #endif #include <openssl/des.h> -#ifdef MSDOS /* Visual C++ 2.1 (Windows NT/95) */ +#ifdef OPENSSL_SYS_MSDOS /* Visual C++ 2.1 (Windows NT/95) */ #include <stdlib.h> #include <errno.h> #include <time.h> #include <io.h> #endif -#if defined(__STDC__) || defined(VMS) || defined(M_XENIX) || defined(MSDOS) +#if defined(__STDC__) || defined(OPENSSL_SYS_VMS) || defined(M_XENIX) || defined(OPENSSL_SYS_MSDOS) #include <string.h> #endif diff --git a/crypto/des/des_opts.c b/crypto/des/des_opts.c index b2ca7ac31d..c1076757bb 100644 --- a/crypto/des/des_opts.c +++ b/crypto/des/des_opts.c @@ -59,12 +59,12 @@ /* define PART1, PART2, PART3 or PART4 to build only with a few of the options. * This is for machines with 64k code segment size restrictions. */ -#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) +#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) #define TIMES #endif #include <stdio.h> -#ifndef MSDOS +#ifndef OPENSSL_SYS_MSDOS #include <openssl/e_os2.h> #include OPENSSL_UNISTD #else @@ -84,7 +84,7 @@ extern void exit(); The __TMS macro will show if it was. If it wasn't defined, we should undefine TIMES, since that tells the rest of the program how things should be handled. -- Richard Levitte */ -#if defined(VMS) && defined(__DECC) && !defined(__TMS) +#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) #undef TIMES #endif @@ -598,7 +598,7 @@ int main(int argc, char **argv) break; } exit(0); -#if defined(LINT) || defined(MSDOS) +#if defined(LINT) || defined(OPENSSL_SYS_MSDOS) return(0); #endif } diff --git a/crypto/des/destest.c b/crypto/des/destest.c index 2debef304a..6f60e080ff 100644 --- a/crypto/des/destest.c +++ b/crypto/des/destest.c @@ -56,9 +56,9 @@ * [including the GNU Public Licence.] */ -#if defined(WIN32) || defined(WIN16) || defined(WINDOWS) -#ifndef MSDOS -#define MSDOS +#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_SYS_WINDOWS) +#ifndef OPENSSL_SYS_MSDOS +#define OPENSSL_SYS_MSDOS #endif #endif diff --git a/crypto/des/read_pwd.c b/crypto/des/read_pwd.c index b9d8029b8e..dc848f5af3 100644 --- a/crypto/des/read_pwd.c +++ b/crypto/des/read_pwd.c @@ -56,7 +56,7 @@ * [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> #ifdef OPENSSL_UNISTD # include OPENSSL_UNISTD @@ -78,7 +78,7 @@ /* #define SIGACTION */ /* Define this if you have sigaction() */ #ifdef WIN16TTY -#undef WIN16 +#undef OPENSSL_SYS_WIN16 #undef _WINDOWS #include <graph.h> #endif @@ -92,7 +92,7 @@ #include <setjmp.h> #include <errno.h> -#ifdef VMS /* prototypes for sys$whatever */ +#ifdef OPENSSL_SYS_VMS /* prototypes for sys$whatever */ #include <starlet.h> #ifdef __DECC #pragma message disable DOLLARID @@ -127,7 +127,7 @@ #undef SGTTY #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 TERMIO #define SGTTY @@ -157,16 +157,16 @@ #define TTY_set(tty,data) ioctl(tty,TIOCSETP,data) #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> #endif -#if defined(MSDOS) && !defined(__CYGWIN32__) +#if defined(OPENSSL_SYS_MSDOS) && !defined(__CYGWIN32__) #include <conio.h> #define fgets(a,b,c) noecho_fgets(a,b,c) #endif -#ifdef VMS +#ifdef OPENSSL_SYS_VMS #include <ssdef.h> #include <iodef.h> #include <ttdef.h> @@ -195,7 +195,7 @@ static void read_till_nl(FILE *); static void recsig(int); static void pushsig(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); #endif #ifdef SIGACTION @@ -216,7 +216,7 @@ int des_read_pw_string(char *buf, int length, const char *prompt, return(ret); } -#ifndef WIN16 +#ifndef OPENSSL_SYS_WIN16 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 verify) { -#ifdef VMS +#ifdef OPENSSL_SYS_VMS struct IOSB iosb; $DESCRIPTOR(terminal,"TT"); long tty_orig[3], tty_new[3]; long status; unsigned short channel = 0; #else -#ifndef MSDOS +#ifndef OPENSSL_SYS_MSDOS TTY_STRUCT tty_orig,tty_new; #endif #endif @@ -265,7 +265,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt, is_a_tty=1; tty=NULL; -#ifdef MSDOS +#ifdef OPENSSL_SYS_MSDOS if ((tty=fopen("con","r")) == NULL) tty=stdin; #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; #endif -#if defined(TTY_get) && !defined(VMS) +#if defined(TTY_get) && !defined(OPENSSL_SYS_VMS) if (TTY_get(fileno(tty),&tty_orig) == -1) { #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)); #endif -#ifdef VMS +#ifdef OPENSSL_SYS_VMS status = sys$assign(&terminal,&channel,0,0); if (status != SS$_NORMAL) return(-1); @@ -312,7 +312,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt, tty_new.TTY_FLAGS &= ~ECHO; #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)) #ifdef OPENSSL_SYS_MPE ; /* 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); #endif #endif -#ifdef VMS +#ifdef OPENSSL_SYS_VMS tty_new[0] = tty_orig[0]; tty_new[1] = tty_orig[1] | TT$M_NOECHO; tty_new[2] = tty_orig[2]; @@ -370,10 +370,10 @@ error: perror("fgets(tty)"); #endif /* 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); #endif -#ifdef VMS +#ifdef OPENSSL_SYS_VMS if (ps >= 2) status = sys$qiow(0,channel,IO$_SETMODE,&iosb,0,0 ,tty_orig,12,0,0,0,0); @@ -381,13 +381,13 @@ error: if (ps >= 1) popsig(); if (stdin != tty) fclose(tty); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS status = sys$dassgn(channel); #endif return(!ok); } -#else /* WIN16 */ +#else /* OPENSSL_SYS_WIN16 */ int des_read_pw(char *buf, char *buff, int size, char *prompt, int verify) { @@ -460,7 +460,7 @@ static void recsig(int i) #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) { int i; diff --git a/crypto/des/speed.c b/crypto/des/speed.c index 814b86f4ae..1c58b76d87 100644 --- a/crypto/des/speed.c +++ b/crypto/des/speed.c @@ -59,7 +59,7 @@ /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ -#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) +#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) #define TIMES #endif @@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT The __TMS macro will show if it was. If it wasn't defined, we should undefine TIMES, since that tells the rest of the program how things should be handled. -- Richard Levitte */ -#if defined(VMS) && defined(__DECC) && !defined(__TMS) +#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS) #undef TIMES #endif @@ -304,7 +304,7 @@ int main(int argc, char **argv) printf("DES ede cbc bytes per sec = %12.2f (%9.3fuS)\n",d,8.0e6/d); printf("crypt per sec = %12.2f (%9.3fuS)\n",e,1.0e6/e); exit(0); -#if defined(LINT) || defined(MSDOS) +#if defined(LINT) || defined(OPENSSL_SYS_MSDOS) return(0); #endif } |