]> git.ipfire.org Git - thirdparty/openssl.git/blame - makevms.com
Fix double free in d2i_PrivateKey().
[thirdparty/openssl.git] / makevms.com
CommitLineData
d02b48c6 1$!
7d7d2cbc
UM
2$! MAKEVMS.COM
3$! Original Author: UNKNOWN
4$! Rewritten By: Robert Byer
5$! Vice-President
6$! A-Com Computing, Inc.
7$! byer@mail.all-net.net
8$!
9$! Changes by Richard Levitte <richard@levitte.org>
b529bba4 10$! Zoltan Arpadffy <zoli@polarhome.com>
7d7d2cbc
UM
11$!
12$! This procedure creates the SSL libraries of "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB"
b6d0defb 13$! "[.xxx.EXE.SSL]LIBSSL.OLB"
006c7c6b 14$! The "xxx" denotes the machine architecture of ALPHA, IA64 or VAX.
7d7d2cbc
UM
15$!
16$! This procedures accepts two command line options listed below.
17$!
01d2e27a 18$! P1 specifies one of the following build options:
7d7d2cbc
UM
19$!
20$! ALL Just build "everything".
6f4f7f35
RL
21$! CONFIG Just build the "[.CRYPTO._xxx]OPENSSLCONF.H" file.
22$! BUILDINF Just build the "[.CRYPTO._xxx]BUILDINF.H" file.
7d7d2cbc 23$! SOFTLINKS Just fix the Unix soft links.
2e904727 24$! BUILDALL Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done.
7d7d2cbc 25$! CRYPTO Just build the "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
2db90e3a
RL
26$! CRYPTO/x Just build the x part of the
27$! "[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB" library.
7d7d2cbc
UM
28$! SSL Just build the "[.xxx.EXE.SSL]LIBSSL.OLB" library.
29$! SSL_TASK Just build the "[.xxx.EXE.SSL]SSL_TASK.EXE" program.
30$! TEST Just build the "[.xxx.EXE.TEST]" test programs for OpenSSL.
31$! APPS Just build the "[.xxx.EXE.APPS]" application programs for OpenSSL.
ad22b914 32$! ENGINES Just build the "[.xxx.EXE.ENGINES]" application programs for OpenSSL.
7d7d2cbc 33$!
01d2e27a 34$! P2, if defined, specifies the C pointer size. Ignored on VAX.
d135906d 35$! ("64=ARGV" gives more efficient code with HP C V7.3 or newer.)
ecff2e5c 36$! Supported values are:
7d7d2cbc 37$!
d135906d
RL
38$! "" Compile with default (/NOPOINTER_SIZE).
39$! 32 Compile with /POINTER_SIZE=32 (SHORT).
40$! 64 Compile with /POINTER_SIZE=64[=ARGV] (LONG[=ARGV]).
41$! (Automatically select ARGV if compiler supports it.)
42$! 64= Compile with /POINTER_SIZE=64 (LONG).
43$! 64=ARGV Compile with /POINTER_SIZE=64=ARGV (LONG=ARGV).
90d02be7 44$!
01d2e27a
RL
45$! P3 specifies DEBUG or NODEBUG, to compile with or without debugging
46$! information.
90d02be7 47$!
01d2e27a 48$! P4 specifies which compiler to try to compile under.
7d7d2cbc
UM
49$!
50$! VAXC For VAX C.
51$! DECC For DEC C.
52$! GNUC For GNU C.
53$! LINK To only link the programs from existing object files.
58dc480f 54$! (not yet implemented)
7d7d2cbc 55$!
6f4f7f35 56$! If you don't specify a compiler, it will try to determine which
7d7d2cbc
UM
57$! "C" compiler to use.
58$!
b935754c
RL
59$! P5, if defined, sets a TCP/IP library to use, through one of the following
60$! keywords:
7d7d2cbc
UM
61$!
62$! UCX for UCX or UCX emulation
b935754c
RL
63$! TCPIP for TCP/IP Services or TCP/IP Services emulation
64$! (this is prefered over UCX)
7d7d2cbc 65$! SOCKETSHR for SOCKETSHR+NETLIB
b935754c
RL
66$! NONE to avoid specifying which TCP/IP implementation to
67$! use at build time (this works with DEC C). This is
68$! the default.
7d7d2cbc 69$!
01d2e27a
RL
70$! P6, if defined, sets a compiler thread NOT needed on OpenVMS 7.1 (and up).
71$!
72$! P7, if defined, specifies a directory where ZLIB files (zlib.h,
73$! libz.olb) may be found. Optionally, a non-default object library
74$! name may be included ("dev:[dir]libz_64.olb", for example).
75$!
7d7d2cbc 76$!
01d2e27a
RL
77$! Announce/identify.
78$!
79$ proc = f$environment( "procedure")
80$ write sys$output "@@@ "+ -
81 f$parse( proc, , , "name")+ f$parse( proc, , , "type")
7d7d2cbc 82$!
006c7c6b
RL
83$ DEF_ORIG = F$ENVIRONMENT( "DEFAULT")
84$ ON ERROR THEN GOTO TIDY
85$ ON CONTROL_C THEN GOTO TIDY
86$!
2e904727
RL
87$! Check if we're in a batch job, and make sure we get to
88$! the directory this script is in
89$!
90$ IF F$MODE() .EQS. "BATCH"
91$ THEN
92$ COMNAME=F$ENVIRONMENT("PROCEDURE")
93$ COMPATH=F$PARSE("A.;",COMNAME) - "A.;"
94$ SET DEF 'COMPATH'
95$ ENDIF
96$!
006c7c6b 97$! Check What Architecture We Are Using.
7d7d2cbc 98$!
006c7c6b 99$ IF (F$GETSYI("CPU").LT.128)
7d7d2cbc
UM
100$ THEN
101$!
006c7c6b 102$! The Architecture Is VAX.
7d7d2cbc 103$!
6f4f7f35 104$ ARCH = "VAX"
7d7d2cbc
UM
105$!
106$! Else...
107$!
108$ ELSE
109$!
006c7c6b 110$! The Architecture Is Alpha, IA64 or whatever comes in the future.
7d7d2cbc 111$!
006c7c6b
RL
112$ ARCH = F$EDIT( F$GETSYI( "ARCH_NAME"), "UPCASE")
113$ IF (ARCH .EQS. "") THEN ARCH = "UNK"
7d7d2cbc
UM
114$!
115$! End The Architecture Check.
116$!
117$ ENDIF
118$!
01d2e27a
RL
119$ ARCHD = ARCH
120$ LIB32 = "32"
121$ POINTER_SIZE = ""
122$!
6f4f7f35
RL
123$! Get VMS version.
124$!
125$ VMS_VERSION = f$edit( f$getsyi( "VERSION"), "TRIM")
126$!
7d7d2cbc
UM
127$! Check To Make Sure We Have Valid Command Line Parameters.
128$!
129$ GOSUB CHECK_OPTIONS
130$!
131$! Check To See What We Are To Do.
132$!
2e904727 133$ IF (BUILDCOMMAND.EQS."ALL")
7d7d2cbc
UM
134$ THEN
135$!
2e904727 136$! Start with building the OpenSSL configuration file.
7d7d2cbc 137$!
2e904727 138$ GOSUB CONFIG
7d7d2cbc 139$!
8c197cc5 140$! Create The "BUILDINF.H" Include File.
7d7d2cbc 141$!
8c197cc5 142$ GOSUB BUILDINF
7d7d2cbc 143$!
2e904727
RL
144$! Fix The Unix Softlinks.
145$!
146$ GOSUB SOFTLINKS
147$!
148$ ENDIF
149$!
150$ IF (BUILDCOMMAND.EQS."ALL".OR.BUILDCOMMAND.EQS."BUILDALL")
151$ THEN
152$!
7d7d2cbc
UM
153$! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
154$!
155$ GOSUB CRYPTO
156$!
157$! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
158$!
159$ GOSUB SSL
160$!
161$! Build The [.xxx.EXE.SSL]SSL_TASK.EXE DECNet SSL Engine.
162$!
163$ GOSUB SSL_TASK
164$!
165$! Build The [.xxx.EXE.TEST] OpenSSL Test Utilities.
166$!
167$ GOSUB TEST
168$!
169$! Build The [.xxx.EXE.APPS] OpenSSL Application Utilities.
170$!
171$ GOSUB APPS
172$!
ad22b914
RL
173$! Build The [.xxx.EXE.ENGINES] OpenSSL Shareable Engines.
174$!
175$ GOSUB ENGINES
176$!
7d7d2cbc
UM
177$! Else...
178$!
179$ ELSE
180$!
181$! Build Just What The User Wants Us To Build.
182$!
2e904727
RL
183$ GOSUB 'BUILDCOMMAND'
184$!
7d7d2cbc
UM
185$ ENDIF
186$!
187$! Time To EXIT.
188$!
006c7c6b 189$ GOTO TIDY
2e904727 190$!
6f4f7f35 191$! Rebuild The [.CRYPTO._xxx]OPENSSLCONF.H" file.
2e904727
RL
192$!
193$ CONFIG:
194$!
6f4f7f35 195$! Tell The User We Are Creating The [.CRYPTO._xxx]OPENSSLCONF.H File.
006c7c6b 196$!
01d2e27a 197$ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCHD']OPENSSLCONF.H Include File."
2e904727 198$!
006c7c6b 199$! First, make sure the directory exists.
2e904727 200$!
01d2e27a
RL
201$ IF F$PARSE("SYS$DISK:[.CRYPTO.''ARCHD']") .EQS. "" THEN -
202 CREATE/DIRECTORY SYS$DISK:[.CRYPTO.'ARCHD']
2e904727 203$!
6f4f7f35
RL
204$! Different tar/UnZip versions/option may have named the file differently
205$ IF F$SEARCH("[.crypto]opensslconf.h_in") .NES. ""
206$ THEN
207$ OPENSSLCONF_H_IN = "[.crypto]opensslconf.h_in"
208$ ELSE
209$ IF F$SEARCH( "[.crypto]opensslconf_h.in") .NES. ""
210$ THEN
211$ OPENSSLCONF_H_IN = "[.crypto]opensslconf_h.in"
212$ ELSE
213$ ! For ODS-5
214$ IF F$SEARCH( "[.crypto]opensslconf.h.in") .NES. ""
215$ THEN
216$ OPENSSLCONF_H_IN = "[.crypto]opensslconf.h.in"
217$ ELSE
218$ WRITE SYS$ERROR "Couldn't find a [.crypto]opensslconf.h.in. Exiting!"
219$ $STATUS = %X00018294 ! "%RMS-F-FNF, file not found".
220$ GOTO TIDY
221$ ENDIF
222$ ENDIF
223$ ENDIF
224$!
225$! Create The [.CRYPTO._xxx]OPENSSLCONF.H File.
006c7c6b 226$! Make sure it has the right format.
2e904727 227$!
01d2e27a 228$ OSCH_NAME = "SYS$DISK:[.CRYPTO.''ARCHD']OPENSSLCONF.H"
006c7c6b
RL
229$ CREATE /FDL=SYS$INPUT: 'OSCH_NAME'
230RECORD
231 FORMAT stream_lf
232$ OPEN /APPEND H_FILE 'OSCH_NAME'
233$!
6f4f7f35 234$! Write The [.CRYPTO._xxx]OPENSSLCONF.H File.
2e904727
RL
235$!
236$ WRITE H_FILE "/* This file was automatically built using makevms.com */"
6f4f7f35 237$ WRITE H_FILE "/* and ''OPENSSLCONF_H_IN' */"
6525ced5
RL
238$!
239$! Write a few macros that indicate how this system was built.
240$!
241$ WRITE H_FILE ""
242$ WRITE H_FILE "#ifndef OPENSSL_SYS_VMS"
243$ WRITE H_FILE "# define OPENSSL_SYS_VMS"
244$ WRITE H_FILE "#endif"
6f4f7f35
RL
245$
246$! One of the best way to figure out what the list should be is to do
01d2e27a 247$! the following on a Unix system:
6f4f7f35
RL
248$! grep OPENSSL_NO_ crypto/*/*.h ssl/*.h engines/*.h engines/*/*.h|grep ':# *if'|sed -e 's/^.*def //'|sort|uniq
249$! For that reason, the list will also always end up in alphabetical order
250$ CONFIG_LOGICALS := AES,-
251 ASM,INLINE_ASM,-
252 BF,-
253 BIO,-
254 BUFFER,-
255 BUF_FREELISTS,-
256 CAMELLIA,-
257 CAST,-
258 CMS,-
259 COMP,-
260 DEPRECATED,-
261 DES,-
262 DGRAM,-
263 DH,-
264 DSA,-
265 EC,-
8c6a514e 266 EC2M,-
6f4f7f35
RL
267 ECDH,-
268 ECDSA,-
8c6a514e 269 EC_NISTP_64_GCC_128,-
6f4f7f35
RL
270 ENGINE,-
271 ERR,-
272 EVP,-
273 FP_API,-
274 GMP,-
275 GOST,-
276 HASH_COMP,-
277 HMAC,-
278 IDEA,-
279 JPAKE,-
280 KRB5,-
281 LHASH,-
282 MD2,-
283 MD4,-
284 MD5,-
285 MDC2,-
7a3809fd 286 NEXTPROTONEG,-
6f4f7f35
RL
287 OCSP,-
288 PSK,-
289 RC2,-
290 RC4,-
291 RC5,-
292 RFC3779,-
293 RIPEMD,-
294 RSA,-
295 SEED,-
296 SHA,-
297 SHA0,-
298 SHA1,-
299 SHA256,-
300 SHA512,-
301 SOCK,-
4692b334 302 SRP,-
6f4f7f35 303 SSL2,-
8c6a514e 304 SSL_INTERN,-
6f4f7f35
RL
305 STACK,-
306 STATIC_ENGINE,-
307 STDIO,-
308 STORE,-
309 TLSEXT,-
310 WHIRLPOOL,-
311 X509
312$! Add a few that we know about
313$ CONFIG_LOGICALS := 'CONFIG_LOGICALS',-
314 THREADS
315$! The following rules, which dictate how some algorithm choices affect
316$! others, are picked from Configure.
317$! Quick syntax:
318$! list = item[ ; list]
319$! item = algos / dependents
320$! algos = algo [, algos]
321$! dependents = dependent [, dependents]
322$! When a list of algos is specified in one item, it means that they must
323$! all be disabled for the rule to apply.
324$! When a list of dependents is specified in one item, it means that they
325$! will all be disabled if the rule applies.
326$! Rules are checked sequentially. If a rule disables an algorithm, it will
327$! affect all following rules that depend on that algorithm being disabled.
328$! To force something to be enabled or disabled, have no algorithms in the
329$! algos part.
330$ CONFIG_DISABLE_RULES := RIJNDAEL/AES;-
331 DES/MDC2;-
332 EC/ECDSA,ECDH;-
333 MD5/SSL2,SSL3,TLS1;-
334 SHA/SSL3,TLS1;-
335 RSA/SSL2;-
336 RSA,DSA/SSL2;-
337 DH/SSL3,TLS1;-
338 TLS1/TLSEXT;-
339 EC/GOST;-
340 DSA/GOST;-
341 DH/GOST;-
342 /STATIC_ENGINE;-
8c6a514e 343 /KRB5;-
7a3809fd
RL
344 /EC_NISTP_64_GCC_128;-
345 /GMP;-
346 /MD2;-
347 /RC5;-
348 /RFC3779;-
349 /SCTP
6f4f7f35
RL
350$ CONFIG_ENABLE_RULES := ZLIB_DYNAMIC/ZLIB;-
351 /THREADS
352$
353$! Architecture specific rule addtions
354$ IF ARCH .EQS. "VAX"
355$ THEN
01d2e27a 356$ ! Disable algorithms that require 64-bit integers in C
6f4f7f35
RL
357$ CONFIG_DISABLE_RULES = CONFIG_DISABLE_RULES + -
358 ";/GOST" + -
359 ";/WHIRLPOOL"
360$ ENDIF
361$
6525ced5 362$ CONFIG_LOG_I = 0
6f4f7f35
RL
363$ CONFIG_LOG_LOOP1:
364$ CONFIG_LOG_E = F$EDIT(F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS),"TRIM")
6525ced5 365$ CONFIG_LOG_I = CONFIG_LOG_I + 1
6f4f7f35
RL
366$ IF CONFIG_LOG_E .EQS. "" THEN GOTO CONFIG_LOG_LOOP1
367$ IF CONFIG_LOG_E .EQS. "," THEN GOTO CONFIG_LOG_LOOP1_END
368$ IF F$TRNLNM("OPENSSL_NO_"+CONFIG_LOG_E)
6525ced5 369$ THEN
6f4f7f35
RL
370$ CONFIG_DISABLED_'CONFIG_LOG_E' := YES
371$ CONFIG_ENABLED_'CONFIG_LOG_E' := NO
372$ CONFIG_CHANGED_'CONFIG_LOG_E' := YES
373$ ELSE
374$ CONFIG_DISABLED_'CONFIG_LOG_E' := NO
375$ CONFIG_ENABLED_'CONFIG_LOG_E' := YES
376$ ! Because all algorithms are assumed enabled by default
377$ CONFIG_CHANGED_'CONFIG_LOG_E' := NO
378$ ENDIF
379$ GOTO CONFIG_LOG_LOOP1
380$ CONFIG_LOG_LOOP1_END:
381$
382$! Apply cascading disable rules
383$ CONFIG_DISABLE_I = 0
384$ CONFIG_DISABLE_LOOP0:
01d2e27a
RL
385$ CONFIG_DISABLE_E = F$EDIT(F$ELEMENT(CONFIG_DISABLE_I,";", -
386 CONFIG_DISABLE_RULES),"TRIM")
6f4f7f35
RL
387$ CONFIG_DISABLE_I = CONFIG_DISABLE_I + 1
388$ IF CONFIG_DISABLE_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP0
389$ IF CONFIG_DISABLE_E .EQS. ";" THEN GOTO CONFIG_DISABLE_LOOP0_END
390$
391$ CONFIG_DISABLE_ALGOS = F$EDIT(F$ELEMENT(0,"/",CONFIG_DISABLE_E),"TRIM")
392$ CONFIG_DISABLE_DEPENDENTS = F$EDIT(F$ELEMENT(1,"/",CONFIG_DISABLE_E),"TRIM")
393$ TO_DISABLE := YES
394$ CONFIG_ALGO_I = 0
395$ CONFIG_DISABLE_LOOP1:
01d2e27a
RL
396$ CONFIG_ALGO_E = F$EDIT(F$ELEMENT(CONFIG_ALGO_I,",", -
397 CONFIG_DISABLE_ALGOS),"TRIM")
6f4f7f35
RL
398$ CONFIG_ALGO_I = CONFIG_ALGO_I + 1
399$ IF CONFIG_ALGO_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP1
400$ IF CONFIG_ALGO_E .EQS. "," THEN GOTO CONFIG_DISABLE_LOOP1_END
401$ IF F$TYPE(CONFIG_DISABLED_'CONFIG_ALGO_E') .EQS. ""
6525ced5 402$ THEN
6f4f7f35
RL
403$ TO_DISABLE := NO
404$ ELSE
405$ IF .NOT. CONFIG_DISABLED_'CONFIG_ALGO_E' THEN TO_DISABLE := NO
6525ced5 406$ ENDIF
6f4f7f35
RL
407$ GOTO CONFIG_DISABLE_LOOP1
408$ CONFIG_DISABLE_LOOP1_END:
409$
410$ IF TO_DISABLE
411$ THEN
412$ CONFIG_DEPENDENT_I = 0
413$ CONFIG_DISABLE_LOOP2:
01d2e27a
RL
414$ CONFIG_DEPENDENT_E = F$EDIT(F$ELEMENT(CONFIG_DEPENDENT_I,",", -
415 CONFIG_DISABLE_DEPENDENTS),"TRIM")
6f4f7f35
RL
416$ CONFIG_DEPENDENT_I = CONFIG_DEPENDENT_I + 1
417$ IF CONFIG_DEPENDENT_E .EQS. "" THEN GOTO CONFIG_DISABLE_LOOP2
418$ IF CONFIG_DEPENDENT_E .EQS. "," THEN GOTO CONFIG_DISABLE_LOOP2_END
419$ CONFIG_DISABLED_'CONFIG_DEPENDENT_E' := YES
420$ CONFIG_ENABLED_'CONFIG_DEPENDENT_E' := NO
421$ ! Better not to assume defaults at this point...
422$ CONFIG_CHANGED_'CONFIG_DEPENDENT_E' := YES
01d2e27a
RL
423$ WRITE SYS$ERROR -
424 "''CONFIG_DEPENDENT_E' disabled by rule ''CONFIG_DISABLE_E'"
6f4f7f35
RL
425$ GOTO CONFIG_DISABLE_LOOP2
426$ CONFIG_DISABLE_LOOP2_END:
427$ ENDIF
428$ GOTO CONFIG_DISABLE_LOOP0
429$ CONFIG_DISABLE_LOOP0_END:
430$
431$! Apply cascading enable rules
432$ CONFIG_ENABLE_I = 0
433$ CONFIG_ENABLE_LOOP0:
01d2e27a
RL
434$ CONFIG_ENABLE_E = F$EDIT(F$ELEMENT(CONFIG_ENABLE_I,";", -
435 CONFIG_ENABLE_RULES),"TRIM")
6f4f7f35
RL
436$ CONFIG_ENABLE_I = CONFIG_ENABLE_I + 1
437$ IF CONFIG_ENABLE_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP0
438$ IF CONFIG_ENABLE_E .EQS. ";" THEN GOTO CONFIG_ENABLE_LOOP0_END
439$
440$ CONFIG_ENABLE_ALGOS = F$EDIT(F$ELEMENT(0,"/",CONFIG_ENABLE_E),"TRIM")
441$ CONFIG_ENABLE_DEPENDENTS = F$EDIT(F$ELEMENT(1,"/",CONFIG_ENABLE_E),"TRIM")
442$ TO_ENABLE := YES
443$ CONFIG_ALGO_I = 0
444$ CONFIG_ENABLE_LOOP1:
01d2e27a
RL
445$ CONFIG_ALGO_E = F$EDIT(F$ELEMENT(CONFIG_ALGO_I,",", -
446 CONFIG_ENABLE_ALGOS),"TRIM")
6f4f7f35
RL
447$ CONFIG_ALGO_I = CONFIG_ALGO_I + 1
448$ IF CONFIG_ALGO_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP1
449$ IF CONFIG_ALGO_E .EQS. "," THEN GOTO CONFIG_ENABLE_LOOP1_END
450$ IF F$TYPE(CONFIG_ENABLED_'CONFIG_ALGO_E') .EQS. ""
6525ced5 451$ THEN
6f4f7f35
RL
452$ TO_ENABLE := NO
453$ ELSE
454$ IF .NOT. CONFIG_ENABLED_'CONFIG_ALGO_E' THEN TO_ENABLE := NO
6525ced5 455$ ENDIF
6f4f7f35
RL
456$ GOTO CONFIG_ENABLE_LOOP1
457$ CONFIG_ENABLE_LOOP1_END:
458$
459$ IF TO_ENABLE
460$ THEN
461$ CONFIG_DEPENDENT_I = 0
462$ CONFIG_ENABLE_LOOP2:
01d2e27a
RL
463$ CONFIG_DEPENDENT_E = F$EDIT(F$ELEMENT(CONFIG_DEPENDENT_I,",", -
464 CONFIG_ENABLE_DEPENDENTS),"TRIM")
6f4f7f35
RL
465$ CONFIG_DEPENDENT_I = CONFIG_DEPENDENT_I + 1
466$ IF CONFIG_DEPENDENT_E .EQS. "" THEN GOTO CONFIG_ENABLE_LOOP2
467$ IF CONFIG_DEPENDENT_E .EQS. "," THEN GOTO CONFIG_ENABLE_LOOP2_END
468$ CONFIG_DISABLED_'CONFIG_DEPENDENT_E' := NO
469$ CONFIG_ENABLED_'CONFIG_DEPENDENT_E' := YES
470$ ! Better not to assume defaults at this point...
471$ CONFIG_CHANGED_'CONFIG_DEPENDENT_E' := YES
01d2e27a
RL
472$ WRITE SYS$ERROR -
473 "''CONFIG_DEPENDENT_E' enabled by rule ''CONFIG_ENABLE_E'"
6f4f7f35
RL
474$ GOTO CONFIG_ENABLE_LOOP2
475$ CONFIG_ENABLE_LOOP2_END:
6525ced5 476$ ENDIF
6f4f7f35
RL
477$ GOTO CONFIG_ENABLE_LOOP0
478$ CONFIG_ENABLE_LOOP0_END:
479$
480$! Write to the configuration
481$ CONFIG_LOG_I = 0
482$ CONFIG_LOG_LOOP2:
483$ CONFIG_LOG_E = F$EDIT(F$ELEMENT(CONFIG_LOG_I,",",CONFIG_LOGICALS),"TRIM")
484$ CONFIG_LOG_I = CONFIG_LOG_I + 1
485$ IF CONFIG_LOG_E .EQS. "" THEN GOTO CONFIG_LOG_LOOP2
486$ IF CONFIG_LOG_E .EQS. "," THEN GOTO CONFIG_LOG_LOOP2_END
487$ IF CONFIG_CHANGED_'CONFIG_LOG_E'
2e904727 488$ THEN
6f4f7f35 489$ IF CONFIG_DISABLED_'CONFIG_LOG_E'
7b5ffd68 490$ THEN
6f4f7f35
RL
491$ WRITE H_FILE "#ifndef OPENSSL_NO_",CONFIG_LOG_E
492$ WRITE H_FILE "# define OPENSSL_NO_",CONFIG_LOG_E
493$ WRITE H_FILE "#endif"
7b5ffd68 494$ ELSE
6f4f7f35
RL
495$ WRITE H_FILE "#ifndef OPENSSL_",CONFIG_LOG_E
496$ WRITE H_FILE "# define OPENSSL_",CONFIG_LOG_E
497$ WRITE H_FILE "#endif"
7b5ffd68 498$ ENDIF
2e904727 499$ ENDIF
6f4f7f35
RL
500$ GOTO CONFIG_LOG_LOOP2
501$ CONFIG_LOG_LOOP2_END:
502$!
01d2e27a
RL
503$ WRITE H_FILE ""
504$ WRITE H_FILE "/* 2011-02-23 SMS."
505$ WRITE H_FILE " * On VMS (V8.3), setvbuf() doesn't support a 64-bit"
506$ WRITE H_FILE " * ""in"" pointer, and the help says:"
507$ WRITE H_FILE " * Please note that the previously documented"
508$ WRITE H_FILE " * value _IONBF is not supported."
509$ WRITE H_FILE " * So, skip it on VMS."
510$ WRITE H_FILE " */"
511$ WRITE H_FILE "#define OPENSSL_NO_SETVBUF_IONBF"
cef781cc
DSH
512$ WRITE H_FILE "/* STCP support comes with TCPIP 5.7 ECO 2 "
513$ WRITE H_FILE " * enable on newer systems / 2012-02-24 arpadffy */"
514$ WRITE H_FILE "#define OPENSSL_NO_SCTP"
01d2e27a
RL
515$ WRITE H_FILE ""
516$!
6f4f7f35
RL
517$! Add in the common "crypto/opensslconf.h.in".
518$!
519$ TYPE 'OPENSSLCONF_H_IN' /OUTPUT=H_FILE:
520$!
b529bba4 521$ IF ARCH .NES. "VAX"
2e904727
RL
522$ THEN
523$!
b3b35df2 524$! Write the non-VAX specific data
2e904727
RL
525$!
526$ WRITE H_FILE "#if defined(HEADER_RC4_H)"
527$ WRITE H_FILE "#undef RC4_INT"
528$ WRITE H_FILE "#define RC4_INT unsigned int"
529$ WRITE H_FILE "#undef RC4_CHUNK"
530$ WRITE H_FILE "#define RC4_CHUNK unsigned long long"
531$ WRITE H_FILE "#endif"
532$!
533$ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
534$ WRITE H_FILE "#undef DES_LONG"
535$ WRITE H_FILE "#define DES_LONG unsigned int"
536$ WRITE H_FILE "#undef DES_PTR"
537$ WRITE H_FILE "#define DES_PTR"
538$ WRITE H_FILE "#undef DES_RISC1"
539$ WRITE H_FILE "#undef DES_RISC2"
540$ WRITE H_FILE "#define DES_RISC1"
541$ WRITE H_FILE "#undef DES_UNROLL"
542$ WRITE H_FILE "#define DES_UNROLL"
543$ WRITE H_FILE "#endif"
544$!
545$ WRITE H_FILE "#if defined(HEADER_BN_H)"
256b5d58 546$ WRITE H_FILE "#undef BN_LLONG" ! Never define with SIXTY_FOUR_BIT
2e904727
RL
547$ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
548$ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
5a16d270 549$ WRITE H_FILE "#define SIXTY_FOUR_BIT"
2e904727
RL
550$ WRITE H_FILE "#undef THIRTY_TWO_BIT"
551$ WRITE H_FILE "#undef SIXTEEN_BIT"
552$ WRITE H_FILE "#undef EIGHT_BIT"
553$ WRITE H_FILE "#endif"
62dc5aad
RL
554$
555$ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
2e904727
RL
556$!
557$! Else...
558$!
559$ ELSE
560$!
561$! Write the VAX specific data
562$!
563$ WRITE H_FILE "#if defined(HEADER_RC4_H)"
564$ WRITE H_FILE "#undef RC4_INT"
565$ WRITE H_FILE "#define RC4_INT unsigned char"
566$ WRITE H_FILE "#undef RC4_CHUNK"
567$ WRITE H_FILE "#define RC4_CHUNK unsigned long"
568$ WRITE H_FILE "#endif"
569$!
570$ WRITE H_FILE "#if defined(HEADER_DES_LOCL_H)"
571$ WRITE H_FILE "#undef DES_LONG"
572$ WRITE H_FILE "#define DES_LONG unsigned long"
573$ WRITE H_FILE "#undef DES_PTR"
574$ WRITE H_FILE "#define DES_PTR"
575$ WRITE H_FILE "#undef DES_RISC1"
576$ WRITE H_FILE "#undef DES_RISC2"
577$ WRITE H_FILE "#undef DES_UNROLL"
578$ WRITE H_FILE "#endif"
579$!
580$ WRITE H_FILE "#if defined(HEADER_BN_H)"
256b5d58 581$ WRITE H_FILE "#undef BN_LLONG" ! VAX C/DEC C doesn't have long long
2e904727
RL
582$ WRITE H_FILE "#undef SIXTY_FOUR_BIT_LONG"
583$ WRITE H_FILE "#undef SIXTY_FOUR_BIT"
2e904727 584$ WRITE H_FILE "#undef THIRTY_TWO_BIT"
4cce8244 585$ WRITE H_FILE "#define THIRTY_TWO_BIT"
2e904727
RL
586$ WRITE H_FILE "#undef SIXTEEN_BIT"
587$ WRITE H_FILE "#undef EIGHT_BIT"
588$ WRITE H_FILE "#endif"
42fe218b 589$!
006c7c6b
RL
590$! Oddly enough, the following symbol is tested in crypto/sha/sha512.c
591$! before sha.h gets included (and HEADER_SHA_H defined), so we will not
592$! protect this one...
42fe218b
RL
593$ WRITE H_FILE "#undef OPENSSL_NO_SHA512"
594$ WRITE H_FILE "#define OPENSSL_NO_SHA512"
42fe218b 595$!
62dc5aad
RL
596$ WRITE H_FILE "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION"
597$ WRITE H_FILE "#define OPENSSL_EXPORT_VAR_AS_FUNCTION"
2e904727
RL
598$!
599$! End
600$!
601$ ENDIF
602$!
6f4f7f35 603$! Close the [.CRYPTO._xxx]OPENSSLCONF.H file
2e904727
RL
604$!
605$ CLOSE H_FILE
606$!
6f4f7f35 607$! Purge The [.CRYPTO._xxx]OPENSSLCONF.H file
006c7c6b 608$!
01d2e27a 609$ PURGE SYS$DISK:[.CRYPTO.'ARCHD']OPENSSLCONF.H
006c7c6b 610$!
2e904727
RL
611$! That's All, Time To RETURN.
612$!
613$ RETURN
7d7d2cbc 614$!
6f4f7f35 615$! Rebuild The "[.CRYPTO._xxx]BUILDINF.H" file.
7d7d2cbc 616$!
8c197cc5 617$ BUILDINF:
7d7d2cbc 618$!
6f4f7f35 619$! Tell The User We Are Creating The [.CRYPTO._xxx]BUILDINF.H File.
7d7d2cbc 620$!
01d2e27a 621$ WRITE SYS$OUTPUT "Creating [.CRYPTO.''ARCHD']BUILDINF.H Include File."
7d7d2cbc 622$!
6f4f7f35 623$! Create The [.CRYPTO._xxx]BUILDINF.H File.
7d7d2cbc 624$!
01d2e27a 625$ BIH_NAME = "SYS$DISK:[.CRYPTO.''ARCHD']BUILDINF.H"
006c7c6b
RL
626$ CREATE /FDL=SYS$INPUT: 'BIH_NAME'
627RECORD
628 FORMAT stream_lf
629$!
630$ OPEN /APPEND H_FILE 'bih_name'
7d7d2cbc
UM
631$!
632$! Get The Current Date & Time.
633$!
634$ TIME = F$TIME()
635$!
6f4f7f35 636$! Write The [.CRYPTO._xxx]BUILDINF.H File.
7d7d2cbc 637$!
01d2e27a
RL
638$ CFLAGS = ""
639$ if (POINTER_SIZE .nes. "")
640$ then
641$ CFLAGS = CFLAGS+ "/POINTER_SIZE=''POINTER_SIZE'"
642$ endif
643$ if (ZLIB .nes. "")
644$ then
645$ if (CFLAGS .nes. "") then CFLAGS = CFLAGS+ " "
646$ CFLAGS = CFLAGS+ "/DEFINE=ZLIB"
647$ endif
648$!
e8e878be 649$ WRITE H_FILE "#define CFLAGS cflags"
4fb433d2
RL
650$ WRITE H_FILE "static const char cflags[] = ""compiler: ''CFLAGS'"";"
651$ WRITE H_FILE "#define PLATFORM ""platform: VMS ''ARCHD' ''VMS_VERSION'"""
652$ WRITE H_FILE "#define DATE ""built on: ''TIME'"" "
7d7d2cbc 653$!
6f4f7f35 654$! Close The [.CRYPTO._xxx]BUILDINF.H File.
7d7d2cbc
UM
655$!
656$ CLOSE H_FILE
657$!
6f4f7f35 658$! Purge The [.CRYPTO._xxx]BUILDINF.H File.
006c7c6b 659$!
01d2e27a 660$ PURGE SYS$DISK:[.CRYPTO.'ARCHD']BUILDINF.H
006c7c6b 661$!
97027f7f
RL
662$! Delete [.CRYPTO]BUILDINF.H File, as there might be some residue from Unix.
663$!
664$ IF F$SEARCH("[.CRYPTO]BUILDINF.H") .NES. "" THEN -
665 DELETE SYS$DISK:[.CRYPTO]BUILDINF.H;*
666$!
7d7d2cbc
UM
667$! That's All, Time To RETURN.
668$!
669$ RETURN
670$!
671$! Copy a lot of files around.
672$!
673$ SOFTLINKS:
674$!
01d2e27a
RL
675$!!!! Tell The User We Are Partly Rebuilding The [.APPS] Directory.
676$!!!!
677$!!! WRITE SYS$OUTPUT "Rebuilding The '[.APPS]MD4.C' File."
678$!!!!
679$!!! DELETE SYS$DISK:[.APPS]MD4.C;*
680$!!!!
681$!!!! Copy MD4.C from [.CRYPTO.MD4] into [.APPS]
682$!!!!
683$!!! COPY SYS$DISK:[.CRYPTO.MD4]MD4.C SYS$DISK:[.APPS]
684$!
685$! Ensure that the [.include.openssl] directory contains a full set of
686$! real header files. The distribution kit may have left real or fake
687$! symlinks there. Rather than think about what's there, simply delete
688$! the destination files (fake or real symlinks) before copying the real
689$! header files in. (Copying a real header file onto a real symlink
690$! merely duplicates the real header file at its source.)
691$!
692$! Tell The User We Are Rebuilding The [.include.openssl] Directory.
693$!
694$ WRITE SYS$OUTPUT "Rebuilding The '[.include.openssl]' Directory."
695$!
696$! First, make sure the directory exists. If it did exist, delete all
697$! the existing header files (or fake or real symlinks).
698$!
699$ if f$parse( "sys$disk:[.include.openssl]") .eqs. ""
700$ then
701$ create /directory sys$disk:[.include.openssl]
702$ else
703$ delete sys$disk:[.include.openssl]*.h;*
704$ endif
7d7d2cbc
UM
705$!
706$! Copy All The ".H" Files From The Main Directory.
707$!
41d2a336 708$ EXHEADER := e_os2.h
01d2e27a 709$ copy 'exheader' sys$disk:[.include.openssl]
7d7d2cbc
UM
710$!
711$! Copy All The ".H" Files From The [.CRYPTO] Directory Tree.
712$!
01d2e27a
RL
713$ SDIRS := , -
714 'ARCHD', -
715 OBJECTS, -
7a3809fd
RL
716 MD4, MD5, SHA, MDC2, HMAC, RIPEMD, WHRLPOOL, -
717 DES, AES, RC2, RC4, IDEA, BF, CAST, CAMELLIA, SEED, MODES, -
01d2e27a
RL
718 BN, EC, RSA, DSA, ECDSA, DH, ECDH, DSO, ENGINE, -
719 BUFFER, BIO, STACK, LHASH, RAND, ERR, -
720 EVP, ASN1, PEM, X509, X509V3, CONF, TXT_DB, PKCS7, PKCS12, -
721 COMP, OCSP, UI, KRB5, -
8c6a514e 722 CMS, PQUEUE, TS, JPAKE, SRP, STORE, CMAC
01d2e27a
RL
723$!
724$ EXHEADER_ := crypto.h, opensslv.h, ebcdic.h, symhacks.h, ossl_typ.h
725$ EXHEADER_'ARCHD' := opensslconf.h
726$ EXHEADER_OBJECTS := objects.h, obj_mac.h
7d7d2cbc 727$ EXHEADER_MD2 := md2.h
eec79f9b 728$ EXHEADER_MD4 := md4.h
7d7d2cbc
UM
729$ EXHEADER_MD5 := md5.h
730$ EXHEADER_SHA := sha.h
731$ EXHEADER_MDC2 := mdc2.h
732$ EXHEADER_HMAC := hmac.h
733$ EXHEADER_RIPEMD := ripemd.h
adab8005 734$ EXHEADER_WHRLPOOL := whrlpool.h
01d2e27a 735$ EXHEADER_DES := des.h, des_old.h
26397d2e 736$ EXHEADER_AES := aes.h
7d7d2cbc
UM
737$ EXHEADER_RC2 := rc2.h
738$ EXHEADER_RC4 := rc4.h
739$ EXHEADER_RC5 := rc5.h
740$ EXHEADER_IDEA := idea.h
741$ EXHEADER_BF := blowfish.h
742$ EXHEADER_CAST := cast.h
2d093724 743$ EXHEADER_CAMELLIA := camellia.h
96afc1cf 744$ EXHEADER_SEED := seed.h
792bbc23 745$ EXHEADER_MODES := modes.h
7d7d2cbc 746$ EXHEADER_BN := bn.h
9bd35f63 747$ EXHEADER_EC := ec.h
7d7d2cbc
UM
748$ EXHEADER_RSA := rsa.h
749$ EXHEADER_DSA := dsa.h
1f4eada3 750$ EXHEADER_ECDSA := ecdsa.h
7d7d2cbc 751$ EXHEADER_DH := dh.h
4705bd9b 752$ EXHEADER_ECDH := ecdh.h
eec79f9b 753$ EXHEADER_DSO := dso.h
5270e702 754$ EXHEADER_ENGINE := engine.h
7d7d2cbc
UM
755$ EXHEADER_BUFFER := buffer.h
756$ EXHEADER_BIO := bio.h
01d2e27a 757$ EXHEADER_STACK := stack.h, safestack.h
7d7d2cbc
UM
758$ EXHEADER_LHASH := lhash.h
759$ EXHEADER_RAND := rand.h
760$ EXHEADER_ERR := err.h
7d7d2cbc 761$ EXHEADER_EVP := evp.h
4692b334 762$ EXHEADER_ASN1 := asn1.h, asn1_mac.h, asn1t.h
01d2e27a
RL
763$ EXHEADER_PEM := pem.h, pem2.h
764$ EXHEADER_X509 := x509.h, x509_vfy.h
7d7d2cbc 765$ EXHEADER_X509V3 := x509v3.h
01d2e27a 766$ EXHEADER_CONF := conf.h, conf_api.h
7d7d2cbc
UM
767$ EXHEADER_TXT_DB := txt_db.h
768$ EXHEADER_PKCS7 := pkcs7.h
769$ EXHEADER_PKCS12 := pkcs12.h
770$ EXHEADER_COMP := comp.h
6525ced5 771$ EXHEADER_OCSP := ocsp.h
01d2e27a 772$ EXHEADER_UI := ui.h, ui_compat.h
114697be 773$ EXHEADER_KRB5 := krb5_asn.h
fc003bce 774$ EXHEADER_CMS := cms.h
6e6ada18 775$ EXHEADER_PQUEUE := pqueue.h
19017d40 776$ EXHEADER_TS := ts.h
26397d2e 777$ EXHEADER_JPAKE := jpake.h
e59fb007
RL
778$ EXHEADER_SRP := srp.h
779$!!! EXHEADER_STORE := store.h, str_compat.h
780$ EXHEADER_STORE := store.h
8c6a514e 781$ EXHEADER_CMAC := cmac.h
01d2e27a
RL
782$!
783$ i = 0
784$ loop_sdirs:
785$ sdir = f$edit( f$element( i, ",", sdirs), "trim")
786$ i = i + 1
787$ if (sdir .eqs. ",") then goto loop_sdirs_end
788$ hdr_list = exheader_'sdir'
789$ if (sdir .nes. "") then sdir = "."+ sdir
790$ copy [.crypto'sdir']'hdr_list' sys$disk:[.include.openssl]
791$ goto loop_sdirs
792$ loop_sdirs_end:
7d7d2cbc 793$!
7d7d2cbc
UM
794$! Copy All The ".H" Files From The [.SSL] Directory.
795$!
4692b334 796$! (keep these in the same order as ssl/Makefile)
285d9189 797$ EXHEADER := ssl.h, ssl2.h, ssl3.h, ssl23.h, tls1.h, dtls1.h, kssl.h, srtp.h
01d2e27a 798$ copy sys$disk:[.ssl]'exheader' sys$disk:[.include.openssl]
7d7d2cbc 799$!
01d2e27a 800$! Purge the [.include.openssl] header files.
7d7d2cbc 801$!
01d2e27a 802$ purge sys$disk:[.include.openssl]*.h
7d7d2cbc
UM
803$!
804$! That's All, Time To RETURN.
805$!
806$ RETURN
807$!
01d2e27a 808$! Build The "[.xxx.EXE.CRYPTO]SSL_LIBCRYPTO''LIB32'.OLB" Library.
7d7d2cbc
UM
809$!
810$ CRYPTO:
811$!
812$! Tell The User What We Are Doing.
813$!
814$ WRITE SYS$OUTPUT ""
01d2e27a
RL
815$ WRITE SYS$OUTPUT -
816 "Building The [.",ARCHD,".EXE.CRYPTO]SSL_LIBCRYPTO''LIB32'.OLB Library."
7d7d2cbc
UM
817$!
818$! Go To The [.CRYPTO] Directory.
819$!
820$ SET DEFAULT SYS$DISK:[.CRYPTO]
821$!
822$! Build The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library.
823$!
01d2e27a
RL
824$ @CRYPTO-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" -
825 "''ISSEVEN'" "''BUILDPART'" "''POINTER_SIZE'" "''ZLIB'"
7be760be
RL
826$!
827$! Build The [.xxx.EXE.CRYPTO]*.EXE Test Applications.
828$!
7a3809fd
RL
829$!!! DISABLED, as these test programs lack any support
830$!!!$ @CRYPTO-LIB APPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" -
831$!!! "''ISSEVEN'" "''BUILDPART'" "''POINTER_SIZE'" "''ZLIB'"
7d7d2cbc
UM
832$!
833$! Go Back To The Main Directory.
834$!
835$ SET DEFAULT [-]
836$!
837$! Time To RETURN.
838$!
839$ RETURN
840$!
01d2e27a 841$! Build The "[.xxx.EXE.SSL]SSL_LIBSSL''LIB32'.OLB" Library.
7d7d2cbc
UM
842$!
843$ SSL:
844$!
845$! Tell The User What We Are Doing.
846$!
847$ WRITE SYS$OUTPUT ""
01d2e27a
RL
848$ WRITE SYS$OUTPUT -
849 "Building The [.",ARCHD,".EXE.SSL]SSL_LIBSSL''LIB32'.OLB Library."
7d7d2cbc
UM
850$!
851$! Go To The [.SSL] Directory.
852$!
853$ SET DEFAULT SYS$DISK:[.SSL]
854$!
855$! Build The [.xxx.EXE.SSL]LIBSSL.OLB Library.
856$!
01d2e27a
RL
857$ @SSL-LIB LIBRARY 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" -
858 "''ISSEVEN'" "''POINTER_SIZE'" "''ZLIB'"
7d7d2cbc
UM
859$!
860$! Go Back To The Main Directory.
861$!
862$ SET DEFAULT [-]
863$!
864$! Time To Return.
865$!
866$ RETURN
867$!
868$! Build The "[.xxx.EXE.SSL]SSL_TASK.EXE" Program.
869$!
870$ SSL_TASK:
871$!
872$! Tell The User What We Are Doing.
873$!
874$ WRITE SYS$OUTPUT ""
01d2e27a
RL
875$ WRITE SYS$OUTPUT -
876 "Building DECNet Based SSL Engine, [.",ARCHD,".EXE.SSL]SSL_TASK.EXE"
7d7d2cbc
UM
877$!
878$! Go To The [.SSL] Directory.
879$!
880$ SET DEFAULT SYS$DISK:[.SSL]
881$!
882$! Build The [.xxx.EXE.SSL]SSL_TASK.EXE
883$!
01d2e27a
RL
884$ @SSL-LIB SSL_TASK 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" -
885 "''ISSEVEN'" "''POINTER_SIZE'" "''ZLIB'"
7d7d2cbc
UM
886$!
887$! Go Back To The Main Directory.
888$!
889$ SET DEFAULT [-]
890$!
891$! That's All, Time To RETURN.
892$!
893$ RETURN
894$!
895$! Build The OpenSSL Test Programs.
896$!
897$ TEST:
898$!
899$! Tell The User What We Are Doing.
900$!
901$ WRITE SYS$OUTPUT ""
01d2e27a 902$ WRITE SYS$OUTPUT "Building The OpenSSL [.",ARCHD,".EXE.TEST] Test Utilities."
7d7d2cbc
UM
903$!
904$! Go To The [.TEST] Directory.
905$!
906$ SET DEFAULT SYS$DISK:[.TEST]
907$!
908$! Build The Test Programs.
909$!
01d2e27a
RL
910$ @MAKETESTS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" -
911 "''POINTER_SIZE'" "''ZLIB'"
7d7d2cbc
UM
912$!
913$! Go Back To The Main Directory.
914$!
915$ SET DEFAULT [-]
916$!
917$! That's All, Time To RETURN.
918$!
919$ RETURN
920$!
921$! Build The OpenSSL Application Programs.
922$!
923$ APPS:
924$!
925$! Tell The User What We Are Doing.
926$!
927$ WRITE SYS$OUTPUT ""
01d2e27a 928$ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCHD,".EXE.APPS] Applications."
7d7d2cbc
UM
929$!
930$! Go To The [.APPS] Directory.
931$!
932$ SET DEFAULT SYS$DISK:[.APPS]
933$!
934$! Build The Application Programs.
935$!
01d2e27a
RL
936$ @MAKEAPPS 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" "''ISSEVEN'" -
937 "" "''POINTER_SIZE'" "''ZLIB'"
7d7d2cbc
UM
938$!
939$! Go Back To The Main Directory.
940$!
941$ SET DEFAULT [-]
942$!
943$! That's All, Time To RETURN.
944$!
945$ RETURN
946$!
ad22b914
RL
947$! Build The OpenSSL Application Programs.
948$!
949$ ENGINES:
950$!
951$! Tell The User What We Are Doing.
952$!
953$ WRITE SYS$OUTPUT ""
01d2e27a 954$ WRITE SYS$OUTPUT "Building OpenSSL [.",ARCHD,".EXE.ENGINES] Engines."
ad22b914
RL
955$!
956$! Go To The [.ENGINES] Directory.
957$!
958$ SET DEFAULT SYS$DISK:[.ENGINES]
959$!
960$! Build The Application Programs.
961$!
01d2e27a
RL
962$ @MAKEENGINES ENGINES 'DEBUGGER' "''COMPILER'" "''TCPIP_TYPE'" -
963 "''ISSEVEN'" "''BUILDPART'" "''POINTER_SIZE'" "''ZLIB'"
ad22b914
RL
964$!
965$! Go Back To The Main Directory.
966$!
967$ SET DEFAULT [-]
968$!
969$! That's All, Time To RETURN.
970$!
971$ RETURN
972$!
7d7d2cbc
UM
973$! Check The User's Options.
974$!
975$ CHECK_OPTIONS:
976$!
2db90e3a
RL
977$! Check if there's a "part", and separate it out
978$!
979$ BUILDPART = F$ELEMENT(1,"/",P1)
980$ IF BUILDPART .EQS. "/"
981$ THEN
982$ BUILDPART = ""
983$ ELSE
984$ P1 = F$EXTRACT(0,F$LENGTH(P1) - F$LENGTH(BUILDPART) - 1, P1)
985$ ENDIF
986$!
7d7d2cbc
UM
987$! Check To See If P1 Is Blank.
988$!
989$ IF (P1.EQS."ALL")
990$ THEN
991$!
992$! P1 Is ALL, So Build Everything.
993$!
2e904727 994$ BUILDCOMMAND = "ALL"
7d7d2cbc
UM
995$!
996$! Else...
997$!
998$ ELSE
999$!
6f4f7f35 1000$! Else, Check To See If P1 Has A Valid Argument.
7d7d2cbc 1001$!
e33f347a
RL
1002$ IF (P1.EQS."CONFIG").OR.(P1.EQS."BUILDINF").OR.(P1.EQS."SOFTLINKS") -
1003 .OR.(P1.EQS."BUILDALL") -
b6d0defb 1004 .OR.(P1.EQS."CRYPTO").OR.(P1.EQS."SSL") -
b529bba4
RL
1005 .OR.(P1.EQS."SSL_TASK").OR.(P1.EQS."TEST").OR.(P1.EQS."APPS") -
1006 .OR.(P1.EQS."ENGINES")
7d7d2cbc
UM
1007$ THEN
1008$!
6f4f7f35 1009$! A Valid Argument.
7d7d2cbc 1010$!
2e904727 1011$ BUILDCOMMAND = P1
7d7d2cbc
UM
1012$!
1013$! Else...
1014$!
1015$ ELSE
1016$!
1017$! Tell The User We Don't Know What They Want.
1018$!
1019$ WRITE SYS$OUTPUT ""
90d02be7 1020$ WRITE SYS$OUTPUT "USAGE: @MAKEVMS.COM [Target] [Pointer size] [Debug option] <Compiler>"
b529bba4 1021$ WRITE SYS$OUTPUT ""
90d02be7 1022$ WRITE SYS$OUTPUT "Example: @MAKEVMS.COM ALL """" NODEBUG "
b529bba4
RL
1023$ WRITE SYS$OUTPUT ""
1024$ WRITE SYS$OUTPUT "The Target ",P1," Is Invalid. The Valid Target Options Are:"
7d7d2cbc
UM
1025$ WRITE SYS$OUTPUT ""
1026$ WRITE SYS$OUTPUT " ALL : Just Build Everything."
6f4f7f35
RL
1027$ WRITE SYS$OUTPUT " CONFIG : Just build the [.CRYPTO._xxx]OPENSSLCONF.H file."
1028$ WRITE SYS$OUTPUT " BUILDINF : Just build the [.CRYPTO._xxx]BUILDINF.H file."
7d7d2cbc 1029$ WRITE SYS$OUTPUT " SOFTLINKS: Just Fix The Unix soft links."
2e904727 1030$ WRITE SYS$OUTPUT " BUILDALL : Same as ALL, except CONFIG, BUILDINF and SOFTILNKS aren't done."
7d7d2cbc 1031$ WRITE SYS$OUTPUT " CRYPTO : To Build Just The [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
2db90e3a
RL
1032$ WRITE SYS$OUTPUT " CRYPTO/x : To Build Just The x Part Of The"
1033$ WRITE SYS$OUTPUT " [.xxx.EXE.CRYPTO]LIBCRYPTO.OLB Library."
7d7d2cbc
UM
1034$ WRITE SYS$OUTPUT " SSL : To Build Just The [.xxx.EXE.SSL]LIBSSL.OLB Library."
1035$ WRITE SYS$OUTPUT " SSL_TASK : To Build Just The [.xxx.EXE.SSL]SSL_TASK.EXE Program."
1036$ WRITE SYS$OUTPUT " TEST : To Build Just The OpenSSL Test Programs."
1037$ WRITE SYS$OUTPUT " APPS : To Build Just The OpenSSL Application Programs."
b529bba4 1038$ WRITE SYS$OUTPUT " ENGINES : To Build Just The ENGINES"
7d7d2cbc
UM
1039$ WRITE SYS$OUTPUT ""
1040$ WRITE SYS$OUTPUT " Where 'xxx' Stands For:"
1041$ WRITE SYS$OUTPUT ""
01d2e27a
RL
1042$ WRITE SYS$OUTPUT " ALPHA[64]: Alpha Architecture."
1043$ WRITE SYS$OUTPUT " IA64[64] : IA64 Architecture."
006c7c6b 1044$ WRITE SYS$OUTPUT " VAX : VAX Architecture."
7d7d2cbc
UM
1045$ WRITE SYS$OUTPUT ""
1046$!
1047$! Time To EXIT.
1048$!
006c7c6b 1049$ GOTO TIDY
7d7d2cbc
UM
1050$!
1051$! End The Valid Argument Check.
1052$!
1053$ ENDIF
1054$!
1055$! End The P1 Check.
1056$!
1057$ ENDIF
1058$!
01d2e27a 1059$! Check P2 (POINTER_SIZE).
90d02be7 1060$!
01d2e27a 1061$ IF (P2 .NES. "") .AND. (ARCH .NES. "VAX")
90d02be7 1062$ THEN
90d02be7 1063$!
01d2e27a 1064$ IF (P2 .EQS. "32")
90d02be7
RL
1065$ THEN
1066$ POINTER_SIZE = "32"
90d02be7 1067$ ELSE
d135906d
RL
1068$ POINTER_SIZE = F$EDIT( P2, "COLLAPSE, UPCASE")
1069$ IF ((POINTER_SIZE .EQS. "64") .OR. -
1070 (POINTER_SIZE .EQS. "64=") .OR. -
1071 (POINTER_SIZE .EQS. "64=ARGV"))
90d02be7 1072$ THEN
01d2e27a 1073$ ARCHD = ARCH+ "_64"
90d02be7 1074$ LIB32 = ""
90d02be7
RL
1075$ ELSE
1076$!
01d2e27a 1077$! Tell The User Entered An Invalid Option.
90d02be7
RL
1078$!
1079$ WRITE SYS$OUTPUT ""
01d2e27a
RL
1080$ WRITE SYS$OUTPUT "The Option ", P2, -
1081 " Is Invalid. The Valid Options Are:"
90d02be7 1082$ WRITE SYS$OUTPUT ""
d135906d
RL
1083$ WRITE SYS$OUTPUT -
1084 " """" : Compile with default (short) pointers."
1085$ WRITE SYS$OUTPUT -
1086 " 32 : Compile with 32-bit (short) pointers."
1087$ WRITE SYS$OUTPUT -
1088 " 64 : Compile with 64-bit (long) pointers (auto ARGV)."
1089$ WRITE SYS$OUTPUT -
1090 " 64= : Compile with 64-bit (long) pointers (no ARGV)."
1091$ WRITE SYS$OUTPUT -
1092 " 64=ARGV : Compile with 64-bit (long) pointers (ARGV)."
90d02be7 1093$ WRITE SYS$OUTPUT ""
01d2e27a 1094$!
90d02be7
RL
1095$! Time To EXIT.
1096$!
1097$ GOTO TIDY
1098$!
90d02be7 1099$ ENDIF
01d2e27a 1100$!
90d02be7
RL
1101$ ENDIF
1102$!
01d2e27a 1103$! End The P2 (POINTER_SIZE) Check.
90d02be7
RL
1104$!
1105$ ENDIF
1106$!
7d7d2cbc
UM
1107$! Check To See If P3 Is Blank.
1108$!
1109$ IF (P3.EQS."NODEBUG")
1110$ THEN
1111$!
1112$! P3 Is NODEBUG, So Compile Without Debugger Information.
1113$!
1114$ DEBUGGER = "NODEBUG"
1115$!
1116$! Else...
1117$!
1118$ ELSE
1119$!
1120$! Check To See If We Are To Compile With Debugger Information.
1121$!
1122$ IF (P3.EQS."DEBUG")
1123$ THEN
1124$!
1125$! Compile With Debugger Information.
1126$!
1127$ DEBUGGER = "DEBUG"
1128$!
1129$! Else...
1130$!
1131$ ELSE
1132$!
01d2e27a 1133$! Tell The User Entered An Invalid Option.
7d7d2cbc
UM
1134$!
1135$ WRITE SYS$OUTPUT ""
1136$ WRITE SYS$OUTPUT "The Option ",P3," Is Invalid. The Valid Options Are:"
1137$ WRITE SYS$OUTPUT ""
1138$ WRITE SYS$OUTPUT " DEBUG : Compile With The Debugger Information."
1139$ WRITE SYS$OUTPUT " NODEBUG : Compile Without The Debugger Information."
1140$ WRITE SYS$OUTPUT ""
1141$!
1142$! Time To EXIT.
1143$!
006c7c6b 1144$ GOTO TIDY
7d7d2cbc 1145$!
6f4f7f35 1146$! End The Valid Argument Check.
7d7d2cbc
UM
1147$!
1148$ ENDIF
1149$!
1150$! End The P3 Check.
1151$!
1152$ ENDIF
1153$!
1154$! Check To See If P4 Is Blank.
1155$!
1156$ IF (P4.EQS."")
1157$ THEN
1158$!
1159$! O.K., The User Didn't Specify A Compiler, Let's Try To
1160$! Find Out Which One To Use.
1161$!
1162$! Check To See If We Have GNU C.
1163$!
1164$ IF (F$TRNLNM("GNU_CC").NES."")
1165$ THEN
1166$!
1167$! Looks Like GNUC, Set To Use GNUC.
1168$!
1169$ COMPILER = "GNUC"
1170$!
1171$! Tell The User We Are Using GNUC.
1172$!
1173$ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
1174$!
1175$! End The GNU C Compiler Check.
1176$!
1177$ ENDIF
1178$!
1179$! Check To See If We Have VAXC Or DECC.
1180$!
1181$ IF (F$GETSYI("CPU").GE.128).OR.(F$TRNLNM("DECC$CC_DEFAULT").EQS."/DECC")
1182$ THEN
1183$!
1184$! Looks Like DECC, Set To Use DECC.
1185$!
1186$ COMPILER = "DECC"
1187$!
1188$! Tell The User We Are Using DECC.
1189$!
1190$ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
1191$!
1192$! Else...
1193$!
1194$ ELSE
1195$!
1196$! Looks Like VAXC, Set To Use VAXC.
1197$!
1198$ COMPILER = "VAXC"
1199$!
1200$! Tell The User We Are Using VAX C.
1201$!
1202$ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
1203$!
1204$! End The DECC & VAXC Compiler Check.
1205$!
1206$ ENDIF
1207$!
1208$! Else...
1209$!
1210$ ELSE
1211$!
01d2e27a 1212$! Check To See If The User Entered A Valid Parameter.
7d7d2cbc 1213$!
58dc480f 1214$ IF (P4.EQS."VAXC").OR.(P4.EQS."DECC").OR.(P4.EQS."GNUC")!.OR.(P4.EQS."LINK")
7d7d2cbc
UM
1215$ THEN
1216$!
1217$! Check To See If The User Wanted To Just LINK.
1218$!
1219$ IF (P4.EQS."LINK")
1220$ THEN
1221$!
1222$! Looks Like LINK-only
1223$!
1224$ COMPILER = "LINK"
1225$!
1226$! Tell The User We Are Only Linking.
1227$!
1228$ WRITE SYS$OUTPUT "LINK Only. This actually NOT YET SUPPORTED!"
1229$!
1230$! End LINK Check.
1231$!
1232$ ENDIF
1233$!
1234$! Check To See If The User Wanted DECC.
1235$!
1236$ IF (P4.EQS."DECC")
1237$ THEN
1238$!
1239$! Looks Like DECC, Set To Use DECC.
1240$!
1241$ COMPILER = "DECC"
1242$!
1243$! Tell The User We Are Using DECC.
1244$!
1245$ WRITE SYS$OUTPUT "Using DECC 'C' Compiler."
1246$!
1247$! End DECC Check.
1248$!
1249$ ENDIF
1250$!
1251$! Check To See If We Are To Use VAXC.
1252$!
1253$ IF (P4.EQS."VAXC")
1254$ THEN
1255$!
1256$! Looks Like VAXC, Set To Use VAXC.
1257$!
1258$ COMPILER = "VAXC"
1259$!
1260$! Tell The User We Are Using VAX C.
1261$!
1262$ WRITE SYS$OUTPUT "Using VAXC 'C' Compiler."
1263$!
1264$! End VAXC Check
1265$!
1266$ ENDIF
1267$!
1268$! Check To See If We Are To Use GNU C.
1269$!
1270$ IF (P4.EQS."GNUC")
1271$ THEN
1272$!
1273$! Looks Like GNUC, Set To Use GNUC.
1274$!
1275$ COMPILER = "GNUC"
1276$!
1277$! Tell The User We Are Using GNUC.
1278$!
1279$ WRITE SYS$OUTPUT "Using GNU 'C' Compiler."
1280$!
1281$! End The GNU C Check.
1282$!
1283$ ENDIF
1284$!
6f4f7f35 1285$! Else The User Entered An Invalid Argument.
7d7d2cbc
UM
1286$!
1287$ ELSE
1288$!
1289$! Tell The User We Don't Know What They Want.
1290$!
1291$ WRITE SYS$OUTPUT ""
1292$ WRITE SYS$OUTPUT "The Option ",P4," Is Invalid. The Valid Options Are:"
1293$ WRITE SYS$OUTPUT ""
1294$ WRITE SYS$OUTPUT " VAXC : To Compile With VAX C."
1295$ WRITE SYS$OUTPUT " DECC : To Compile With DEC C."
1296$ WRITE SYS$OUTPUT " GNUC : To Compile With GNU C."
1297$ WRITE SYS$OUTPUT ""
1298$!
1299$! Time To EXIT.
1300$!
006c7c6b 1301$ GOTO TIDY
7d7d2cbc 1302$!
6f4f7f35 1303$! End The Valid Argument Check.
7d7d2cbc
UM
1304$!
1305$ ENDIF
1306$!
1307$! End The P4 Check.
1308$!
1309$ ENDIF
1310$!
01d2e27a
RL
1311$! Time to check the contents of P5, and to make sure we get the correct
1312$! library.
7d7d2cbc 1313$!
b935754c
RL
1314$ IF P5.EQS."SOCKETSHR" .OR. P5.EQS."MULTINET" .OR. P5.EQS."UCX" -
1315 .OR. P5.EQS."TCPIP" .OR. P5.EQS."NONE"
7d7d2cbc
UM
1316$ THEN
1317$!
1318$! Check to see if SOCKETSHR was chosen
1319$!
1320$ IF P5.EQS."SOCKETSHR"
1321$ THEN
1322$!
1323$! Set the library to use SOCKETSHR
1324$!
01d2e27a 1325$ TCPIP_LIB = "SYS$DISK:[-.VMS]SOCKETSHR_SHR.OPT /OPTIONS"
7d7d2cbc
UM
1326$!
1327$! Tell the user
1328$!
1329$ WRITE SYS$OUTPUT "Using SOCKETSHR for TCP/IP"
1330$!
1331$! Done with SOCKETSHR
1332$!
1333$ ENDIF
1334$!
1335$! Check to see if MULTINET was chosen
1336$!
1337$ IF P5.EQS."MULTINET"
1338$ THEN
1339$!
1340$! Set the library to use UCX emulation.
1341$!
1342$ P5 = "UCX"
1343$!
1344$! Tell the user
1345$!
1346$ WRITE SYS$OUTPUT "Using MultiNet via UCX emulation for TCP/IP"
1347$!
1348$! Done with MULTINET
1349$!
1350$ ENDIF
1351$!
1352$! Check to see if UCX was chosen
1353$!
1354$ IF P5.EQS."UCX"
1355$ THEN
1356$!
1357$! Set the library to use UCX.
1358$!
01d2e27a 1359$ TCPIP_LIB = "SYS$DISK:[-.VMS]UCX_SHR_DECC.OPT /OPTIONS"
7d7d2cbc
UM
1360$!
1361$! Tell the user
1362$!
1363$ WRITE SYS$OUTPUT "Using UCX or an emulation thereof for TCP/IP"
1364$!
1365$! Done with UCX
1366$!
1367$ ENDIF
1368$!
b935754c
RL
1369$! Check to see if TCPIP was chosen
1370$!
1371$ IF P5.EQS."TCPIP"
1372$ THEN
1373$!
1374$! Set the library to use TCPIP (post UCX).
1375$!
01d2e27a 1376$ TCPIP_LIB = "SYS$DISK:[-.VMS]TCPIP_SHR_DECC.OPT /OPTIONS"
b935754c
RL
1377$!
1378$! Tell the user
1379$!
1380$ WRITE SYS$OUTPUT "Using TCPIP (post UCX) for TCP/IP"
1381$!
1382$! Done with TCPIP
1383$!
1384$ ENDIF
1385$!
1386$! Check to see if NONE was chosen
1387$!
1388$ IF P5.EQS."NONE"
1389$ THEN
1390$!
1391$! Do not use a TCPIP library.
1392$!
1393$ TCPIP_LIB = ""
1394$!
1395$! Tell the user
1396$!
1397$ WRITE SYS$OUTPUT "A specific TCPIP library will not be used."
1398$!
1399$! Done with NONE.
1400$!
1401$ ENDIF
1402$!
7d7d2cbc
UM
1403$! Set the TCPIP_TYPE symbol
1404$!
1405$ TCPIP_TYPE = P5
1406$!
1407$! Print info
1408$!
1409$ WRITE SYS$OUTPUT "TCP/IP library spec: ", TCPIP_LIB
1410$!
6f4f7f35 1411$! Else The User Entered An Invalid Argument.
7d7d2cbc
UM
1412$!
1413$ ELSE
1414$ IF P5 .NES. ""
1415$ THEN
1416$!
1417$! Tell The User We Don't Know What They Want.
1418$!
1419$ WRITE SYS$OUTPUT ""
1420$ WRITE SYS$OUTPUT "The Option ",P5," Is Invalid. The Valid Options Are:"
1421$ WRITE SYS$OUTPUT ""
1422$ WRITE SYS$OUTPUT " SOCKETSHR : To link with SOCKETSHR TCP/IP library."
1423$ WRITE SYS$OUTPUT " UCX : To link with UCX TCP/IP library."
b935754c
RL
1424$ WRITE SYS$OUTPUT " TCPIP : To link with TCPIP TCP/IP (post UCX) library."
1425$ WRITE SYS$OUTPUT " NONE : To not link with a specific TCP/IP library."
7d7d2cbc
UM
1426$ WRITE SYS$OUTPUT ""
1427$!
1428$! Time To EXIT.
1429$!
006c7c6b 1430$ GOTO TIDY
7d7d2cbc
UM
1431$ ELSE
1432$!
b935754c
RL
1433$! If TCPIP is not defined, then hardcode it to make
1434$! it clear that no TCPIP is desired.
1435$!
1436$ IF P5 .EQS. ""
1437$ THEN
1438$ TCPIP_LIB = ""
1439$ TCPIP_TYPE = "NONE"
1440$ ELSE
1441$!
7d7d2cbc
UM
1442$! Set the TCPIP_TYPE symbol
1443$!
b935754c
RL
1444$ TCPIP_TYPE = P5
1445$ ENDIF
7d7d2cbc
UM
1446$ ENDIF
1447$!
1448$! Done with TCP/IP libraries
1449$!
1450$ ENDIF
1451$!
1452$! Special Threads For OpenVMS v7.1 Or Later
1453$!
1454$! Written By: Richard Levitte
1455$! richard@levitte.org
1456$!
1457$!
1458$! Check To See If We Have A Option For P6.
1459$!
1460$ IF (P6.EQS."")
1461$ THEN
1462$!
1463$! Get The Version Of VMS We Are Using.
1464$!
1465$ ISSEVEN :=
6f4f7f35 1466$ TMP = F$ELEMENT(0,"-",F$EXTRACT(1,4,VMS_VERSION))
7d7d2cbc
UM
1467$ TMP = F$INTEGER(F$ELEMENT(0,".",TMP)+F$ELEMENT(1,".",TMP))
1468$!
1469$! Check To See If The VMS Version Is v7.1 Or Later.
1470$!
1471$ IF (TMP.GE.71)
1472$ THEN
1473$!
1474$! We Have OpenVMS v7.1 Or Later, So Use The Special Threads.
1475$!
1476$ ISSEVEN := ,PTHREAD_USE_D4
1477$!
1478$! End The VMS Version Check.
1479$!
1480$ ENDIF
1481$!
1482$! End The P6 Check.
1483$!
1484$ ENDIF
1485$!
01d2e27a
RL
1486$!
1487$! Check To See If We Have A ZLIB Option.
1488$!
1489$ ZLIB = P7
1490$ IF (ZLIB .NES. "")
1491$ THEN
1492$!
1493$! Check for expected ZLIB files.
1494$!
1495$ err = 0
1496$ file1 = f$parse( "zlib.h", ZLIB, , , "SYNTAX_ONLY")
1497$ if (f$search( file1) .eqs. "")
1498$ then
1499$ WRITE SYS$OUTPUT ""
1500$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
1501$ WRITE SYS$OUTPUT " Can't find header: ''file1'"
1502$ err = 1
1503$ endif
1504$!
1505$ file2 = f$parse( ZLIB, "libz.olb", , , "SYNTAX_ONLY")
1506$ if (f$search( file2) .eqs. "")
1507$ then
1508$ if (err .eq. 0)
1509$ then
1510$ WRITE SYS$OUTPUT ""
1511$ WRITE SYS$OUTPUT "The Option ", ZLIB, " Is Invalid."
1512$ endif
1513$ WRITE SYS$OUTPUT " Can't find library: ''file2'"
1514$ WRITE SYS$OUTPUT ""
1515$ err = err+ 2
1516$ endif
1517$ if (err .eq. 1)
1518$ then
1519$ WRITE SYS$OUTPUT ""
1520$ endif
1521$!
1522$ if (err .ne. 0)
1523$ then
1524$ GOTO TIDY
1525$ endif
1526$!
1527$! Print info
1528$!
1529$ WRITE SYS$OUTPUT "ZLIB library spec: ", file2
1530$!
1531$! End The ZLIB Check.
1532$!
1533$ ENDIF
1534$!
7d7d2cbc
UM
1535$! Time To RETURN...
1536$!
1537$ RETURN
006c7c6b
RL
1538$!
1539$ TIDY:
01d2e27a
RL
1540$!
1541$! Close any open files.
1542$!
1543$ if (f$trnlnm( "h_file", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then -
1544 close h_file
1545$!
1546$! Restore the original default device:[directory].
1547$!
006c7c6b 1548$ SET DEFAULT 'DEF_ORIG'
01d2e27a 1549$!
006c7c6b
RL
1550$ EXIT
1551$!