From bc36ee6227517edae802bcb0da68d4f04fe1fb5e Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 20 Feb 2001 08:13:47 +0000 Subject: Use new-style system-id macros everywhere possible. I hope I haven't missed any. This compiles and runs on Linux, and external applications have no problems with it. The definite test will be to build this on VMS. --- Configure | 1 - apps/app_rand.c | 2 +- apps/apps.c | 10 +++---- apps/asn1pars.c | 2 +- apps/ca.c | 21 ++++++------- apps/ciphers.c | 2 +- apps/crl.c | 4 +-- apps/crl2p7.c | 2 +- apps/dgst.c | 2 +- apps/dh.c | 2 +- apps/dhparam.c | 2 +- apps/dsa.c | 2 +- apps/dsaparam.c | 2 +- apps/enc.c | 2 +- apps/engine.c | 2 +- apps/errstr.c | 2 +- apps/gendh.c | 2 +- apps/gendsa.c | 2 +- apps/genrsa.c | 2 +- apps/nseq.c | 2 +- apps/openssl.c | 6 ++-- apps/passwd.c | 2 +- apps/pkcs12.c | 2 +- apps/pkcs7.c | 2 +- apps/pkcs8.c | 2 +- apps/rand.c | 2 +- apps/req.c | 6 ++-- apps/rsa.c | 2 +- apps/rsautl.c | 2 +- apps/s_apps.h | 4 ++- apps/s_client.c | 16 +++++----- apps/s_server.c | 14 ++++----- apps/s_socket.c | 30 +++++++++---------- apps/s_time.c | 8 ++--- apps/sess_id.c | 2 +- apps/smime.c | 2 +- apps/speed.c | 4 +-- apps/spkac.c | 4 +-- apps/x509.c | 4 +-- crypto/asn1/a_gentm.c | 4 +-- crypto/asn1/a_time.c | 2 +- crypto/asn1/a_utctm.c | 10 +++---- crypto/bf/bf_opts.c | 6 ++-- crypto/bf/bfspeed.c | 6 ++-- crypto/bio/b_sock.c | 12 ++++---- crypto/bio/bio_cb.c | 2 +- crypto/bio/bss_acpt.c | 4 +-- crypto/bio/bss_conn.c | 4 +-- crypto/bio/bss_fd.c | 2 +- crypto/bio/bss_file.c | 4 +-- crypto/bio/bss_log.c | 16 +++++----- crypto/bio/bss_sock.c | 4 +-- crypto/bn/bnspeed.c | 4 +-- crypto/bn/bntest.c | 2 +- crypto/bn/expspeed.c | 4 +-- crypto/bn/exptest.c | 2 +- crypto/bn/vms-helper.c | 2 +- crypto/cast/cast_spd.c | 6 ++-- crypto/cast/castopts.c | 6 ++-- crypto/comp/c_zlib.c | 6 ++-- crypto/conf/conf_def.c | 2 +- crypto/conf/conf_lib.c | 2 +- crypto/cryptlib.c | 10 +++---- crypto/cryptlib.h | 2 +- crypto/des/des.c | 22 +++++++------- crypto/des/des_locl.h | 12 ++++---- crypto/des/des_opts.c | 8 ++--- crypto/des/destest.c | 6 ++-- crypto/des/read_pwd.c | 42 +++++++++++++------------- crypto/des/speed.c | 6 ++-- crypto/dh/dhtest.c | 6 ++-- crypto/dsa/dsatest.c | 4 +-- crypto/dso/dso_vms.c | 6 ++-- crypto/dso/dso_win32.c | 4 +-- crypto/err/err.c | 2 +- crypto/idea/idea_spd.c | 6 ++-- crypto/rand/md_rand.c | 2 +- crypto/rand/rand_egd.c | 2 +- crypto/rand/rand_unix.c | 2 +- crypto/rand/rand_vms.c | 2 +- crypto/rand/rand_win.c | 2 +- crypto/rand/randfile.c | 10 +++---- crypto/rc2/rc2speed.c | 6 ++-- crypto/rc4/rc4.c | 2 +- crypto/rc4/rc4speed.c | 6 ++-- crypto/rc5/rc5speed.c | 6 ++-- crypto/rsa/rsa_sign.c | 2 +- crypto/symhacks.h | 2 +- crypto/threads/mttest.c | 6 ++-- crypto/threads/th-lock.c | 6 ++-- crypto/tmdiff.c | 24 +++++++-------- crypto/txt_db/txt_db.c | 6 ++-- ssl/kssl.c | 10 +++---- ssl/s23_clnt.c | 4 +-- ssl/s23_lib.c | 6 ++-- ssl/s23_srvr.c | 6 ++-- ssl/s2_clnt.c | 4 +-- ssl/s2_enc.c | 4 +-- ssl/s2_lib.c | 4 +-- ssl/s2_meth.c | 4 +-- ssl/s2_pkt.c | 4 +-- ssl/s2_srvr.c | 4 +-- ssl/s3_both.c | 2 +- ssl/s3_clnt.c | 76 ++++++++++++++++++++++++------------------------ ssl/s3_lib.c | 52 ++++++++++++++++----------------- ssl/s3_pkt.c | 2 +- ssl/s3_srvr.c | 46 ++++++++++++++--------------- ssl/ssl_algs.c | 18 ++++++------ ssl/ssl_cert.c | 29 +++++++++--------- ssl/ssl_ciph.c | 8 ++--- ssl/ssl_err.c | 4 +-- ssl/ssl_err2.c | 2 +- ssl/ssl_lib.c | 20 ++++++------- ssl/ssl_locl.h | 13 +++++---- ssl/ssl_rsa.c | 30 +++++++++---------- ssl/ssl_stat.c | 12 ++++---- ssl/ssl_txt.c | 2 +- ssl/ssltest.c | 42 +++++++++++++------------- 118 files changed, 464 insertions(+), 460 deletions(-) diff --git a/Configure b/Configure index ada01f8236..4bab7e6518 100755 --- a/Configure +++ b/Configure @@ -693,7 +693,6 @@ if ($no_krb5 $cflags="-DOPENSSL_NO_KRB5 $cflags"; $options.=" no-krb5" unless $no_krb5; $openssl_algorithm_defines .= "#define OPENSSL_NO_KRB5\n"; - $openssl_algorithm_defines .= "#define NO_KRB5\n"; } else { diff --git a/apps/app_rand.c b/apps/app_rand.c index 9d6d5fbf6f..b7b6128c1e 100644 --- a/apps/app_rand.c +++ b/apps/app_rand.c @@ -124,7 +124,7 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn) int consider_randfile = (file == NULL); char buffer[200]; -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS BIO_printf(bio_e,"Loading 'screen' into random state -"); BIO_flush(bio_e); RAND_screen(); diff --git a/apps/apps.c b/apps/apps.c index a1397a36d8..2ecb6618f5 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -70,7 +70,7 @@ #include #include -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS # include "bss_file.c" #endif @@ -184,7 +184,7 @@ int str2fmt(char *s) return(FORMAT_UNDEF); } -#if defined(MSDOS) || defined(WIN32) || defined(WIN16) +#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) void program_name(char *in, char *out, int size) { int i,n; @@ -222,7 +222,7 @@ void program_name(char *in, char *out, int size) out[n]='\0'; } #else -#ifdef VMS +#ifdef OPENSSL_SYS_VMS void program_name(char *in, char *out, int size) { char *p=in, *q; @@ -258,10 +258,10 @@ void program_name(char *in, char *out, int size) #endif #endif -#ifdef WIN32 +#ifdef OPENSSL_SYS_WIN32 int WIN32_rename(char *from, char *to) { -#ifdef WINNT +#ifdef OPENSSL_SYS_WINNT int ret; /* Note: MoveFileEx() doesn't work under Win95, Win98 */ diff --git a/apps/asn1pars.c b/apps/asn1pars.c index f25c9f84e8..108ed7daa0 100644 --- a/apps/asn1pars.c +++ b/apps/asn1pars.c @@ -206,7 +206,7 @@ bad: goto end; } BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/ca.c b/apps/ca.c index 584a2f561f..a72aaef184 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -79,7 +79,7 @@ #include #ifndef W_OK -# ifdef VMS +# ifdef OPENSSL_SYS_VMS # if defined(__DECC) # include # else @@ -545,7 +545,7 @@ bad: if (configfile == NULL) { /* We will just use 'buf[0]' as a temporary buffer. */ -#ifdef VMS +#ifdef OPENSSL_SYS_VMS strncpy(buf[0],X509_get_default_cert_area(), sizeof(buf[0])-1-sizeof(CONFIG_FILE)); #else @@ -755,7 +755,8 @@ bad: BIO_printf(bio_err,"there needs to be defined a directory for new certificate to be placed in\n"); goto err; } -#ifndef VMS /* outdir is a directory spec, but access() for VMS demands a +#ifndef OPENSSL_SYS_VMS + /* outdir is a directory spec, but access() for VMS demands a filename. In any case, stat(), below, will catch the problem if outdir is not a directory spec, and the fopen() or open() will catch an error if there is no write access. @@ -853,7 +854,7 @@ bad: if (verbose) { BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); /* cannot fail */ -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); @@ -996,7 +997,7 @@ bad: else { BIO_set_fp(Sout,stdout,BIO_NOCLOSE|BIO_FP_TEXT); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); Sout = BIO_push(tmpbio, Sout); @@ -1232,7 +1233,7 @@ bad: strncpy(buf[0],serialfile,BSIZE-4); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS strcat(buf[0],"-new"); #else strcat(buf[0],".new"); @@ -1242,7 +1243,7 @@ bad: strncpy(buf[1],dbfile,BSIZE-4); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS strcat(buf[1],"-new"); #else strcat(buf[1],".new"); @@ -1272,7 +1273,7 @@ bad: strncpy(buf[2],outdir,BSIZE-(j*2)-6); -#ifndef VMS +#ifndef OPENSSL_SYS_VMS strcat(buf[2],"/"); #endif @@ -1309,7 +1310,7 @@ bad: /* Rename the database and the serial file */ strncpy(buf[2],serialfile,BSIZE-4); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS strcat(buf[2],"-old"); #else strcat(buf[2],".old"); @@ -1337,7 +1338,7 @@ bad: strncpy(buf[2],dbfile,BSIZE-4); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS strcat(buf[2],"-old"); #else strcat(buf[2],".old"); diff --git a/apps/ciphers.c b/apps/ciphers.c index 9ba1bffd37..c3bd859d68 100644 --- a/apps/ciphers.c +++ b/apps/ciphers.c @@ -108,7 +108,7 @@ int MAIN(int argc, char **argv) if (bio_err == NULL) bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); STDout=BIO_new_fp(stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); STDout = BIO_push(tmpbio, STDout); diff --git a/apps/crl.c b/apps/crl.c index 666a8576fb..fb36ed5d02 100644 --- a/apps/crl.c +++ b/apps/crl.c @@ -124,7 +124,7 @@ int MAIN(int argc, char **argv) if ((bio_out=BIO_new(BIO_s_file())) != NULL) { BIO_set_fp(bio_out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); bio_out = BIO_push(tmpbio, bio_out); @@ -324,7 +324,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/crl2p7.c b/apps/crl2p7.c index 7f853b65ab..36d8afee6f 100644 --- a/apps/crl2p7.c +++ b/apps/crl2p7.c @@ -241,7 +241,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/dgst.c b/apps/dgst.c index 4f1660c2a6..a6b2e309c4 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -272,7 +272,7 @@ int MAIN(int argc, char **argv) else out = BIO_new_file(outfile, "w"); } else { out = BIO_new_fp(stdout, BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/dh.c b/apps/dh.c index 07f3873f66..6162e442ba 100644 --- a/apps/dh.c +++ b/apps/dh.c @@ -213,7 +213,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/dhparam.c b/apps/dhparam.c index d7fa612491..bbc64d5eb0 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -419,7 +419,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/dsa.c b/apps/dsa.c index d0caac4489..6e9e6c7566 100644 --- a/apps/dsa.c +++ b/apps/dsa.c @@ -262,7 +262,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/dsaparam.c b/apps/dsaparam.c index 64cadeb3b8..e923f10dbb 100644 --- a/apps/dsaparam.c +++ b/apps/dsaparam.c @@ -216,7 +216,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/enc.c b/apps/enc.c index d062b61ec5..332c2ba9da 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -407,7 +407,7 @@ bad: if (outf == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/engine.c b/apps/engine.c index b320db6c8f..12a88f1957 100644 --- a/apps/engine.c +++ b/apps/engine.c @@ -133,7 +133,7 @@ int MAIN(int argc, char **argv) if (bio_err == NULL) bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); bio_out=BIO_new_fp(stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); bio_out = BIO_push(tmpbio, bio_out); diff --git a/apps/errstr.c b/apps/errstr.c index e392328f93..c411effcd0 100644 --- a/apps/errstr.c +++ b/apps/errstr.c @@ -91,7 +91,7 @@ int MAIN(int argc, char **argv) out=BIO_new(BIO_s_file()); if ((out != NULL) && BIO_set_fp(out,stdout,BIO_NOCLOSE)) { -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/gendh.c b/apps/gendh.c index 27da7cdd31..0b47867c20 100644 --- a/apps/gendh.c +++ b/apps/gendh.c @@ -171,7 +171,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/gendsa.c b/apps/gendsa.c index f7c5f4791a..47dbde67c7 100644 --- a/apps/gendsa.c +++ b/apps/gendsa.c @@ -207,7 +207,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/genrsa.c b/apps/genrsa.c index a2e7d989fd..c263956c03 100644 --- a/apps/genrsa.c +++ b/apps/genrsa.c @@ -197,7 +197,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/nseq.c b/apps/nseq.c index 1d73d1ad52..93adcdfef8 100644 --- a/apps/nseq.c +++ b/apps/nseq.c @@ -121,7 +121,7 @@ int MAIN(int argc, char **argv) } } else { out = BIO_new_fp(stdout, BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/openssl.c b/apps/openssl.c index 6c69a29bd6..c7ee7533b4 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -254,7 +254,7 @@ int main(int Argc, char *Argv[]) if (p == NULL) { strcpy(config_name,X509_get_default_cert_area()); -#ifndef VMS +#ifndef OPENSSL_SYS_VMS strcat(config_name,"/"); #endif strcat(config_name,OPENSSL_CONF); @@ -372,7 +372,7 @@ static int do_cmd(LHASH *prog, int argc, char *argv[]) else if ((strncmp(argv[0],"no-",3)) == 0) { BIO *bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); bio_stdout = BIO_push(tmpbio, bio_stdout); @@ -409,7 +409,7 @@ static int do_cmd(LHASH *prog, int argc, char *argv[]) else /* strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0 */ list_type = FUNC_TYPE_CIPHER; bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); bio_stdout = BIO_push(tmpbio, bio_stdout); diff --git a/apps/passwd.c b/apps/passwd.c index 9cc3f4bf2d..f190e16cb5 100644 --- a/apps/passwd.c +++ b/apps/passwd.c @@ -83,7 +83,7 @@ int MAIN(int argc, char **argv) if (out == NULL) goto err; BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/pkcs12.c b/apps/pkcs12.c index 8b1586faf5..17846cfba6 100644 --- a/apps/pkcs12.c +++ b/apps/pkcs12.c @@ -375,7 +375,7 @@ int MAIN(int argc, char **argv) if (!outfile) { out = BIO_new_fp(stdout, BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/pkcs7.c b/apps/pkcs7.c index b348da2203..63ec8a5744 100644 --- a/apps/pkcs7.c +++ b/apps/pkcs7.c @@ -225,7 +225,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/pkcs8.c b/apps/pkcs8.c index 3633590874..852a435584 100644 --- a/apps/pkcs8.c +++ b/apps/pkcs8.c @@ -226,7 +226,7 @@ int MAIN(int argc, char **argv) } } else { out = BIO_new_fp (stdout, BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/rand.c b/apps/rand.c index 855951db76..8a216fbc75 100644 --- a/apps/rand.c +++ b/apps/rand.c @@ -132,7 +132,7 @@ int MAIN(int argc, char **argv) else { r = BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/req.c b/apps/req.c index 296825cab2..e75d7abf09 100644 --- a/apps/req.c +++ b/apps/req.c @@ -435,7 +435,7 @@ bad: if (p == NULL) { strcpy(config_name,X509_get_default_cert_area()); -#ifndef VMS +#ifndef OPENSSL_SYS_VMS strcat(config_name,"/"); #endif strcat(config_name,OPENSSL_CONF); @@ -697,7 +697,7 @@ bad: { BIO_printf(bio_err,"writing new private key to stdout\n"); BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); @@ -910,7 +910,7 @@ loop: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/rsa.c b/apps/rsa.c index e395d54df2..bdfe2189ba 100644 --- a/apps/rsa.c +++ b/apps/rsa.c @@ -307,7 +307,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/rsautl.c b/apps/rsautl.c index ba31979618..662c11a70b 100644 --- a/apps/rsautl.c +++ b/apps/rsautl.c @@ -227,7 +227,7 @@ int MAIN(int argc, char **argv) } } else { out = BIO_new_fp(stdout, BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/s_apps.h b/apps/s_apps.h index 57af7c0f8c..235a1778e8 100644 --- a/apps/s_apps.h +++ b/apps/s_apps.h @@ -57,7 +57,9 @@ */ #include -#if (defined(VMS) || defined(__VMS)) && !defined(FD_SET) +#include + +#if defined(OPENSSL_SYS_VMS) && !defined(FD_SET) /* VAX C does not defined fd_set and friends, but it's actually quite simple */ /* These definitions are borrowed from SOCKETSHR. /Richard Levitte */ #define MAX_NOFILE 32 diff --git a/apps/s_client.c b/apps/s_client.c index bdb94dab44..19c9a217df 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -68,7 +68,7 @@ recursive header file inclusion, resulting in the compiler complaining that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which is needed to have fileno() declared correctly... So let's define u_int */ -#if defined(VMS) && defined(__DECC) && !defined(__U_INT) +#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__U_INT) #define __U_INT typedef unsigned int u_int; #endif @@ -82,12 +82,12 @@ typedef unsigned int u_int; #include #include "s_apps.h" -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS #include #endif -#if (defined(VMS) && __VMS_VER < 70000000) +#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ #undef FIONBIO #endif @@ -186,7 +186,7 @@ int MAIN(int argc, char **argv) char *inrand=NULL; char *engine_id=NULL; ENGINE *e=NULL; -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS struct timeval tv; #endif @@ -537,7 +537,7 @@ re_start: if (!ssl_pending) { -#ifndef WINDOWS +#ifndef OPENSSL_SYS_WINDOWS if (tty_on) { if (read_tty) FD_SET(fileno(stdin),&readfds); @@ -564,7 +564,7 @@ re_start: * will choke the compiler: if you do have a cast then * you can either go for (int *) or (void *). */ -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS /* Under Windows we make the assumption that we can * always write to the tty: therefore if we need to * write to the tty we just fall through. Otherwise @@ -663,7 +663,7 @@ re_start: goto shut; } } -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS /* Assume Windows can always write */ else if (!ssl_pending && write_tty) #else @@ -744,7 +744,7 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240 } } -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0))) #else else if (FD_ISSET(fileno(stdin),&readfds)) diff --git a/apps/s_server.c b/apps/s_server.c index c83337b828..3828d79e7d 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -70,7 +70,7 @@ recursive header file inclusion, resulting in the compiler complaining that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which is needed to have fileno() declared correctly... So let's define u_int */ -#if defined(VMS) && defined(__DECC) && !defined(__U_INT) +#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__U_INT) #define __U_INT typedef unsigned int u_int; #endif @@ -86,11 +86,11 @@ typedef unsigned int u_int; #include #include "s_apps.h" -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS #include #endif -#if (defined(VMS) && __VMS_VER < 70000000) +#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ #undef FIONBIO #endif @@ -815,7 +815,7 @@ static int sv_body(char *hostname, int s, unsigned char *context) unsigned long l; SSL *con=NULL; BIO *sbio; -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS struct timeval tv; #endif @@ -882,7 +882,7 @@ static int sv_body(char *hostname, int s, unsigned char *context) if (!read_from_sslcon) { FD_ZERO(&readfds); -#ifndef WINDOWS +#ifndef OPENSSL_SYS_WINDOWS FD_SET(fileno(stdin),&readfds); #endif FD_SET(s,&readfds); @@ -892,7 +892,7 @@ static int sv_body(char *hostname, int s, unsigned char *context) * the compiler: if you do have a cast then you can either * go for (int *) or (void *). */ -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS /* Under Windows we can't select on stdin: only * on sockets. As a workaround we timeout the select every * second and check for any keypress. In a proper Windows @@ -1294,7 +1294,7 @@ static int www_body(char *hostname, int s, unsigned char *context) else { BIO_printf(bio_s_out,"read R BLOCK\n"); -#ifndef MSDOS +#ifndef OPENSSL_SYS_MSDOS sleep(1); #endif continue; diff --git a/apps/s_socket.c b/apps/s_socket.c index a61e6455a5..c261abb361 100644 --- a/apps/s_socket.c +++ b/apps/s_socket.c @@ -66,7 +66,7 @@ recursive header file inclusion, resulting in the compiler complaining that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which is needed to have fileno() declared correctly... So let's define u_int */ -#if defined(VMS) && defined(__DECC) && !defined(__U_INT) +#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__U_INT) #define __U_INT typedef unsigned int u_int; #endif @@ -80,7 +80,7 @@ typedef unsigned int u_int; #include static struct hostent *GetHostByName(char *name); -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS static void sock_cleanup(void); #endif static int sock_init(void); @@ -90,17 +90,17 @@ static int init_server_long(int *sock, int port,char *ip); static int do_accept(int acc_sock, int *sock, char **host); static int host_ip(char *str, unsigned char ip[4]); -#ifdef WIN16 +#ifdef OPENSSL_SYS_WIN16 #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ #else #define SOCKET_PROTOCOL IPPROTO_TCP #endif -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS static struct WSAData wsa_state; static int wsa_init_done=0; -#ifdef WIN16 +#ifdef OPENSSL_SYS_WIN16 static HWND topWnd=0; static FARPROC lpTopWndProc=NULL; static FARPROC lpTopHookProc=NULL; @@ -129,10 +129,10 @@ static BOOL CALLBACK enumproc(HWND hwnd,LPARAM lParam) return(FALSE); } -#endif /* WIN32 */ -#endif /* WINDOWS */ +#endif /* OPENSSL_SYS_WIN32 */ +#endif /* OPENSSL_SYS_WINDOWS */ -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS static void sock_cleanup(void) { if (wsa_init_done) @@ -146,7 +146,7 @@ static void sock_cleanup(void) static int sock_init(void) { -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS if (!wsa_init_done) { int err; @@ -163,15 +163,15 @@ static int sock_init(void) return(0); } -#ifdef WIN16 +#ifdef OPENSSL_SYS_WIN16 EnumTaskWindows(GetCurrentTask(),enumproc,0L); lpTopWndProc=(FARPROC)GetWindowLong(topWnd,GWL_WNDPROC); lpTopHookProc=MakeProcInstance((FARPROC)topHookProc,_hInstance); SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopHookProc); -#endif /* WIN16 */ +#endif /* OPENSSL_SYS_WIN16 */ } -#endif /* WINDOWS */ +#endif /* OPENSSL_SYS_WINDOWS */ return(1); } @@ -285,7 +285,7 @@ static int init_server_long(int *sock, int port, char *ip) #endif if (bind(s,(struct sockaddr *)&server,sizeof(server)) == -1) { -#ifndef WINDOWS +#ifndef OPENSSL_SYS_WINDOWS perror("bind"); #endif goto err; @@ -318,7 +318,7 @@ static int do_accept(int acc_sock, int *sock, char **host) if (!sock_init()) return(0); -#ifndef WINDOWS +#ifndef OPENSSL_SYS_WINDOWS redoit: #endif @@ -332,7 +332,7 @@ redoit: ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len); if (ret == INVALID_SOCKET) { -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS i=WSAGetLastError(); BIO_printf(bio_err,"accept error %d\n",i); #else diff --git a/apps/s_time.c b/apps/s_time.c index ce52b463fc..5da9b12404 100644 --- a/apps/s_time.c +++ b/apps/s_time.c @@ -82,7 +82,7 @@ #include "wintext.h" #endif -#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) +#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) #define TIMES #endif @@ -98,7 +98,7 @@ 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 @@ -174,7 +174,7 @@ static int perform=0; #ifdef FIONBIO static int t_nbio=0; #endif -#ifdef WIN32 +#ifdef OPENSSL_SYS_WIN32 static int exitNow = 0; /* Set when it's time to exit main */ #endif @@ -198,7 +198,7 @@ static void s_time_init(void) #ifdef FIONBIO t_nbio=0; #endif -#ifdef WIN32 +#ifdef OPENSSL_SYS_WIN32 exitNow = 0; /* Set when it's time to exit main */ #endif } diff --git a/apps/sess_id.c b/apps/sess_id.c index eb40aa6353..7f5c55b901 100644 --- a/apps/sess_id.c +++ b/apps/sess_id.c @@ -208,7 +208,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/smime.c b/apps/smime.c index eec40764d8..b8f4f22035 100644 --- a/apps/smime.c +++ b/apps/smime.c @@ -421,7 +421,7 @@ int MAIN(int argc, char **argv) } } else { out = BIO_new_fp(stdout, BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/speed.c b/apps/speed.c index 90dcd4787e..99e72a97b9 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -87,7 +87,7 @@ #if defined(__FreeBSD__) # define USE_TOD -#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) +#elif !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) # define TIMES #endif #if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(OPENSSL_SYS_MPE) && !defined(__NetBSD__) /* FIXME */ @@ -110,7 +110,7 @@ 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 diff --git a/apps/spkac.c b/apps/spkac.c index d7e46782f7..5ac9b14c54 100644 --- a/apps/spkac.c +++ b/apps/spkac.c @@ -221,7 +221,7 @@ bad: if (outfile) out = BIO_new_file(outfile, "w"); else { out = BIO_new_fp(stdout, BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); @@ -278,7 +278,7 @@ bad: if (outfile) out = BIO_new_file(outfile, "w"); else { out = BIO_new_fp(stdout, BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/apps/x509.c b/apps/x509.c index 2972b047a9..658afcef5e 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -193,7 +193,7 @@ int MAIN(int argc, char **argv) if (bio_err == NULL) bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); STDout=BIO_new_fp(stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); STDout = BIO_push(tmpbio, STDout); @@ -642,7 +642,7 @@ bad: if (outfile == NULL) { BIO_set_fp(out,stdout,BIO_NOCLOSE); -#ifdef VMS +#ifdef OPENSSL_SYS_VMS { BIO *tmpbio = BIO_new(BIO_f_linebuffer()); out = BIO_push(tmpbio, out); diff --git a/crypto/asn1/a_gentm.c b/crypto/asn1/a_gentm.c index 000d346dd5..185d169600 100644 --- a/crypto/asn1/a_gentm.c +++ b/crypto/asn1/a_gentm.c @@ -193,7 +193,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, { char *p; struct tm *ts; -#if defined(OPENSSL_THREADS) && !defined(WIN32) +#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) struct tm data; #endif @@ -202,7 +202,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, if (s == NULL) return(NULL); -#if defined(OPENSSL_THREADS) && !defined(WIN32) +#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */ ts=&data; #else diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c index d50e6157e0..266614d14f 100644 --- a/crypto/asn1/a_time.c +++ b/crypto/asn1/a_time.c @@ -100,7 +100,7 @@ int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **pp) ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t) { struct tm *ts; -#if defined(OPENSSL_THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) +#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__) struct tm data; gmtime_r(&t,&data); diff --git a/crypto/asn1/a_utctm.c b/crypto/asn1/a_utctm.c index 77b88e67db..0a5a8d2753 100644 --- a/crypto/asn1/a_utctm.c +++ b/crypto/asn1/a_utctm.c @@ -58,7 +58,7 @@ #include #include -#ifdef VMS +#ifdef OPENSSL_SYS_VMS #include #include #include @@ -191,7 +191,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) { char *p; struct tm *ts; -#if defined(OPENSSL_THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) +#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__) struct tm data; #endif @@ -201,13 +201,13 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) if (s == NULL) return(NULL); -#if defined(OPENSSL_THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) +#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__) gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */ ts=&data; #else ts=gmtime(&t); #endif -#ifdef VMS +#ifdef OPENSSL_SYS_VMS if (ts == NULL) { static $DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL"); @@ -284,7 +284,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t) t -= offset*60; /* FIXME: may overflow in extreme cases */ -#if defined(OPENSSL_THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) +#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__) { struct tm data; gmtime_r(&t, &data); tm = &data; } #else tm = gmtime(&t); diff --git a/crypto/bf/bf_opts.c b/crypto/bf/bf_opts.c index bbe32b28c9..99df5c303e 100644 --- a/crypto/bf/bf_opts.c +++ b/crypto/bf/bf_opts.c @@ -59,7 +59,7 @@ /* 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 @@ -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 @@ -322,7 +322,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/bf/bfspeed.c b/crypto/bf/bfspeed.c index ecc9dff4e4..5b2077b643 100644 --- a/crypto/bf/bfspeed.c +++ b/crypto/bf/bfspeed.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 @@ -268,7 +268,7 @@ int main(int argc, char **argv) printf("Blowfish raw ecb bytes per sec = %12.3f (%9.3fuS)\n",b,8.0e6/b); printf("Blowfish cbc bytes per sec = %12.3f (%9.3fuS)\n",c,8.0e6/c); exit(0); -#if defined(LINT) || defined(MSDOS) +#if defined(LINT) || defined(OPENSSL_SYS_MSDOS) return(0); #endif } diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c index 35d2e5b6f3..d4b44b62bb 100644 --- a/crypto/bio/b_sock.c +++ b/crypto/bio/b_sock.c @@ -65,7 +65,7 @@ #include "cryptlib.h" #include -#ifdef WIN16 +#ifdef OPENSSL_SYS_WIN16 #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ #else #define SOCKET_PROTOCOL IPPROTO_TCP @@ -79,7 +79,7 @@ #define MAX_LISTEN 32 #endif -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS static int wsa_init_done=0; #endif @@ -429,7 +429,7 @@ end: int BIO_sock_init(void) { -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS static struct WSAData wsa_state; if (!wsa_init_done) @@ -449,13 +449,13 @@ int BIO_sock_init(void) return(-1); } } -#endif /* WINDOWS */ +#endif /* OPENSSL_SYS_WINDOWS */ return(1); } void BIO_sock_cleanup(void) { -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS if (wsa_init_done) { wsa_init_done=0; @@ -465,7 +465,7 @@ void BIO_sock_cleanup(void) #endif } -#if !defined(VMS) || __VMS_VER >= 70000000 +#if !defined(OPENSSL_SYS_VMS) || __VMS_VER >= 70000000 int BIO_socket_ioctl(int fd, long type, unsigned long *arg) { diff --git a/crypto/bio/bio_cb.c b/crypto/bio/bio_cb.c index d6b8aa313a..0ffa4d2136 100644 --- a/crypto/bio/bio_cb.c +++ b/crypto/bio/bio_cb.c @@ -125,7 +125,7 @@ long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp, b=(BIO *)bio->cb_arg; if (b != NULL) BIO_write(b,buf,strlen(buf)); -#if !defined(OPENSSL_NO_STDIO) && !defined(WIN16) +#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16) else fputs(buf,stderr); #endif diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c index 9569c7ed8d..8ea1db158b 100644 --- a/crypto/bio/bss_acpt.c +++ b/crypto/bio/bss_acpt.c @@ -64,13 +64,13 @@ #include "cryptlib.h" #include -#ifdef WIN16 +#ifdef OPENSSL_SYS_WIN16 #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ #else #define SOCKET_PROTOCOL IPPROTO_TCP #endif -#if (defined(VMS) && __VMS_VER < 70000000) +#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ #undef FIONBIO #endif diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index 9772bc8529..c41ba3cc41 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -64,13 +64,13 @@ #include "cryptlib.h" #include -#ifdef WIN16 +#ifdef OPENSSL_SYS_WIN16 #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ #else #define SOCKET_PROTOCOL IPPROTO_TCP #endif -#if (defined(VMS) && __VMS_VER < 70000000) +#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ #undef FIONBIO #endif diff --git a/crypto/bio/bss_fd.c b/crypto/bio/bss_fd.c index 47f59c467d..5e3e187de6 100644 --- a/crypto/bio/bss_fd.c +++ b/crypto/bio/bss_fd.c @@ -223,7 +223,7 @@ int BIO_fd_should_retry(int i) { err=get_last_sys_error(); -#if defined(WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */ +#if defined(OPENSSL_SYS_WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */ if ((i == -1) && (err == 0)) return(1); #endif diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c index cbfe74a5eb..f31e0a50ee 100644 --- a/crypto/bio/bss_file.c +++ b/crypto/bio/bss_file.c @@ -204,7 +204,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr) b->shutdown=(int)num&BIO_CLOSE; b->ptr=(char *)ptr; b->init=1; -#if defined(MSDOS) || defined(WINDOWS) +#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) /* Set correct text/binary mode */ if (num & BIO_FP_TEXT) _setmode(fileno((FILE *)ptr),_O_TEXT); @@ -233,7 +233,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr) ret=0; break; } -#if defined(MSDOS) || defined(WINDOWS) +#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) if (!(num & BIO_FP_TEXT)) strcat(p,"b"); else diff --git a/crypto/bio/bss_log.c b/crypto/bio/bss_log.c index 1edf16a76f..b289c97d3c 100644 --- a/crypto/bio/bss_log.c +++ b/crypto/bio/bss_log.c @@ -66,9 +66,11 @@ #include #include -#if defined(WIN32) +#include + +#if defined(OPENSSL_SYS_WIN32) # include -#elif defined(VMS) || defined(__VMS) +#elif defined(OPENSSL_SYS_VMS) # include # include # include @@ -85,7 +87,7 @@ #ifndef NO_SYSLOG -#if defined(WIN32) +#if defined(OPENSSL_SYS_WIN32) #define LOG_EMERG 0 #define LOG_ALERT 1 #define LOG_CRIT 2 @@ -96,7 +98,7 @@ #define LOG_DEBUG 7 #define LOG_DAEMON (3<<3) -#elif defined(VMS) +#elif defined(OPENSSL_SYS_VMS) /* On VMS, we don't really care about these, but we need them to compile */ #define LOG_EMERG 0 #define LOG_ALERT 1 @@ -118,7 +120,7 @@ static int MS_CALLBACK slg_free(BIO *data); static void xopenlog(BIO* bp, char* name, int level); static void xsyslog(BIO* bp, int priority, const char* string); static void xcloselog(BIO* bp); -#ifdef WIN32 +#ifdef OPENSSL_SYS_WIN32 LONG (WINAPI *go_for_advapi)() = RegOpenKeyEx; HANDLE (WINAPI *register_event_source)() = NULL; BOOL (WINAPI *deregister_event_source)() = NULL; @@ -241,7 +243,7 @@ static int MS_CALLBACK slg_puts(BIO *bp, const char *str) return(ret); } -#if defined(WIN32) +#if defined(OPENSSL_SYS_WIN32) static void xopenlog(BIO* bp, char* name, int level) { @@ -313,7 +315,7 @@ static void xcloselog(BIO* bp) bp->ptr= NULL; } -#elif defined(VMS) +#elif defined(OPENSSL_SYS_VMS) static int VMS_OPC_target = LOG_DAEMON; diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c index 727378ad93..fdabd16d7e 100644 --- a/crypto/bio/bss_sock.c +++ b/crypto/bio/bss_sock.c @@ -228,7 +228,7 @@ int BIO_sock_should_retry(int i) { err=get_last_socket_error(); -#if defined(WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */ +#if defined(OPENSSL_SYS_WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */ if ((i == -1) && (err == 0)) return(1); #endif @@ -242,7 +242,7 @@ int BIO_sock_non_fatal_error(int err) { switch (err) { -#if defined(WINDOWS) +#if defined(OPENSSL_SYS_WINDOWS) # if defined(WSAEWOULDBLOCK) case WSAEWOULDBLOCK: # endif diff --git a/crypto/bn/bnspeed.c b/crypto/bn/bnspeed.c index 20fc7e08ff..2c81667154 100644 --- a/crypto/bn/bnspeed.c +++ b/crypto/bn/bnspeed.c @@ -71,7 +71,7 @@ #include #include -#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) +#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) #define TIMES #endif @@ -87,7 +87,7 @@ 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 diff --git a/crypto/bn/bntest.c b/crypto/bn/bntest.c index 0487a2b909..3228618b23 100644 --- a/crypto/bn/bntest.c +++ b/crypto/bn/bntest.c @@ -68,7 +68,7 @@ #include #include -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS #include "../bio/bss_file.c" #endif diff --git a/crypto/bn/expspeed.c b/crypto/bn/expspeed.c index fead8e6036..91dc7ff9a7 100644 --- a/crypto/bn/expspeed.c +++ b/crypto/bn/expspeed.c @@ -97,7 +97,7 @@ static void genprime_cb(int p, int n, void *arg); #include #include -#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC)) +#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) #define TIMES #endif @@ -113,7 +113,7 @@ static void genprime_cb(int p, int n, void *arg); 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 diff --git a/crypto/bn/exptest.c b/crypto/bn/exptest.c index 3e86f2ea0e..5ca570d1a8 100644 --- a/crypto/bn/exptest.c +++ b/crypto/bn/exptest.c @@ -63,7 +63,7 @@ #include #include #include -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS #include "../bio/bss_file.c" #endif diff --git a/crypto/bn/vms-helper.c b/crypto/bn/vms-helper.c index 3da4622b13..4b63149bf3 100644 --- a/crypto/bn/vms-helper.c +++ b/crypto/bn/vms-helper.c @@ -60,7 +60,7 @@ bn_div_words_abort(int i) { #ifdef BN_DEBUG -#if !defined(OPENSSL_NO_STDIO) && !defined(WIN16) +#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16) fprintf(stderr,"Division would overflow (%d)\n",i); #endif abort(); diff --git a/crypto/cast/cast_spd.c b/crypto/cast/cast_spd.c index 0af915cf20..6e00b90f9d 100644 --- a/crypto/cast/cast_spd.c +++ b/crypto/cast/cast_spd.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 @@ -268,7 +268,7 @@ int main(int argc, char **argv) printf("CAST raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b); printf("CAST cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c); exit(0); -#if defined(LINT) || defined(MSDOS) +#if defined(LINT) || defined(OPENSSL_SYS_MSDOS) return(0); #endif } diff --git a/crypto/cast/castopts.c b/crypto/cast/castopts.c index c783796610..1b858d153b 100644 --- a/crypto/cast/castopts.c +++ b/crypto/cast/castopts.c @@ -59,7 +59,7 @@ /* 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 @@ -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 @@ -332,7 +332,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/comp/c_zlib.c b/crypto/comp/c_zlib.c index c2ff6c7011..cd2f8a491b 100644 --- a/crypto/comp/c_zlib.c +++ b/crypto/comp/c_zlib.c @@ -48,14 +48,14 @@ static COMP_METHOD zlib_method={ * work. Therefore, all ZLIB routines are loaded at run time * and we do not link to a .LIB file. */ -#if defined(WINDOWS) || defined(WIN32) +#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) # include # define Z_CALLCONV _stdcall # define ZLIB_SHARED #else # define Z_CALLCONV -#endif /* !(WINDOWS || WIN32) */ +#endif /* !(OPENSSL_SYS_WINDOWS || OPENSSL_SYS_WIN32) */ #ifdef ZLIB_SHARED #include @@ -188,7 +188,7 @@ COMP_METHOD *COMP_zlib(void) #ifdef ZLIB_SHARED if (!zlib_loaded) { -#if defined(WINDOWS) || defined(WIN32) +#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) zlib_dso = DSO_load(NULL, "ZLIB", NULL, 0); #else zlib_dso = DSO_load(NULL, "z", NULL, 0); diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 59f9476dc6..87335a9daa 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -185,7 +185,7 @@ static int def_load(CONF *conf, const char *name, long *line) int ret; BIO *in=NULL; -#ifdef VMS +#ifdef OPENSSL_SYS_VMS in=BIO_new_file(name, "r"); #else in=BIO_new_file(name, "rb"); diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c index 48803bc186..8e4d673fb8 100644 --- a/crypto/conf/conf_lib.c +++ b/crypto/conf/conf_lib.c @@ -81,7 +81,7 @@ LHASH *CONF_load(LHASH *conf, const char *file, long *eline) LHASH *ltmp; BIO *in=NULL; -#ifdef VMS +#ifdef OPENSSL_SYS_VMS in=BIO_new_file(file, "r"); #else in=BIO_new_file(file, "rb"); diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 8634c078d8..11ac630c22 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -62,7 +62,7 @@ #include #include -#if defined(WIN32) || defined(WIN16) +#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */ #endif @@ -133,7 +133,7 @@ int CRYPTO_get_new_lockid(char *name) char *str; int i; -#if defined(WIN32) || defined(WIN16) +#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) /* A hack to make Visual C++ 5.0 work correctly when linking as * a DLL using /MT. Without this, the application cannot use * and floating point printf's. @@ -354,9 +354,9 @@ unsigned long CRYPTO_thread_id(void) if (id_callback == NULL) { -#ifdef WIN16 +#ifdef OPENSSL_SYS_WIN16 ret=(unsigned long)GetCurrentTask(); -#elif defined(WIN32) +#elif defined(OPENSSL_SYS_WIN32) ret=(unsigned long)GetCurrentThreadId(); #elif defined(GETPID_IS_MEANINGLESS) ret=1L; @@ -464,7 +464,7 @@ const char *CRYPTO_get_lock_name(int type) } #ifdef _DLL -#ifdef WIN32 +#ifdef OPENSSL_SYS_WIN32 /* All we really need to do is remove the 'error' state when a thread * detaches */ diff --git a/crypto/cryptlib.h b/crypto/cryptlib.h index 5eff5d3141..ffca3c8c53 100644 --- a/crypto/cryptlib.h +++ b/crypto/cryptlib.h @@ -74,7 +74,7 @@ extern "C" { #endif -#ifndef VMS +#ifndef OPENSSL_SYS_VMS #define X509_CERT_AREA OPENSSLDIR #define X509_CERT_DIR OPENSSLDIR "/certs" #define X509_CERT_FILE OPENSSLDIR "/cert.pem" 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 #include #include -#ifndef MSDOS -#ifndef VMS #include +#ifndef OPENSSL_SYS_MSDOS +#ifndef OPENSSL_SYS_VMS #include OPENSSL_UNISTD -#else /* VMS */ +#else /* OPENSSL_SYS_VMS */ #ifdef __DECC #include #else /* not __DECC */ #include #endif /* __DECC */ -#endif /* VMS */ -#else /* MSDOS */ +#endif /* OPENSSL_SYS_VMS */ +#else /* OPENSSL_SYS_MSDOS */ #include #endif #include #include "des_ver.h" -#ifdef VMS +#ifdef OPENSSL_SYS_VMS #include #include #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 @@ -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 -#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 -#ifdef MSDOS /* Visual C++ 2.1 (Windows NT/95) */ +#ifdef OPENSSL_SYS_MSDOS /* Visual C++ 2.1 (Windows NT/95) */ #include #include #include #include #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 #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 -#ifndef MSDOS +#ifndef OPENSSL_SYS_MSDOS #include #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 #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 #endif @@ -92,7 +92,7 @@ #include #include -#ifdef VMS /* prototypes for sys$whatever */ +#ifdef OPENSSL_SYS_VMS /* prototypes for sys$whatever */ #include #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 #endif -#if defined(MSDOS) && !defined(__CYGWIN32__) +#if defined(OPENSSL_SYS_MSDOS) && !defined(__CYGWIN32__) #include #define fgets(a,b,c) noecho_fgets(a,b,c) #endif -#ifdef VMS +#ifdef OPENSSL_SYS_VMS #include #include #include @@ -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 } diff --git a/crypto/dh/dhtest.c b/crypto/dh/dhtest.c index ebc3f44e8c..e90f255f6c 100644 --- a/crypto/dh/dhtest.c +++ b/crypto/dh/dhtest.c @@ -59,7 +59,7 @@ #include #include #include -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS #include "../bio/bss_file.c" #endif #include @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) #else #include -#ifdef WIN16 +#ifdef OPENSSL_SYS_WIN16 #define MS_CALLBACK _far _loadds #else #define MS_CALLBACK @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) int i,alen,blen,aout,bout,ret=1; BIO *out; -#ifdef WIN32 +#ifdef OPENSSL_SYS_WIN32 CRYPTO_malloc_init(); #endif diff --git a/crypto/dsa/dsatest.c b/crypto/dsa/dsatest.c index c615e59321..fdac63275f 100644 --- a/crypto/dsa/dsatest.c +++ b/crypto/dsa/dsatest.c @@ -65,7 +65,7 @@ #include #include #include -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS #include "../bio/bss_file.c" #endif @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) #else #include -#ifdef WIN16 +#ifdef OPENSSL_SYS_WIN16 #define MS_CALLBACK _far _loadds #else #define MS_CALLBACK diff --git a/crypto/dso/dso_vms.c b/crypto/dso/dso_vms.c index b8fee7de3c..f492202793 100644 --- a/crypto/dso/dso_vms.c +++ b/crypto/dso/dso_vms.c @@ -59,7 +59,7 @@ #include #include #include -#ifdef VMS +#ifdef OPENSSL_SYS_VMS #pragma message disable DOLLARID #include #include @@ -70,7 +70,7 @@ #include "cryptlib.h" #include -#ifndef VMS +#ifndef OPENSSL_SYS_VMS DSO_METHOD *DSO_METHOD_vms(void) { return NULL; @@ -369,4 +369,4 @@ static char *vms_name_converter(DSO *dso, const char *filename) return(filename); } -#endif /* VMS */ +#endif /* OPENSSL_SYS_VMS */ diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c index e7d0a2be28..1e9fd91e0c 100644 --- a/crypto/dso/dso_win32.c +++ b/crypto/dso/dso_win32.c @@ -61,7 +61,7 @@ #include "cryptlib.h" #include -#ifndef WIN32 +#ifndef OPENSSL_SYS_WIN32 DSO_METHOD *DSO_METHOD_win32(void) { return NULL; @@ -273,4 +273,4 @@ static char *win32_name_converter(DSO *dso, const char *filename) return(translated); } -#endif /* WIN32 */ +#endif /* OPENSSL_SYS_WIN32 */ diff --git a/crypto/err/err.c b/crypto/err/err.c index de74b47890..4f7a2ce4ac 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -177,7 +177,7 @@ static ERR_STRING_DATA ERR_str_functs[]= {ERR_PACK(0,SYS_F_BIND,0), "bind"}, {ERR_PACK(0,SYS_F_LISTEN,0), "listen"}, {ERR_PACK(0,SYS_F_ACCEPT,0), "accept"}, -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS {ERR_PACK(0,SYS_F_WSASTARTUP,0), "WSAstartup"}, #endif {ERR_PACK(0,SYS_F_OPENDIR,0), "opendir"}, diff --git a/crypto/idea/idea_spd.c b/crypto/idea/idea_spd.c index 301946b198..755c7d8b9b 100644 --- a/crypto/idea/idea_spd.c +++ b/crypto/idea/idea_spd.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 @@ -289,7 +289,7 @@ int main(int argc, char **argv) printf("IDEA raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b); printf("IDEA cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c); exit(0); -#if defined(LINT) || defined(MSDOS) +#if defined(LINT) || defined(OPENSSL_SYS_MSDOS) return(0); #endif } diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index 378d59c4c8..3900bfeec3 100644 --- a/crypto/rand/md_rand.c +++ b/crypto/rand/md_rand.c @@ -294,7 +294,7 @@ static void ssleay_rand_add(const void *buf, int num, double add) entropy += add; if (!add_do_not