Skip to content

Commit bc36ee6

Browse files
committed
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.
1 parent f2bc668 commit bc36ee6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+464
-460
lines changed

Configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,6 @@ if ($no_krb5
693693
$cflags="-DOPENSSL_NO_KRB5 $cflags";
694694
$options.=" no-krb5" unless $no_krb5;
695695
$openssl_algorithm_defines .= "#define OPENSSL_NO_KRB5\n";
696-
$openssl_algorithm_defines .= "#define NO_KRB5\n";
697696
}
698697
else
699698
{

apps/app_rand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn)
124124
int consider_randfile = (file == NULL);
125125
char buffer[200];
126126

127-
#ifdef WINDOWS
127+
#ifdef OPENSSL_SYS_WINDOWS
128128
BIO_printf(bio_e,"Loading 'screen' into random state -");
129129
BIO_flush(bio_e);
130130
RAND_screen();

apps/apps.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
#include <openssl/pkcs12.h>
7171
#include <openssl/safestack.h>
7272

73-
#ifdef WINDOWS
73+
#ifdef OPENSSL_SYS_WINDOWS
7474
# include "bss_file.c"
7575
#endif
7676

@@ -184,7 +184,7 @@ int str2fmt(char *s)
184184
return(FORMAT_UNDEF);
185185
}
186186

