OLD | NEW |
1 $! MKSHARED.COM -- script to created shareable images on VMS | 1 $! MKSHARED.COM -- Create shareable images. |
2 $! | 2 $! |
3 $! No command line parameters. This should be run at the start of the source | 3 $! P1: "64" for 64-bit pointers. |
4 $! tree (the same directory where one finds INSTALL.VMS). | |
5 $! | 4 $! |
6 $! Input:» [.UTIL]LIBEAY.NUM,[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB | 5 $! P2: Zlib object library path (optional). |
7 $!» » [.UTIL]SSLEAY.NUM,[.xxx.EXE.SSL]LIBSSL.OLB | 6 $! |
8 $! Output:» [.xxx.EXE.CRYPTO]LIBCRYPTO.OPT,.MAP,.EXE | 7 $! Input:» [.UTIL]LIBEAY.NUM,[.xxx.EXE.CRYPTO]SSL_LIBCRYPTO[32].OLB |
9 $!» » [.xxx.EXE.SSL]LIBSSL.OPT,.MAP,.EXE | 8 $!» » [.UTIL]SSLEAY.NUM,[.xxx.EXE.SSL]SSL_LIBSSL[32].OLB |
| 9 $!» » [.CRYPTO.xxx]OPENSSLCONF.H |
| 10 $! Output:» [.xxx.EXE.CRYPTO]SSL_LIBCRYPTO_SHR[32].OPT,.MAP,.EXE |
| 11 $!» » [.xxx.EXE.SSL]SSL_LIBSSL_SRH[32].OPT,.MAP,.EXE |
10 $! | 12 $! |
11 $! So far, tests have only been made on VMS for Alpha. VAX will come in time. | 13 $! So far, tests have only been made on VMS for Alpha. VAX will come in time. |
12 $! =========================================================================== | 14 $! =========================================================================== |
13 $ | 15 $! |
| 16 $! Announce/identify. |
| 17 $! |
| 18 $ proc = f$environment( "procedure") |
| 19 $ write sys$output "@@@ "+ - |
| 20 f$parse( proc, , , "name")+ f$parse( proc, , , "type") |
| 21 $! |
| 22 $! Save the original default device:[directory]. |
| 23 $! |
| 24 $ def_orig = f$environment( "default") |
| 25 $ on error then goto tidy |
| 26 $ on control_c then goto tidy |
| 27 $! |
| 28 $! SET DEFAULT to the main kit directory. |
| 29 $! |
| 30 $ proc = f$environment("procedure") |
| 31 $ proc = f$parse( "A.;", proc)- "A.;" |
| 32 $ set default 'proc' |
| 33 $ set default [-] |
| 34 $! |
14 $! ----- Prepare info for processing: version number and file info | 35 $! ----- Prepare info for processing: version number and file info |
15 $ gosub read_version_info | 36 $ gosub read_version_info |
16 $ if libver .eqs. "" | 37 $ if libver .eqs. "" |
17 $ then | 38 $ then |
18 $ write sys$error "ERROR: Couldn't find any library version info..." | 39 $ write sys$error "ERROR: Couldn't find any library version info..." |
19 $ exit | 40 $ go to tidy: |
20 $ endif | 41 $ endif |
21 $ | 42 $ |
22 $ if (f$getsyi("cpu").lt.128) | 43 $ if (f$getsyi("cpu") .lt. 128) |
23 $ then | 44 $ then |
24 $ arch := VAX | 45 $ arch_vax = 1 |
| 46 $ arch = "VAX" |
25 $ else | 47 $ else |
26 $ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") | 48 $ arch_vax = 0 |
27 $ if (arch .eqs. "") then arch = "UNK" | 49 $ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
| 50 $ if (arch .eqs. "") then arch = "UNK" |
28 $ endif | 51 $ endif |
29 $ | 52 $! |
30 $ if arch .nes. "VAX" | 53 $ archd = arch |
| 54 $ lib32 = "32" |
| 55 $ shr = "SHR32" |
| 56 $! |
| 57 $ if (p1 .nes. "") |
31 $ then | 58 $ then |
32 $ arch_vax = 0 | 59 $ if (p1 .eqs. "64") |
33 $ libid = "Crypto" | 60 $ then |
34 $ libnum = "[.UTIL]LIBEAY.NUM" | 61 $ archd = arch+ "_64" |
35 $ libdir = "[.''ARCH'.EXE.CRYPTO]" | 62 $ lib32 = "" |
36 $ libolb = "''libdir'LIBCRYPTO.OLB" | 63 $ shr = "SHR" |
37 $ libopt = "''libdir'LIBCRYPTO.OPT" | 64 $ else |
38 $ libmap = "''libdir'LIBCRYPTO.MAP" | 65 $ if (p1 .nes. "32") |
39 $ libgoal= "''libdir'LIBCRYPTO.EXE" | 66 $ then |
40 $ libref = "" | 67 $ write sys$output "Second argument invalid." |
41 $ gosub create_nonvax_shr | 68 $ write sys$output "It should be "32", "64", or nothing." |
42 $ libid = "SSL" | 69 $ exit |
43 $ libnum = "[.UTIL]SSLEAY.NUM" | 70 $ endif |
44 $ libdir = "[.''ARCH'.EXE.SSL]" | 71 $ endif |
45 $ libolb = "''libdir'LIBSSL.OLB" | 72 $ endif |
46 $ libopt = "''libdir'LIBSSL.OPT" | 73 $! |
47 $ libmap = "''libdir'LIBSSL.MAP" | 74 $! ----- Prepare info for processing: disabled algorithms info |
48 $ libgoal= "''libdir'LIBSSL.EXE" | 75 $ gosub read_disabled_algorithms_info |
49 $ libref = "[.''ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE" | 76 $! |
50 $ gosub create_nonvax_shr | 77 $ ZLIB = p2 |
51 $ else | 78 $ zlib_lib = "" |
52 $ arch_vax = 1 | 79 $ if (ZLIB .nes. "") |
| 80 $ then |
| 81 $ file2 = f$parse( ZLIB, "libz.olb", , , "syntax_only") |
| 82 $ if (f$search( file2) .eqs. "") |
| 83 $ then |
| 84 $ write sys$output "" |
| 85 $ write sys$output "The Option ", ZLIB, " Is Invalid." |
| 86 $ write sys$output " Can't find library: ''file2'" |
| 87 $ write sys$output "" |
| 88 $ goto tidy |
| 89 $ endif |
| 90 $ zlib_lib = ", ''file2' /library" |
| 91 $ endif |
| 92 $! |
| 93 $ if (arch_vax) |
| 94 $ then |
53 $ libtit = "CRYPTO_TRANSFER_VECTOR" | 95 $ libtit = "CRYPTO_TRANSFER_VECTOR" |
54 $ libid = "Crypto" | 96 $ libid = "Crypto" |
55 $ libnum = "[.UTIL]LIBEAY.NUM" | 97 $ libnum = "[.UTIL]LIBEAY.NUM" |
56 $ libdir = "[.''ARCH'.EXE.CRYPTO]" | 98 $ libdir = "[.''ARCHD'.EXE.CRYPTO]" |
57 $ libmar = "''libdir'LIBCRYPTO.MAR" | 99 $ libmar = "''libdir'SSL_LIBCRYPTO_''shr'.MAR" |
58 $ libolb = "''libdir'LIBCRYPTO.OLB" | 100 $ libolb = "''libdir'SSL_LIBCRYPTO''lib32'.OLB" |
59 $ libopt = "''libdir'LIBCRYPTO.OPT" | 101 $ libopt = "''libdir'SSL_LIBCRYPTO_''shr'.OPT" |
60 $ libobj = "''libdir'LIBCRYPTO.OBJ" | 102 $ libobj = "''libdir'SSL_LIBCRYPTO_''shr'.OBJ" |
61 $ libmap = "''libdir'LIBCRYPTO.MAP" | 103 $ libmap = "''libdir'SSL_LIBCRYPTO_''shr'.MAP" |
62 $ libgoal= "''libdir'LIBCRYPTO.EXE" | 104 $ libgoal= "''libdir'SSL_LIBCRYPTO_''shr'.EXE" |
63 $ libref = "" | 105 $ libref = "" |
64 $ libvec = "LIBCRYPTO" | 106 $ libvec = "LIBCRYPTO" |
65 $ gosub create_vax_shr | 107 $ if f$search( libolb) .nes. "" then gosub create_vax_shr |
66 $ libtit = "SSL_TRANSFER_VECTOR" | 108 $ libtit = "SSL_TRANSFER_VECTOR" |
67 $ libid = "SSL" | 109 $ libid = "SSL" |
68 $ libnum = "[.UTIL]SSLEAY.NUM" | 110 $ libnum = "[.UTIL]SSLEAY.NUM" |
69 $ libdir = "[.''ARCH'.EXE.SSL]" | 111 $ libdir = "[.''ARCHD'.EXE.SSL]" |
70 $ libmar = "''libdir'LIBSSL.MAR" | 112 $ libmar = "''libdir'SSL_LIBSSL_''shr'.MAR" |
71 $ libolb = "''libdir'LIBSSL.OLB" | 113 $ libolb = "''libdir'SSL_LIBSSL''lib32'.OLB" |
72 $ libopt = "''libdir'LIBSSL.OPT" | 114 $ libopt = "''libdir'SSL_LIBSSL_''shr'.OPT" |
73 $ libobj = "''libdir'LIBSSL.OBJ" | 115 $ libobj = "''libdir'SSL_LIBSSL_''shr'.OBJ" |
74 $ libmap = "''libdir'LIBSSL.MAP" | 116 $ libmap = "''libdir'SSL_LIBSSL_''shr'.MAP" |
75 $ libgoal= "''libdir'LIBSSL.EXE" | 117 $ libgoal= "''libdir'SSL_LIBSSL_''shr'.EXE" |
76 $ libref = "[.''ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE" | 118 $ libref = "[.''ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO_''shr'.EXE" |
77 $ libvec = "LIBSSL" | 119 $ libvec = "LIBSSL" |
78 $ gosub create_vax_shr | 120 $ if f$search( libolb) .nes. "" then gosub create_vax_shr |
| 121 $ else |
| 122 $ libid = "Crypto" |
| 123 $ libnum = "[.UTIL]LIBEAY.NUM" |
| 124 $ libdir = "[.''ARCHD'.EXE.CRYPTO]" |
| 125 $ libolb = "''libdir'SSL_LIBCRYPTO''lib32'.OLB" |
| 126 $ libopt = "''libdir'SSL_LIBCRYPTO_''shr'.OPT" |
| 127 $ libmap = "''libdir'SSL_LIBCRYPTO_''shr'.MAP" |
| 128 $ libgoal= "''libdir'SSL_LIBCRYPTO_''shr'.EXE" |
| 129 $ libref = "" |
| 130 $ if f$search( libolb) .nes. "" then gosub create_nonvax_shr |
| 131 $ libid = "SSL" |
| 132 $ libnum = "[.UTIL]SSLEAY.NUM" |
| 133 $ libdir = "[.''ARCHD'.EXE.SSL]" |
| 134 $ libolb = "''libdir'SSL_LIBSSL''lib32'.OLB" |
| 135 $ libopt = "''libdir'SSL_LIBSSL_''shr'.OPT" |
| 136 $ libmap = "''libdir'SSL_LIBSSL_''shr'.MAP" |
| 137 $ libgoal= "''libdir'SSL_LIBSSL_''shr'.EXE" |
| 138 $ libref = "[.''ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO_''shr'.EXE" |
| 139 $ if f$search( libolb) .nes. "" then gosub create_nonvax_shr |
79 $ endif | 140 $ endif |
| 141 $! |
| 142 $ tidy: |
| 143 $! |
| 144 $! Close any open files. |
| 145 $! |
| 146 $ if (f$trnlnm( "libnum", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - |
| 147 close libnum |
| 148 $! |
| 149 $ if (f$trnlnm( "mar", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - |
| 150 close mar |
| 151 $! |
| 152 $ if (f$trnlnm( "opt", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - |
| 153 close opt |
| 154 $! |
| 155 $ if (f$trnlnm( "vf", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - |
| 156 close vf |
| 157 $! |
| 158 $! Restore the original default device:[directory]. |
| 159 $! |
| 160 $ set default 'def_orig' |
80 $ exit | 161 $ exit |
81 $ | 162 $ |
82 $! ----- Soubroutines to build the shareable libraries | 163 $! ----- Subroutines to build the shareable libraries |
83 $! For each supported architecture, there's a main shareable library | 164 $! For each supported architecture, there's a main shareable library |
84 $! creator, which is called from the main code above. | 165 $! creator, which is called from the main code above. |
85 $! The creator will define a number of variables to tell the next levels of | 166 $! The creator will define a number of variables to tell the next levels of |
86 $! subroutines what routines to use to write to the option files, call the | 167 $! subroutines what routines to use to write to the option files, call the |
87 $! main processor, read_func_num, and when that is done, it will write version | 168 $! main processor, read_func_num, and when that is done, it will write version |
88 $! data at the end of the .opt file, close it, and link the library. | 169 $! data at the end of the .opt file, close it, and link the library. |
89 $! | 170 $! |
90 $! read_func_num reads through a .num file and calls the writer routine for | 171 $! read_func_num reads through a .num file and calls the writer routine for |
91 $! each line. It's also responsible for checking that order is properly kept | 172 $! each line. It's also responsible for checking that order is properly kept |
92 $! in the .num file, check that each line applies to VMS and the architecture, | 173 $! in the .num file, check that each line applies to VMS and the architecture, |
(...skipping 11 matching lines...) Expand all Loading... |
104 $! libref The name of a shareable library to link in | 185 $! libref The name of a shareable library to link in |
105 $! | 186 $! |
106 $! read_func_num depends on the following variables from the creator: | 187 $! read_func_num depends on the following variables from the creator: |
107 $! libwriter The name of the writer routine to call for each .num file line | 188 $! libwriter The name of the writer routine to call for each .num file line |
108 $! ----- | 189 $! ----- |
109 $ | 190 $ |
110 $! ----- Subroutines for non-VAX | 191 $! ----- Subroutines for non-VAX |
111 $! ----- | 192 $! ----- |
112 $! The creator routine | 193 $! The creator routine |
113 $ create_nonvax_shr: | 194 $ create_nonvax_shr: |
114 $ open/write opt 'libopt' | 195 $ open /write opt 'libopt' |
115 $ write opt "identification=""",libid," ",libverstr,"""" | 196 $ write opt "identification=""",libid," ",libverstr,"""" |
116 $ write opt libolb,"/lib" | 197 $ write opt libolb, " /library" |
117 $ if libref .nes. "" then write opt libref,"/SHARE" | 198 $ if libref .nes. "" then write opt libref,"/SHARE" |
118 $ write opt "SYMBOL_VECTOR=(-" | 199 $ write opt "SYMBOL_VECTOR=(-" |
119 $ libfirstentry := true | 200 $ libfirstentry := true |
120 $ libwrch := opt | 201 $ libwrch := opt |
121 $ libwriter := write_nonvax_transfer_entry | 202 $ libwriter := write_nonvax_transfer_entry |
122 $ textcount = 0 | 203 $ textcount = 0 |
123 $ gosub read_func_num | 204 $ gosub read_func_num |
124 $ write opt ")" | 205 $ write opt ")" |
125 $ write opt "GSMATCH=",libvmatch,",",libver | 206 $ write opt "GSMATCH=",libvmatch,",",libver |
126 $ close opt | 207 $ close opt |
127 $ link/map='libmap'/full/share='libgoal' 'libopt'/option | 208 $ link /map = 'libmap' /full /share = 'libgoal' 'libopt' /options - |
| 209 'zlib_lib' |
128 $ return | 210 $ return |
129 $ | 211 $ |
130 $! The record writer routine | 212 $! The record writer routine |
131 $ write_nonvax_transfer_entry: | 213 $ write_nonvax_transfer_entry: |
132 $ if libentry .eqs. ".dummy" then return | 214 $ if libentry .eqs. ".dummy" then return |
133 $ if info_kind .eqs. "VARIABLE" | 215 $ if info_kind .eqs. "VARIABLE" |
134 $ then | 216 $ then |
135 $ pr:=DATA | 217 $ pr:=DATA |
136 $ else | 218 $ else |
137 $ pr:=PROCEDURE | 219 $ pr:=PROCEDURE |
(...skipping 13 matching lines...) Expand all Loading... |
151 $ write 'libwrch' " ,",libentry,"=",pr," -" | 233 $ write 'libwrch' " ,",libentry,"=",pr," -" |
152 $ endif | 234 $ endif |
153 $ libfirstentry := false | 235 $ libfirstentry := false |
154 $ textcount = textcount + textcount_this | 236 $ textcount = textcount + textcount_this |
155 $ return | 237 $ return |
156 $ | 238 $ |
157 $! ----- Subroutines for VAX | 239 $! ----- Subroutines for VAX |
158 $! ----- | 240 $! ----- |
159 $! The creator routine | 241 $! The creator routine |
160 $ create_vax_shr: | 242 $ create_vax_shr: |
161 $ open/write mar 'libmar' | 243 $ open /write mar 'libmar' |
162 $ type sys$input:/out=mar: | 244 $ type sys$input:/out=mar: |
163 ; | 245 ; |
164 ; Transfer vector for VAX shareable image | 246 ; Transfer vector for VAX shareable image |
165 ; | 247 ; |
166 $ write mar " .TITLE ",libtit | 248 $ write mar " .TITLE ",libtit |
167 $ write mar " .IDENT /",libid,"/" | 249 $ write mar " .IDENT /",libid,"/" |
168 $ type sys$input:/out=mar: | 250 $ type sys$input:/out=mar: |
169 ; | 251 ; |
170 ; Define macro to assist in building transfer vector entries. Each entry | 252 ; Define macro to assist in building transfer vector entries. Each entry |
171 ; should take no more than 8 bytes. | 253 ; should take no more than 8 bytes. |
(...skipping 14 matching lines...) Expand all Loading... |
186 $ gosub read_func_num | 268 $ gosub read_func_num |
187 $ type sys$input:/out=mar: | 269 $ type sys$input:/out=mar: |
188 ; | 270 ; |
189 ; Allocate extra storage at end of vector to allow for expansion. | 271 ; Allocate extra storage at end of vector to allow for expansion. |
190 ; | 272 ; |
191 $ write mar " .BLKB 32768-<.-",libvec,"_xfer> ; 64 pages total." | 273 $ write mar " .BLKB 32768-<.-",libvec,"_xfer> ; 64 pages total." |
192 $! libwriter := write_vax_vtransfer_entry | 274 $! libwriter := write_vax_vtransfer_entry |
193 $! gosub read_func_num | 275 $! gosub read_func_num |
194 $ write mar " .END" | 276 $ write mar " .END" |
195 $ close mar | 277 $ close mar |
196 $ open/write opt 'libopt' | 278 $ open /write opt 'libopt' |
197 $ write opt "identification=""",libid," ",libverstr,"""" | 279 $ write opt "identification=""",libid," ",libverstr,"""" |
198 $ write opt libobj | 280 $ write opt libobj |
199 $ write opt libolb,"/lib" | 281 $ write opt libolb, " /library" |
200 $ if libref .nes. "" then write opt libref,"/SHARE" | 282 $ if libref .nes. "" then write opt libref,"/SHARE" |
201 $ type sys$input:/out=opt: | 283 $ type sys$input:/out=opt: |
202 ! | 284 ! |
203 ! Ensure transfer vector is at beginning of image | 285 ! Ensure transfer vector is at beginning of image |
204 ! | 286 ! |
205 CLUSTER=FIRST | 287 CLUSTER=FIRST |
206 $ write opt "COLLECT=FIRST,$$",libvec | 288 $ write opt "COLLECT=FIRST,$$",libvec |
207 $ write opt "GSMATCH=",libvmatch,",",libver | 289 $ write opt "GSMATCH=",libvmatch,",",libver |
208 $ type sys$input:/out=opt: | 290 $ type sys$input:/out=opt: |
209 ! | 291 ! |
210 ! make psects nonshareable so image can be installed. | 292 ! make psects nonshareable so image can be installed. |
211 ! | 293 ! |
212 PSECT_ATTR=$CHAR_STRING_CONSTANTS,NOWRT | 294 PSECT_ATTR=$CHAR_STRING_CONSTANTS,NOWRT |
213 $ libwrch := opt | 295 $ libwrch := opt |
214 $ libwriter := write_vax_psect_attr | 296 $ libwriter := write_vax_psect_attr |
215 $ gosub read_func_num | 297 $ gosub read_func_num |
216 $ close opt | 298 $ close opt |
217 $ macro/obj='libobj' 'libmar' | 299 $ macro/obj='libobj' 'libmar' |
218 $ link/map='libmap'/full/share='libgoal' 'libopt'/option | 300 $ link /map = 'libmap' /full /share = 'libgoal' 'libopt' /options - |
| 301 'zlib_lib' |
219 $ return | 302 $ return |
220 $ | 303 $ |
221 $! The record writer routine for VAX functions | 304 $! The record writer routine for VAX functions |
222 $ write_vax_ftransfer_entry: | 305 $ write_vax_ftransfer_entry: |
223 $ if info_kind .nes. "FUNCTION" then return | 306 $ if info_kind .nes. "FUNCTION" then return |
224 $ if libentry .eqs ".dummy" | 307 $ if libentry .eqs ".dummy" |
225 $ then | 308 $ then |
226 $ write 'libwrch' " .BLKB 8" ! Dummy is zeroes... | 309 $ write 'libwrch' " .BLKB 8" ! Dummy is zeroes... |
227 $ else | 310 $ else |
228 $ write 'libwrch' " FTRANSFER_ENTRY ",libentry | 311 $ write 'libwrch' " FTRANSFER_ENTRY ",libentry |
229 $ endif | 312 $ endif |
230 $ return | 313 $ return |
231 $! The record writer routine for VAX variables (should never happen!) | 314 $! The record writer routine for VAX variables (should never happen!) |
232 $ write_vax_psect_attr: | 315 $ write_vax_psect_attr: |
233 $ if info_kind .nes. "VARIABLE" then return | 316 $ if info_kind .nes. "VARIABLE" then return |
234 $ if libentry .eqs ".dummy" then return | 317 $ if libentry .eqs ".dummy" then return |
235 $ write 'libwrch' "PSECT_ATTR=",libentry,",NOSHR" | 318 $ write 'libwrch' "PSECT_ATTR=",libentry,",NOSHR" |
236 $ return | 319 $ return |
237 $ | 320 $ |
238 $! ----- Common subroutines | 321 $! ----- Common subroutines |
239 $! ----- | 322 $! ----- |
240 $! The .num file reader. This one has great responsability. | 323 $! The .num file reader. This one has great responsibility. |
241 $ read_func_num: | 324 $ read_func_num: |
242 $ open libnum 'libnum' | 325 $ open /read libnum 'libnum' |
243 $ goto read_nums | 326 $ goto read_nums |
244 $ | 327 $ |
245 $ read_nums: | 328 $ read_nums: |
246 $ libentrynum=0 | 329 $ libentrynum=0 |
247 $ liblastentry:=false | 330 $ liblastentry:=false |
248 $ entrycount=0 | 331 $ entrycount=0 |
249 $ loop: | 332 $ loop: |
250 $ read/end=loop_end/err=loop_end libnum line | 333 $ read /end=loop_end /err=loop_end libnum line |
251 $ entrynum=f$int(f$element(1," ",f$edit(line,"COMPRESS,TRIM"))) | 334 $ lin = f$edit( line, "COMPRESS,TRIM") |
252 $ entryinfo=f$element(2," ",f$edit(line,"COMPRESS,TRIM")) | 335 $! Skip a "#" comment line. |
253 $ curentry=f$element(0," ",f$edit(line,"COMPRESS,TRIM")) | 336 $ if (f$extract( 0, 1, lin) .eqs. "#") then goto loop |
254 $ info_exist=f$element(0,":",entryinfo) | 337 $ entrynum = f$int(f$element( 1, " ", lin)) |
255 $ info_platforms=","+f$element(1,":",entryinfo)+"," | 338 $ entryinfo = f$element( 2, " ", lin) |
256 $ info_kind=f$element(2,":",entryinfo) | 339 $ curentry = f$element( 0, " ", lin) |
257 $ info_algorithms=","+f$element(3,":",entryinfo)+"," | 340 $ info_exist = f$element( 0, ":", entryinfo) |
| 341 $ info_platforms = ","+ f$element(1, ":", entryinfo)+ "," |
| 342 $ info_kind = f$element( 2, ":", entryinfo) |
| 343 $ info_algorithms = ","+ f$element( 3, ":", entryinfo)+ "," |
258 $ if info_exist .eqs. "NOEXIST" then goto loop | 344 $ if info_exist .eqs. "NOEXIST" then goto loop |
259 $ truesum = 0 | 345 $ truesum = 0 |
260 $ falsesum = 0 | 346 $ falsesum = 0 |
261 $ negatives = 1 | 347 $ negatives = 1 |
262 $ plat_i = 0 | 348 $ plat_i = 0 |
263 $ loop1: | 349 $ loop1: |
264 $ plat_entry = f$element(plat_i,",",info_platforms) | 350 $ plat_entry = f$element( plat_i, ",", info_platforms) |
265 $ plat_i = plat_i + 1 | 351 $ plat_i = plat_i + 1 |
266 $ if plat_entry .eqs. "" then goto loop1 | 352 $ if plat_entry .eqs. "" then goto loop1 |
267 $ if plat_entry .nes. "," | 353 $ if plat_entry .nes. "," |
268 $ then | 354 $ then |
269 $ if f$extract(0,1,plat_entry) .nes. "!" then negatives = 0 | 355 $ if f$extract(0,1,plat_entry) .nes. "!" then negatives = 0 |
270 $ if f$getsyi("CPU") .lt. 128 | 356 $ if (arch_vax) |
271 $ then | 357 $ then |
272 $ if plat_entry .eqs. "EXPORT_VAR_AS_FUNCTION" then - | 358 $ if plat_entry .eqs. "EXPORT_VAR_AS_FUNCTION" then - |
273 $ truesum = truesum + 1 | 359 $ truesum = truesum + 1 |
274 $ if plat_entry .eqs. "!EXPORT_VAR_AS_FUNCTION" then - | 360 $ if plat_entry .eqs. "!EXPORT_VAR_AS_FUNCTION" then - |
275 $ falsesum = falsesum + 1 | 361 $ falsesum = falsesum + 1 |
276 $ endif | 362 $ endif |
277 $! | 363 $! |
278 $ if ((plat_entry .eqs. "VMS") .or. - | 364 $ if ((plat_entry .eqs. "VMS") .or. - |
| 365 ((plat_entry .eqs. "ZLIB") .and. (ZLIB .nes. "")) .or. - |
279 (arch_vax .and. (plat_entry .eqs. "VMSVAX"))) then - | 366 (arch_vax .and. (plat_entry .eqs. "VMSVAX"))) then - |
280 truesum = truesum + 1 | 367 truesum = truesum + 1 |
281 $! | 368 $! |
282 $ if ((plat_entry .eqs. "!VMS") .or. - | 369 $ if ((plat_entry .eqs. "!VMS") .or. - |
283 (arch_vax .and. (plat_entry .eqs. "!VMSVAX"))) then - | 370 (arch_vax .and. (plat_entry .eqs. "!VMSVAX"))) then - |
284 falsesum = falsesum + 1 | 371 falsesum = falsesum + 1 |
285 $! | 372 $! |
286 $ goto loop1 | 373 $ goto loop1 |
287 $ endif | 374 $ endif |
288 $ endloop1: | 375 $ endloop1: |
289 $!DEBUG!$ if info_platforms - "EXPORT_VAR_AS_FUNCTION" .nes. info_platforms | 376 $!DEBUG!$ if info_platforms - "EXPORT_VAR_AS_FUNCTION" .nes. info_platforms |
290 $!DEBUG!$ then | 377 $!DEBUG!$ then |
291 $!DEBUG!$ write sys$output line | 378 $!DEBUG!$ write sys$output line |
292 $!DEBUG!$ write sys$output " truesum = ",truesum,- | 379 $!DEBUG!$ write sys$output " truesum = ",truesum,- |
293 $!DEBUG! ", negatives = ",negatives,", falsesum = ",falsesum | 380 $!DEBUG! ", negatives = ",negatives,", falsesum = ",falsesum |
294 $!DEBUG!$ endif | 381 $!DEBUG!$ endif |
295 $ if falsesum .ne. 0 then goto loop | 382 $ if falsesum .ne. 0 then goto loop |
296 $ if truesum+negatives .eq. 0 then goto loop | 383 $ if truesum+negatives .eq. 0 then goto loop |
297 $ alg_i = 0 | 384 $ alg_i = 0 |
298 $ loop2: | 385 $ loop2: |
299 $ alg_entry = f$element(alg_i,",",info_algorithms) | 386 $ alg_entry = f$element(alg_i,",",info_algorithms) |
300 $ alg_i = alg_i + 1 | 387 $ alg_i = alg_i + 1 |
301 $ if alg_entry .eqs. "" then goto loop2 | 388 $ if alg_entry .eqs. "" then goto loop2 |
302 $ if alg_entry .nes. "," | 389 $ if alg_entry .nes. "," |
303 $ then | 390 $ then |
304 $ if alg_entry .eqs. "KRB5" then goto loop ! Special for now | 391 $» if disabled_algorithms - ("," + alg_entry + ",") .nes disabled_algorit
hms then goto loop |
305 $» if alg_entry .eqs. "STATIC_ENGINE" then goto loop ! Special for now | |
306 $ if f$trnlnm("OPENSSL_NO_"+alg_entry) .nes. "" then goto loop | 392 $ if f$trnlnm("OPENSSL_NO_"+alg_entry) .nes. "" then goto loop |
307 $ goto loop2 | 393 $ goto loop2 |
308 $ endif | 394 $ endif |
309 $ endloop2: | 395 $ endloop2: |
310 $ if info_platforms - "EXPORT_VAR_AS_FUNCTION" .nes. info_platforms | 396 $ if info_platforms - "EXPORT_VAR_AS_FUNCTION" .nes. info_platforms |
311 $ then | 397 $ then |
312 $!DEBUG!$ write sys$output curentry," ; ",entrynum," ; ",entryinfo | 398 $!DEBUG!$ write sys$output curentry," ; ",entrynum," ; ",entryinfo |
313 $ endif | 399 $ endif |
314 $ redo: | 400 $ redo: |
315 $ next:=loop | 401 $ next:=loop |
(...skipping 22 matching lines...) Expand all Loading... |
338 $ endif | 424 $ endif |
339 $ libentrynum=entrycount | 425 $ libentrynum=entrycount |
340 $ goto 'next' | 426 $ goto 'next' |
341 $ loop_end: | 427 $ loop_end: |
342 $ close libnum | 428 $ close libnum |
343 $ return | 429 $ return |
344 $ | 430 $ |
345 $! The version number reader | 431 $! The version number reader |
346 $ read_version_info: | 432 $ read_version_info: |
347 $ libver = "" | 433 $ libver = "" |
348 $ open/read vf [.CRYPTO]OPENSSLV.H | 434 $ open /read vf [.CRYPTO]OPENSSLV.H |
349 $ loop_rvi: | 435 $ loop_rvi: |
350 $ read/err=endloop_rvi/end=endloop_rvi vf rvi_line | 436 $ read/err=endloop_rvi/end=endloop_rvi vf rvi_line |
351 $ if rvi_line - "SHLIB_VERSION_NUMBER """ .eqs. rvi_line then - | 437 $ if rvi_line - "SHLIB_VERSION_NUMBER """ .eqs. rvi_line then - |
352 goto loop_rvi | 438 goto loop_rvi |
353 $ libverstr = f$element(1,"""",rvi_line) | 439 $ libverstr = f$element(1,"""",rvi_line) |
354 $ libvmajor = f$element(0,".",libverstr) | 440 $ libvmajor = f$element(0,".",libverstr) |
355 $ libvminor = f$element(1,".",libverstr) | 441 $ libvminor = f$element(1,".",libverstr) |
356 $ libvedit = f$element(2,".",libverstr) | 442 $ libvedit = f$element(2,".",libverstr) |
357 $ libvpatch = f$cvui(0,8,f$extract(1,1,libvedit)+"@")-f$cvui(0,8,"@") | 443 $ libvpatch = f$cvui(0,8,f$extract(1,1,libvedit)+"@")-f$cvui(0,8,"@") |
358 $ libvedit = f$extract(0,1,libvedit) | 444 $ libvedit = f$extract(0,1,libvedit) |
359 $ libver = f$string(f$int(libvmajor)*100)+","+- | 445 $ libver = f$string(f$int(libvmajor)*100)+","+- |
360 f$string(f$int(libvminor)*100+f$int(libvedit)*10+f$int(libvpatch)) | 446 f$string(f$int(libvminor)*100+f$int(libvedit)*10+f$int(libvpatch)) |
361 $ if libvmajor .eqs. "0" | 447 $ if libvmajor .eqs. "0" |
362 $ then | 448 $ then |
363 $ libvmatch = "EQUAL" | 449 $ libvmatch = "EQUAL" |
364 $ else | 450 $ else |
365 $ ! Starting with the 1.0 release, backward compatibility should be | 451 $ ! Starting with the 1.0 release, backward compatibility should be |
366 $ ! kept, so switch over to the following | 452 $ ! kept, so switch over to the following |
367 $ libvmatch = "LEQUAL" | 453 $ libvmatch = "LEQUAL" |
368 $ endif | 454 $ endif |
369 $ endloop_rvi: | 455 $ endloop_rvi: |
370 $ close vf | 456 $ close vf |
371 $ return | 457 $ return |
| 458 $ |
| 459 $! The disabled algorithms reader |
| 460 $ read_disabled_algorithms_info: |
| 461 $ disabled_algorithms = "," |
| 462 $ open /read cf [.CRYPTO.'ARCH']OPENSSLCONF.H |
| 463 $ loop_rci: |
| 464 $ read/err=endloop_rci/end=endloop_rci cf rci_line |
| 465 $ rci_line = f$edit(rci_line,"TRIM,COMPRESS") |
| 466 $ rci_ei = 0 |
| 467 $ if f$extract(0,9,rci_line) .eqs. "# define " then rci_ei = 2 |
| 468 $ if f$extract(0,8,rci_line) .eqs. "#define " then rci_ei = 1 |
| 469 $ if rci_ei .eq. 0 then goto loop_rci |
| 470 $ rci_e = f$element(rci_ei," ",rci_line) |
| 471 $ if f$extract(0,11,rci_e) .nes. "OPENSSL_NO_" then goto loop_rci |
| 472 $ disabled_algorithms = disabled_algorithms + f$extract(11,999,rci_e) + "," |
| 473 $ goto loop_rci |
| 474 $ endloop_rci: |
| 475 $ close cf |
| 476 $ return |
OLD | NEW |