diff options
author | Richard Levitte <levitte@openssl.org> | 2001-02-20 08:13:47 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-02-20 08:13:47 +0000 |
commit | bc36ee6227517edae802bcb0da68d4f04fe1fb5e (patch) | |
tree | 19782c56cd5f5930807df5c8bfb4963a05121c48 /apps | |
parent | f2bc668429fa2abdc77db0db861a9bb2be0c3a85 (diff) |
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.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_rand.c | 2 | ||||
-rw-r--r-- | apps/apps.c | 10 | ||||
-rw-r--r-- | apps/asn1pars.c | 2 | ||||
-rw-r--r-- | apps/ca.c | 21 | ||||
-rw-r--r-- | apps/ciphers.c | 2 | ||||
-rw-r--r-- | apps/crl.c | 4 | ||||
-rw-r--r-- | apps/crl2p7.c | 2 | ||||
-rw-r--r-- | apps/dgst.c | 2 | ||||
-rw-r--r-- | apps/dh.c | 2 | ||||
-rw-r--r-- | apps/dhparam.c | 2 | ||||
-rw-r--r-- | apps/dsa.c | 2 | ||||
-rw-r--r-- | apps/dsaparam.c | 2 | ||||
-rw-r--r-- | apps/enc.c | 2 | ||||
-rw-r--r-- | apps/engine.c | 2 | ||||
-rw-r--r-- | apps/errstr.c | 2 | ||||
-rw-r--r-- | apps/gendh.c | 2 | ||||
-rw-r--r-- | apps/gendsa.c | 2 | ||||
-rw-r--r-- | apps/genrsa.c | 2 | ||||
-rw-r--r-- | apps/nseq.c | 2 | ||||
-rw-r--r-- | apps/openssl.c | 6 | ||||
-rw-r--r-- | apps/passwd.c | 2 | ||||
-rw-r--r-- | apps/pkcs12.c | 2 | ||||
-rw-r--r-- | apps/pkcs7.c | 2 | ||||
-rw-r--r-- | apps/pkcs8.c | 2 | ||||
-rw-r--r-- | apps/rand.c | 2 | ||||
-rw-r--r-- | apps/req.c | 6 | ||||
-rw-r--r-- | apps/rsa.c | 2 | ||||
-rw-r--r-- | apps/rsautl.c | 2 | ||||
-rw-r--r-- | apps/s_apps.h | 4 | ||||
-rw-r--r-- | apps/s_client.c | 16 | ||||
-rw-r--r-- | apps/s_server.c | 14 | ||||
-rw-r--r-- | apps/s_socket.c | 30 | ||||
-rw-r--r-- | apps/s_time.c | 8 | ||||
-rw-r--r-- | apps/sess_id.c | 2 | ||||
-rw-r--r-- | apps/smime.c | 2 | ||||
-rw-r--r-- | apps/speed.c | 4 | ||||
-rw-r--r-- | apps/spkac.c | 4 | ||||
-rw-r--r-- | apps/x509.c | 4 |
38 files changed, 92 insertions, 89 deletions
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 <openssl/pkcs12.h> #include <openssl/safestack.h> -#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); @@ -79,7 +79,7 @@ #include <openssl/engine.h> #ifndef W_OK -# ifdef VMS +# ifdef OPENSSL_SYS_VMS # if defined(__DECC) # include <unistd.h> # 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); @@ -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 <sys/types.h> -#if (defined(VMS) || defined(__VMS)) && !defined(FD_SET) +#include <openssl/opensslconf.h> + +#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 <openssl/engine.h> #include "s_apps.h" -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS #include <conio.h> #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 <openssl/engine.h> #include "s_apps.h" -#ifdef WINDOWS +#ifdef OPENSSL_SYS_WINDOWS #include <conio.h> #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 <openssl/ssl.h> 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_c |