187-
#if defined(MSDOS) || defined(WIN32) || defined(WIN16)
187+
#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
188188
void program_name(char *in, char *out, int size)
189189
{
190190
int i,n;
@@ -222,7 +222,7 @@ void program_name(char *in, char *out, int size)
222222
out[n]='\0';
223223
}
224224
#else
225-
#ifdef VMS
225+
#ifdef OPENSSL_SYS_VMS
226226
void program_name(char *in, char *out, int size)
227227
{
228228
char *p=in, *q;
@@ -258,10 +258,10 @@ void program_name(char *in, char *out, int size)
258258
#endif
259259
#endif
260260

261-
#ifdef WIN32
261+
#ifdef OPENSSL_SYS_WIN32
262262
int WIN32_rename(char *from, char *to)
263263
{
264-
#ifdef WINNT
264+
#ifdef OPENSSL_SYS_WINNT
265265
int ret;
266266
/* Note: MoveFileEx() doesn't work under Win95, Win98 */
267267

apps/asn1pars.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ int MAIN(int argc, char **argv)
206206
goto end;
207207
}
208208
BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
209-
#ifdef VMS
209+
#ifdef OPENSSL_SYS_VMS
210210
{
211211
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
212212
out = BIO_push(tmpbio, out);

apps/ca.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
#include <openssl/engine.h>
8080

8181
#ifndef W_OK
82-
# ifdef VMS
82+
# ifdef OPENSSL_SYS_VMS
8383
# if defined(__DECC)
8484
# include <unistd.h>
8585
# else
@@ -545,7 +545,7 @@ EF_ALIGNMENT=0;
545545
if (configfile == NULL)
546546
{
547547
/* We will just use 'buf[0]' as a temporary buffer. */
548-
#ifdef VMS
548+
#ifdef OPENSSL_SYS_VMS
549549
strncpy(buf[0],X509_get_default_cert_area(),
550550
sizeof(buf[0])-1-sizeof(CONFIG_FILE));
551551
#else
@@ -755,7 +755,8 @@ EF_ALIGNMENT=0;
755755
BIO_printf(bio_err,"there needs to be defined a directory for new certificate to be placed in\n");
756756
goto err;
757757
}
758-
#ifndef VMS /* outdir is a directory spec, but access() for VMS demands a
758+
#ifndef OPENSSL_SYS_VMS
759+
/* outdir is a directory spec, but access() for VMS demands a
759760
filename. In any case, stat(), below, will catch the problem
760761
if outdir is not a directory spec, and the fopen() or open()
761762
will catch an error if there is no write access.
@@ -853,7 +854,7 @@ EF_ALIGNMENT=0;
853854
if (verbose)
854855
{
855856
BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); /* cannot fail */
856-
#ifdef VMS
857+
#ifdef OPENSSL_SYS_VMS
857858
{
858859
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
859860
out = BIO_push(tmpbio, out);
@@ -996,7 +997,7 @@ EF_ALIGNMENT=0;
996997
else
997998
{
998999
BIO_set_fp(Sout,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
999-
#ifdef VMS
1000+
#ifdef OPENSSL_SYS_VMS
10001001
{
10011002
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
10021003
Sout = BIO_push(tmpbio, Sout);
@@ -1232,7 +1233,7 @@ EF_ALIGNMENT=0;
12321233

12331234
strncpy(buf[0],serialfile,BSIZE-4);
12341235

1235-
#ifdef VMS
1236+
#ifdef OPENSSL_SYS_VMS
12361237
strcat(buf[0],"-new");
12371238
#else
12381239
strcat(buf[0],".new");
@@ -1242,7 +1243,7 @@ EF_ALIGNMENT=0;
12421243

12431244
strncpy(buf[1],dbfile,BSIZE-4);
12441245

1245-
#ifdef VMS
1246+
#ifdef OPENSSL_SYS_VMS
12461247
strcat(buf[1],"-new");
12471248
#else
12481249
strcat(buf[1],".new");
@@ -1272,7 +1273,7 @@ EF_ALIGNMENT=0;
12721273

12731274
strncpy(buf[2],outdir,BSIZE-(j*2)-6);
12741275

1275-
#ifndef VMS
1276+
#ifndef OPENSSL_SYS_VMS
12761277
strcat(buf[2],"/");
12771278
#endif
12781279

@@ -1309,7 +1310,7 @@ EF_ALIGNMENT=0;
13091310
/* Rename the database and the serial file */
13101311
strncpy(buf[2],serialfile,BSIZE-4);
13111312

1312-
#ifdef VMS
1313+
#ifdef OPENSSL_SYS_VMS
13131314
strcat(buf[2],"-old");
13141315
#else
13151316
strcat(buf[2],".old");
@@ -1337,7 +1338,7 @@ EF_ALIGNMENT=0;
13371338

13381339
strncpy(buf[2],dbfile,BSIZE-4);
13391340

1340-
#ifdef VMS
1341+
#ifdef OPENSSL_SYS_VMS
13411342
strcat(buf[2],"-old");
13421343
#else
13431344
strcat(buf[2],".old");

apps/ciphers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ int MAIN(int argc, char **argv)
108108
if (bio_err == NULL)
109109
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
110110
STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
111-
#ifdef VMS
111+
#ifdef OPENSSL_SYS_VMS
112112
{
113113
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
114114
STDout = BIO_push(tmpbio, STDout);

apps/crl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ int MAIN(int argc, char **argv)
124124
if ((bio_out=BIO_new(BIO_s_file())) != NULL)
125125
{
126126
BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
127-
#ifdef VMS
127+
#ifdef OPENSSL_SYS_VMS
128128
{
129129
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
130130
bio_out = BIO_push(tmpbio, bio_out);
@@ -324,7 +324,7 @@ int MAIN(int argc, char **argv)
324324
if (outfile == NULL)
325325
{
326326
BIO_set_fp(out,stdout,BIO_NOCLOSE);
327-
#ifdef VMS
327+
#ifdef OPENSSL_SYS_VMS
328328
{
329329
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
330330
out = BIO_push(tmpbio, out);

apps/crl2p7.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ int MAIN(int argc, char **argv)
241241
if (outfile == NULL)
242242
{
243243
BIO_set_fp(out,stdout,BIO_NOCLOSE);
244-
#ifdef VMS
244+
#ifdef OPENSSL_SYS_VMS
245245
{
246246
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
247247
out = BIO_push(tmpbio, out);

apps/dgst.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ int MAIN(int argc, char **argv)
272272
else out = BIO_new_file(outfile, "w");
273273
} else {
274274
out = BIO_new_fp(stdout, BIO_NOCLOSE);
275-
#ifdef VMS
275+
#ifdef OPENSSL_SYS_VMS
276276
{
277277
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
278278
out = BIO_push(tmpbio, out);

apps/dh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ int MAIN(int argc, char **argv)
213213
if (outfile == NULL)
214214
{
215215
BIO_set_fp(out,stdout,BIO_NOCLOSE);
216-
#ifdef VMS
216+
#ifdef OPENSSL_SYS_VMS
217217
{
218218
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
219219
out = BIO_push(tmpbio, out);

0 commit comments

Comments
 (0)