hane 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/README.md +32 -32
  2. package/binding.gyp +51 -51
  3. package/deps/win-nodeapi/node_api.def +158 -158
  4. package/package.json +34 -34
  5. package/src/native/addon.cc +183 -183
  6. package/src/native/zsign_driver.cc +86 -86
  7. package/src/native/zsign_driver.h +38 -38
  8. package/vendor/zlib/.cmake-format.yaml +245 -245
  9. package/vendor/zlib/.github/workflows/c-std.yml +230 -230
  10. package/vendor/zlib/.github/workflows/cmake.yml +112 -112
  11. package/vendor/zlib/.github/workflows/configure.yml +136 -136
  12. package/vendor/zlib/.github/workflows/fuzz.yml +25 -25
  13. package/vendor/zlib/.github/workflows/msys-cygwin.yml +77 -77
  14. package/vendor/zlib/BUILD.bazel +134 -134
  15. package/vendor/zlib/CMakeLists.txt +330 -330
  16. package/vendor/zlib/ChangeLog +1621 -1621
  17. package/vendor/zlib/FAQ +367 -367
  18. package/vendor/zlib/INDEX +68 -68
  19. package/vendor/zlib/LICENSE +22 -22
  20. package/vendor/zlib/MODULE.bazel +9 -9
  21. package/vendor/zlib/Makefile.in +419 -419
  22. package/vendor/zlib/README +115 -115
  23. package/vendor/zlib/README-cmake.md +83 -83
  24. package/vendor/zlib/adler32.c +164 -164
  25. package/vendor/zlib/amiga/Makefile.pup +69 -69
  26. package/vendor/zlib/amiga/Makefile.sas +68 -68
  27. package/vendor/zlib/compress.c +75 -75
  28. package/vendor/zlib/configure +966 -966
  29. package/vendor/zlib/contrib/README.contrib +57 -57
  30. package/vendor/zlib/contrib/ada/buffer_demo.adb +106 -106
  31. package/vendor/zlib/contrib/ada/mtest.adb +156 -156
  32. package/vendor/zlib/contrib/ada/read.adb +156 -156
  33. package/vendor/zlib/contrib/ada/readme.txt +65 -65
  34. package/vendor/zlib/contrib/ada/test.adb +463 -463
  35. package/vendor/zlib/contrib/ada/zlib-streams.adb +225 -225
  36. package/vendor/zlib/contrib/ada/zlib-streams.ads +114 -114
  37. package/vendor/zlib/contrib/ada/zlib-thin.adb +142 -142
  38. package/vendor/zlib/contrib/ada/zlib-thin.ads +450 -450
  39. package/vendor/zlib/contrib/ada/zlib.adb +701 -701
  40. package/vendor/zlib/contrib/ada/zlib.ads +328 -328
  41. package/vendor/zlib/contrib/ada/zlib.gpr +20 -20
  42. package/vendor/zlib/contrib/blast/Makefile +8 -8
  43. package/vendor/zlib/contrib/blast/README +4 -4
  44. package/vendor/zlib/contrib/blast/blast.c +466 -466
  45. package/vendor/zlib/contrib/blast/blast.h +83 -83
  46. package/vendor/zlib/contrib/delphi/ZLib.pas +557 -557
  47. package/vendor/zlib/contrib/delphi/ZLibConst.pas +11 -11
  48. package/vendor/zlib/contrib/delphi/readme.txt +76 -76
  49. package/vendor/zlib/contrib/delphi/zlibd32.mak +99 -99
  50. package/vendor/zlib/contrib/gcc_gvmat64/gvmat64.S +574 -574
  51. package/vendor/zlib/contrib/infback9/README +1 -1
  52. package/vendor/zlib/contrib/infback9/infback9.c +603 -603
  53. package/vendor/zlib/contrib/infback9/infback9.h +37 -37
  54. package/vendor/zlib/contrib/infback9/inffix9.h +107 -107
  55. package/vendor/zlib/contrib/infback9/inflate9.h +47 -47
  56. package/vendor/zlib/contrib/infback9/inftree9.c +319 -319
  57. package/vendor/zlib/contrib/infback9/inftree9.h +61 -61
  58. package/vendor/zlib/contrib/iostream/test.cpp +24 -24
  59. package/vendor/zlib/contrib/iostream/zfstream.cpp +329 -329
  60. package/vendor/zlib/contrib/iostream/zfstream.h +128 -128
  61. package/vendor/zlib/contrib/iostream2/zstream.h +307 -307
  62. package/vendor/zlib/contrib/iostream2/zstream_test.cpp +25 -25
  63. package/vendor/zlib/contrib/iostream3/README +35 -35
  64. package/vendor/zlib/contrib/iostream3/TODO +17 -17
  65. package/vendor/zlib/contrib/iostream3/test.cc +50 -50
  66. package/vendor/zlib/contrib/iostream3/zfstream.cc +479 -479
  67. package/vendor/zlib/contrib/iostream3/zfstream.h +466 -466
  68. package/vendor/zlib/contrib/minizip/CMakeLists.txt +380 -380
  69. package/vendor/zlib/contrib/minizip/Makefile +37 -37
  70. package/vendor/zlib/contrib/minizip/Makefile.am +45 -45
  71. package/vendor/zlib/contrib/minizip/MiniZip64_Changes.txt +6 -6
  72. package/vendor/zlib/contrib/minizip/MiniZip64_info.txt +74 -74
  73. package/vendor/zlib/contrib/minizip/configure.ac +32 -32
  74. package/vendor/zlib/contrib/minizip/crypt.h +128 -128
  75. package/vendor/zlib/contrib/minizip/ints.h +57 -57
  76. package/vendor/zlib/contrib/minizip/ioapi.c +231 -231
  77. package/vendor/zlib/contrib/minizip/ioapi.h +183 -183
  78. package/vendor/zlib/contrib/minizip/iowin32.c +448 -448
  79. package/vendor/zlib/contrib/minizip/iowin32.h +28 -28
  80. package/vendor/zlib/contrib/minizip/make_vms.com +25 -25
  81. package/vendor/zlib/contrib/minizip/miniunz.c +647 -647
  82. package/vendor/zlib/contrib/minizip/miniunzip.1 +63 -63
  83. package/vendor/zlib/contrib/minizip/minizip.1 +46 -46
  84. package/vendor/zlib/contrib/minizip/minizip.c +512 -512
  85. package/vendor/zlib/contrib/minizip/minizip.pc.in +12 -12
  86. package/vendor/zlib/contrib/minizip/minizip.pc.txt +13 -13
  87. package/vendor/zlib/contrib/minizip/minizipConfig.cmake.in +35 -35
  88. package/vendor/zlib/contrib/minizip/mztools.c +288 -288
  89. package/vendor/zlib/contrib/minizip/mztools.h +37 -37
  90. package/vendor/zlib/contrib/minizip/skipset.h +361 -361
  91. package/vendor/zlib/contrib/minizip/test/CMakeLists.txt +121 -121
  92. package/vendor/zlib/contrib/minizip/test/add_subdirectory_exclude_test.cmake.in +29 -29
  93. package/vendor/zlib/contrib/minizip/test/add_subdirectory_test.cmake.in +28 -28
  94. package/vendor/zlib/contrib/minizip/test/find_package_test.cmake.in +25 -25
  95. package/vendor/zlib/contrib/minizip/test/test_helper.cm +32 -32
  96. package/vendor/zlib/contrib/minizip/unzip.c +1981 -1981
  97. package/vendor/zlib/contrib/minizip/unzip.h +441 -441
  98. package/vendor/zlib/contrib/minizip/zip.c +2199 -2199
  99. package/vendor/zlib/contrib/minizip/zip.h +370 -370
  100. package/vendor/zlib/contrib/nuget/nuget.csproj +43 -43
  101. package/vendor/zlib/contrib/nuget/nuget.sln +22 -22
  102. package/vendor/zlib/contrib/pascal/example.pas +599 -599
  103. package/vendor/zlib/contrib/pascal/readme.txt +76 -76
  104. package/vendor/zlib/contrib/pascal/zlibd32.mak +99 -99
  105. package/vendor/zlib/contrib/pascal/zlibpas.pas +276 -276
  106. package/vendor/zlib/contrib/puff/Makefile +42 -42
  107. package/vendor/zlib/contrib/puff/README +63 -63
  108. package/vendor/zlib/contrib/puff/puff.c +840 -840
  109. package/vendor/zlib/contrib/puff/puff.h +35 -35
  110. package/vendor/zlib/contrib/puff/pufftest.c +169 -169
  111. package/vendor/zlib/contrib/untgz/Makefile +14 -14
  112. package/vendor/zlib/contrib/untgz/Makefile.msc +17 -17
  113. package/vendor/zlib/contrib/untgz/untgz.c +667 -667
  114. package/vendor/zlib/contrib/vstudio/readme.txt +81 -81
  115. package/vendor/zlib/contrib/vstudio/vc12/miniunz.vcxproj +315 -315
  116. package/vendor/zlib/contrib/vstudio/vc12/minizip.vcxproj +312 -312
  117. package/vendor/zlib/contrib/vstudio/vc12/testzlib.vcxproj +421 -421
  118. package/vendor/zlib/contrib/vstudio/vc12/testzlibdll.vcxproj +315 -315
  119. package/vendor/zlib/contrib/vstudio/vc12/zlib.rc +32 -32
  120. package/vendor/zlib/contrib/vstudio/vc12/zlibstat.vcxproj +458 -458
  121. package/vendor/zlib/contrib/vstudio/vc12/zlibvc.sln +119 -119
  122. package/vendor/zlib/contrib/vstudio/vc12/zlibvc.vcxproj +667 -667
  123. package/vendor/zlib/contrib/vstudio/vc14/miniunz.vcxproj +315 -315
  124. package/vendor/zlib/contrib/vstudio/vc14/minizip.vcxproj +312 -312
  125. package/vendor/zlib/contrib/vstudio/vc14/testzlib.vcxproj +421 -421
  126. package/vendor/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj +315 -315
  127. package/vendor/zlib/contrib/vstudio/vc14/zlib.rc +32 -32
  128. package/vendor/zlib/contrib/vstudio/vc14/zlibstat.vcxproj +458 -458
  129. package/vendor/zlib/contrib/vstudio/vc14/zlibvc.sln +119 -119
  130. package/vendor/zlib/contrib/vstudio/vc14/zlibvc.vcxproj +667 -667
  131. package/vendor/zlib/contrib/vstudio/vc17/miniunz.vcxproj +408 -408
  132. package/vendor/zlib/contrib/vstudio/vc17/minizip.vcxproj +404 -404
  133. package/vendor/zlib/contrib/vstudio/vc17/testzlib.vcxproj +472 -472
  134. package/vendor/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj +408 -408
  135. package/vendor/zlib/contrib/vstudio/vc17/zlib.rc +32 -32
  136. package/vendor/zlib/contrib/vstudio/vc17/zlibstat.vcxproj +601 -601
  137. package/vendor/zlib/contrib/vstudio/vc17/zlibvc.sln +179 -179
  138. package/vendor/zlib/contrib/vstudio/vc17/zlibvc.vcxproj +874 -874
  139. package/vendor/zlib/crc32.c +1049 -1049
  140. package/vendor/zlib/crc32.h +9446 -9446
  141. package/vendor/zlib/deflate.c +2152 -2152
  142. package/vendor/zlib/deflate.h +380 -380
  143. package/vendor/zlib/doc/algorithm.txt +209 -209
  144. package/vendor/zlib/doc/rfc1950.txt +619 -619
  145. package/vendor/zlib/doc/rfc1951.txt +955 -955
  146. package/vendor/zlib/doc/rfc1952.txt +675 -675
  147. package/vendor/zlib/doc/txtvsbin.txt +107 -107
  148. package/vendor/zlib/examples/README.examples +54 -54
  149. package/vendor/zlib/examples/enough.c +597 -597
  150. package/vendor/zlib/examples/fitblk.c +233 -233
  151. package/vendor/zlib/examples/gun.c +702 -702
  152. package/vendor/zlib/examples/gzappend.c +504 -504
  153. package/vendor/zlib/examples/gzjoin.c +449 -449
  154. package/vendor/zlib/examples/gzlog.c +1061 -1061
  155. package/vendor/zlib/examples/gzlog.h +91 -91
  156. package/vendor/zlib/examples/gznorm.c +474 -474
  157. package/vendor/zlib/examples/zlib_how.html +549 -549
  158. package/vendor/zlib/examples/zpipe.c +209 -209
  159. package/vendor/zlib/examples/zran.c +550 -550
  160. package/vendor/zlib/examples/zran.h +53 -53
  161. package/vendor/zlib/gzclose.c +23 -23
  162. package/vendor/zlib/gzguts.h +215 -215
  163. package/vendor/zlib/gzlib.c +585 -585
  164. package/vendor/zlib/gzread.c +603 -603
  165. package/vendor/zlib/gzwrite.c +631 -631
  166. package/vendor/zlib/infback.c +628 -628
  167. package/vendor/zlib/inffast.c +320 -320
  168. package/vendor/zlib/inffast.h +11 -11
  169. package/vendor/zlib/inffixed.h +94 -94
  170. package/vendor/zlib/inflate.c +1526 -1526
  171. package/vendor/zlib/inflate.h +126 -126
  172. package/vendor/zlib/inftrees.c +299 -299
  173. package/vendor/zlib/inftrees.h +62 -62
  174. package/vendor/zlib/make_vms.com +867 -867
  175. package/vendor/zlib/msdos/Makefile.bor +115 -115
  176. package/vendor/zlib/msdos/Makefile.dj2 +104 -104
  177. package/vendor/zlib/msdos/Makefile.emx +69 -69
  178. package/vendor/zlib/msdos/Makefile.msc +112 -112
  179. package/vendor/zlib/msdos/Makefile.tc +100 -100
  180. package/vendor/zlib/nintendods/Makefile +126 -126
  181. package/vendor/zlib/nintendods/README +5 -5
  182. package/vendor/zlib/old/Makefile.emx +69 -69
  183. package/vendor/zlib/old/Makefile.riscos +151 -151
  184. package/vendor/zlib/old/README +3 -3
  185. package/vendor/zlib/old/descrip.mms +48 -48
  186. package/vendor/zlib/old/os2/Makefile.os2 +136 -136
  187. package/vendor/zlib/old/os2/zlib.def +51 -51
  188. package/vendor/zlib/old/visual-basic.txt +160 -160
  189. package/vendor/zlib/os400/README400 +48 -48
  190. package/vendor/zlib/os400/bndsrc +133 -133
  191. package/vendor/zlib/os400/make.sh +366 -366
  192. package/vendor/zlib/os400/zlib.inc +531 -531
  193. package/vendor/zlib/qnx/package.qpg +141 -141
  194. package/vendor/zlib/test/CMakeLists.txt +265 -265
  195. package/vendor/zlib/test/add_subdirectory_exclude_test.cmake.in +29 -29
  196. package/vendor/zlib/test/add_subdirectory_test.cmake.in +28 -28
  197. package/vendor/zlib/test/example.c +552 -552
  198. package/vendor/zlib/test/find_package_test.cmake.in +26 -26
  199. package/vendor/zlib/test/infcover.c +672 -672
  200. package/vendor/zlib/test/minigzip.c +590 -590
  201. package/vendor/zlib/treebuild.xml +116 -116
  202. package/vendor/zlib/trees.c +1119 -1119
  203. package/vendor/zlib/trees.h +128 -128
  204. package/vendor/zlib/uncompr.c +85 -85
  205. package/vendor/zlib/watcom/watcom_f.mak +43 -43
  206. package/vendor/zlib/watcom/watcom_l.mak +43 -43
  207. package/vendor/zlib/win32/DLL_FAQ.txt +381 -381
  208. package/vendor/zlib/win32/Makefile.bor +109 -109
  209. package/vendor/zlib/win32/Makefile.gcc +177 -177
  210. package/vendor/zlib/win32/Makefile.msc +159 -159
  211. package/vendor/zlib/win32/README-WIN32.txt +103 -103
  212. package/vendor/zlib/win32/VisualC.txt +3 -3
  213. package/vendor/zlib/win32/zlib1.rc +37 -37
  214. package/vendor/zlib/zconf.h.in +544 -544
  215. package/vendor/zlib/zlib.3 +149 -149
  216. package/vendor/zlib/zlib.h +1957 -1957
  217. package/vendor/zlib/zlib.map +103 -103
  218. package/vendor/zlib/zlib.pc.cmakein +13 -13
  219. package/vendor/zlib/zlib.pc.in +13 -13
  220. package/vendor/zlib/zlibConfig.cmake.in +26 -26
  221. package/vendor/zlib/zutil.c +299 -299
  222. package/vendor/zlib/zutil.h +257 -257
  223. package/vendor/zsign/.gitattributes +3 -3
  224. package/vendor/zsign/LICENSE +20 -20
  225. package/vendor/zsign/README.md +142 -142
  226. package/vendor/zsign/build/linux/Makefile +43 -43
  227. package/vendor/zsign/build/macos/Makefile +43 -43
  228. package/vendor/zsign/build/windows/vs2022/include/minizip/crypt.h +128 -128
  229. package/vendor/zsign/build/windows/vs2022/include/minizip/ioapi.h +216 -216
  230. package/vendor/zsign/build/windows/vs2022/include/minizip/iowin32.h +28 -28
  231. package/vendor/zsign/build/windows/vs2022/include/minizip/mztools.h +37 -37
  232. package/vendor/zsign/build/windows/vs2022/include/minizip/unzip.h +437 -437
  233. package/vendor/zsign/build/windows/vs2022/include/minizip/zip.h +364 -364
  234. package/vendor/zsign/build/windows/vs2022/include/openssl/__DECC_INCLUDE_EPILOGUE.H +22 -22
  235. package/vendor/zsign/build/windows/vs2022/include/openssl/__DECC_INCLUDE_PROLOGUE.H +26 -26
  236. package/vendor/zsign/build/windows/vs2022/include/openssl/aes.h +111 -111
  237. package/vendor/zsign/build/windows/vs2022/include/openssl/applink.c +153 -153
  238. package/vendor/zsign/build/windows/vs2022/include/openssl/asn1_mac.h +10 -10
  239. package/vendor/zsign/build/windows/vs2022/include/openssl/asn1err.h +142 -142
  240. package/vendor/zsign/build/windows/vs2022/include/openssl/async.h +104 -104
  241. package/vendor/zsign/build/windows/vs2022/include/openssl/asyncerr.h +29 -29
  242. package/vendor/zsign/build/windows/vs2022/include/openssl/bioerr.h +72 -72
  243. package/vendor/zsign/build/windows/vs2022/include/openssl/blowfish.h +78 -78
  244. package/vendor/zsign/build/windows/vs2022/include/openssl/bn.h +590 -590
  245. package/vendor/zsign/build/windows/vs2022/include/openssl/bnerr.h +47 -47
  246. package/vendor/zsign/build/windows/vs2022/include/openssl/buffer.h +62 -62
  247. package/vendor/zsign/build/windows/vs2022/include/openssl/buffererr.h +25 -25
  248. package/vendor/zsign/build/windows/vs2022/include/openssl/camellia.h +117 -117
  249. package/vendor/zsign/build/windows/vs2022/include/openssl/cast.h +71 -71
  250. package/vendor/zsign/build/windows/vs2022/include/openssl/cmac.h +52 -52
  251. package/vendor/zsign/build/windows/vs2022/include/openssl/cmp_util.h +56 -56
  252. package/vendor/zsign/build/windows/vs2022/include/openssl/cmperr.h +131 -131
  253. package/vendor/zsign/build/windows/vs2022/include/openssl/cmserr.h +125 -125
  254. package/vendor/zsign/build/windows/vs2022/include/openssl/comperr.h +38 -38
  255. package/vendor/zsign/build/windows/vs2022/include/openssl/conf_api.h +46 -46
  256. package/vendor/zsign/build/windows/vs2022/include/openssl/conferr.h +52 -52
  257. package/vendor/zsign/build/windows/vs2022/include/openssl/conftypes.h +44 -44
  258. package/vendor/zsign/build/windows/vs2022/include/openssl/core.h +236 -236
  259. package/vendor/zsign/build/windows/vs2022/include/openssl/core_dispatch.h +1022 -1022
  260. package/vendor/zsign/build/windows/vs2022/include/openssl/core_object.h +41 -41
  261. package/vendor/zsign/build/windows/vs2022/include/openssl/crmferr.h +50 -50
  262. package/vendor/zsign/build/windows/vs2022/include/openssl/cryptoerr.h +56 -56
  263. package/vendor/zsign/build/windows/vs2022/include/openssl/cryptoerr_legacy.h +1466 -1466
  264. package/vendor/zsign/build/windows/vs2022/include/openssl/cterr.h +45 -45
  265. package/vendor/zsign/build/windows/vs2022/include/openssl/decoder.h +133 -133
  266. package/vendor/zsign/build/windows/vs2022/include/openssl/decodererr.h +28 -28
  267. package/vendor/zsign/build/windows/vs2022/include/openssl/des.h +211 -211
  268. package/vendor/zsign/build/windows/vs2022/include/openssl/dh.h +339 -339
  269. package/vendor/zsign/build/windows/vs2022/include/openssl/dherr.h +59 -59
  270. package/vendor/zsign/build/windows/vs2022/include/openssl/dsa.h +280 -280
  271. package/vendor/zsign/build/windows/vs2022/include/openssl/dsaerr.h +44 -44
  272. package/vendor/zsign/build/windows/vs2022/include/openssl/dtls1.h +57 -57
  273. package/vendor/zsign/build/windows/vs2022/include/openssl/e_os2.h +310 -310
  274. package/vendor/zsign/build/windows/vs2022/include/openssl/e_ostime.h +38 -38
  275. package/vendor/zsign/build/windows/vs2022/include/openssl/ebcdic.h +39 -39
  276. package/vendor/zsign/build/windows/vs2022/include/openssl/ec.h +1588 -1588
  277. package/vendor/zsign/build/windows/vs2022/include/openssl/ecdh.h +10 -10
  278. package/vendor/zsign/build/windows/vs2022/include/openssl/ecdsa.h +10 -10
  279. package/vendor/zsign/build/windows/vs2022/include/openssl/ecerr.h +104 -104
  280. package/vendor/zsign/build/windows/vs2022/include/openssl/encoder.h +124 -124
  281. package/vendor/zsign/build/windows/vs2022/include/openssl/encodererr.h +28 -28
  282. package/vendor/zsign/build/windows/vs2022/include/openssl/engine.h +833 -833
  283. package/vendor/zsign/build/windows/vs2022/include/openssl/engineerr.h +63 -63
  284. package/vendor/zsign/build/windows/vs2022/include/openssl/esserr.h +32 -32
  285. package/vendor/zsign/build/windows/vs2022/include/openssl/evp.h +2231 -2231
  286. package/vendor/zsign/build/windows/vs2022/include/openssl/evperr.h +140 -140
  287. package/vendor/zsign/build/windows/vs2022/include/openssl/fips_names.h +50 -50
  288. package/vendor/zsign/build/windows/vs2022/include/openssl/hmac.h +62 -62
  289. package/vendor/zsign/build/windows/vs2022/include/openssl/hpke.h +169 -169
  290. package/vendor/zsign/build/windows/vs2022/include/openssl/http.h +118 -118
  291. package/vendor/zsign/build/windows/vs2022/include/openssl/httperr.h +56 -56
  292. package/vendor/zsign/build/windows/vs2022/include/openssl/idea.h +82 -82
  293. package/vendor/zsign/build/windows/vs2022/include/openssl/indicator.h +31 -31
  294. package/vendor/zsign/build/windows/vs2022/include/openssl/kdf.h +138 -138
  295. package/vendor/zsign/build/windows/vs2022/include/openssl/kdferr.h +16 -16
  296. package/vendor/zsign/build/windows/vs2022/include/openssl/macros.h +338 -338
  297. package/vendor/zsign/build/windows/vs2022/include/openssl/md2.h +56 -56
  298. package/vendor/zsign/build/windows/vs2022/include/openssl/md4.h +63 -63
  299. package/vendor/zsign/build/windows/vs2022/include/openssl/md5.h +62 -62
  300. package/vendor/zsign/build/windows/vs2022/include/openssl/mdc2.h +55 -55
  301. package/vendor/zsign/build/windows/vs2022/include/openssl/modes.h +219 -219
  302. package/vendor/zsign/build/windows/vs2022/include/openssl/obj_mac.h +5820 -5820
  303. package/vendor/zsign/build/windows/vs2022/include/openssl/objects.h +184 -184
  304. package/vendor/zsign/build/windows/vs2022/include/openssl/objectserr.h +28 -28
  305. package/vendor/zsign/build/windows/vs2022/include/openssl/ocsperr.h +53 -53
  306. package/vendor/zsign/build/windows/vs2022/include/openssl/opensslconf.h +17 -17
  307. package/vendor/zsign/build/windows/vs2022/include/openssl/ossl_typ.h +16 -16
  308. package/vendor/zsign/build/windows/vs2022/include/openssl/param_build.h +63 -63
  309. package/vendor/zsign/build/windows/vs2022/include/openssl/params.h +160 -160
  310. package/vendor/zsign/build/windows/vs2022/include/openssl/pem.h +543 -543
  311. package/vendor/zsign/build/windows/vs2022/include/openssl/pem2.h +19 -19
  312. package/vendor/zsign/build/windows/vs2022/include/openssl/pemerr.h +58 -58
  313. package/vendor/zsign/build/windows/vs2022/include/openssl/pkcs12err.h +46 -46
  314. package/vendor/zsign/build/windows/vs2022/include/openssl/pkcs7err.h +63 -63
  315. package/vendor/zsign/build/windows/vs2022/include/openssl/prov_ssl.h +38 -38
  316. package/vendor/zsign/build/windows/vs2022/include/openssl/proverr.h +162 -162
  317. package/vendor/zsign/build/windows/vs2022/include/openssl/provider.h +66 -66
  318. package/vendor/zsign/build/windows/vs2022/include/openssl/quic.h +70 -70
  319. package/vendor/zsign/build/windows/vs2022/include/openssl/rand.h +125 -125
  320. package/vendor/zsign/build/windows/vs2022/include/openssl/randerr.h +69 -69
  321. package/vendor/zsign/build/windows/vs2022/include/openssl/rc2.h +68 -68
  322. package/vendor/zsign/build/windows/vs2022/include/openssl/rc4.h +47 -47
  323. package/vendor/zsign/build/windows/vs2022/include/openssl/rc5.h +79 -79
  324. package/vendor/zsign/build/windows/vs2022/include/openssl/ripemd.h +59 -59
  325. package/vendor/zsign/build/windows/vs2022/include/openssl/rsa.h +615 -615
  326. package/vendor/zsign/build/windows/vs2022/include/openssl/rsaerr.h +107 -107
  327. package/vendor/zsign/build/windows/vs2022/include/openssl/seed.h +113 -113
  328. package/vendor/zsign/build/windows/vs2022/include/openssl/self_test.h +98 -98
  329. package/vendor/zsign/build/windows/vs2022/include/openssl/sha.h +139 -139
  330. package/vendor/zsign/build/windows/vs2022/include/openssl/srtp.h +68 -68
  331. package/vendor/zsign/build/windows/vs2022/include/openssl/ssl2.h +30 -30
  332. package/vendor/zsign/build/windows/vs2022/include/openssl/ssl3.h +357 -357
  333. package/vendor/zsign/build/windows/vs2022/include/openssl/sslerr.h +379 -379
  334. package/vendor/zsign/build/windows/vs2022/include/openssl/sslerr_legacy.h +467 -467
  335. package/vendor/zsign/build/windows/vs2022/include/openssl/stack.h +90 -90
  336. package/vendor/zsign/build/windows/vs2022/include/openssl/store.h +377 -377
  337. package/vendor/zsign/build/windows/vs2022/include/openssl/storeerr.h +49 -49
  338. package/vendor/zsign/build/windows/vs2022/include/openssl/symhacks.h +39 -39
  339. package/vendor/zsign/build/windows/vs2022/include/openssl/thread.h +31 -31
  340. package/vendor/zsign/build/windows/vs2022/include/openssl/tls1.h +1220 -1220
  341. package/vendor/zsign/build/windows/vs2022/include/openssl/trace.h +320 -320
  342. package/vendor/zsign/build/windows/vs2022/include/openssl/ts.h +522 -522
  343. package/vendor/zsign/build/windows/vs2022/include/openssl/tserr.h +67 -67
  344. package/vendor/zsign/build/windows/vs2022/include/openssl/txt_db.h +63 -63
  345. package/vendor/zsign/build/windows/vs2022/include/openssl/types.h +245 -245
  346. package/vendor/zsign/build/windows/vs2022/include/openssl/uierr.h +38 -38
  347. package/vendor/zsign/build/windows/vs2022/include/openssl/whrlpool.h +62 -62
  348. package/vendor/zsign/build/windows/vs2022/include/openssl/x509err.h +70 -70
  349. package/vendor/zsign/build/windows/vs2022/include/openssl/x509v3err.h +96 -96
  350. package/vendor/zsign/src/archo.cpp +742 -742
  351. package/vendor/zsign/src/archo.h +61 -61
  352. package/vendor/zsign/src/bundle.cpp +589 -589
  353. package/vendor/zsign/src/bundle.h +46 -46
  354. package/vendor/zsign/src/common/archive.cpp +246 -246
  355. package/vendor/zsign/src/common/archive.h +22 -22
  356. package/vendor/zsign/src/common/common.h +56 -56
  357. package/vendor/zsign/src/common/fs.cpp +573 -573
  358. package/vendor/zsign/src/common/fs.h +50 -50
  359. package/vendor/zsign/src/common/log.cpp +145 -145
  360. package/vendor/zsign/src/common/log.h +37 -37
  361. package/vendor/zsign/src/common/mach-o.h +585 -585
  362. package/vendor/zsign/src/common/sha.cpp +133 -133
  363. package/vendor/zsign/src/common/sha.h +24 -24
  364. package/vendor/zsign/src/common/timer.cpp +28 -28
  365. package/vendor/zsign/src/common/timer.h +17 -17
  366. package/vendor/zsign/src/common/util.cpp +185 -185
  367. package/vendor/zsign/src/common/util.h +25 -25
  368. package/vendor/zsign/src/macho.cpp +273 -273
  369. package/vendor/zsign/src/macho.h +38 -38
  370. package/vendor/zsign/src/openssl.cpp +698 -698
  371. package/vendor/zsign/src/openssl.h +71 -71
  372. package/vendor/zsign/src/signing.cpp +745 -745
  373. package/vendor/zsign/src/signing.h +59 -59
  374. package/vendor/zsign/src/zsign.cpp +317 -317
  375. package/vendor/zsign/test/dylib/demo/Makefile +12 -12
  376. package/vendor/zsign/test/dylib/demo/control +9 -9
  377. package/vendor/zsign/test/dylib/demo/demo.m +21 -21
  378. package/vendor/zsign/test/linux/test.sh +19 -19
  379. package/vendor/zsign/test/macos/test.sh +19 -19
@@ -1,867 +1,867 @@
1
- $! make libz under VMS written by
2
- $! Martin P.J. Zinser
3
- $!
4
- $! In case of problems with the install you might contact me at
5
- $! zinser@zinser.no-ip.info(preferred) or
6
- $! martin.zinser@eurexchange.com (work)
7
- $!
8
- $! Make procedure history for Zlib
9
- $!
10
- $!------------------------------------------------------------------------------
11
- $! Version history
12
- $! 0.01 20060120 First version to receive a number
13
- $! 0.02 20061008 Adapt to new Makefile.in
14
- $! 0.03 20091224 Add support for large file check
15
- $! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite
16
- $! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in
17
- $! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new examples
18
- $! subdir path, update module search in makefile.in
19
- $! 0.07 20120115 Triggered by work done by Alexey Chupahin completely redesigned
20
- $! shared image creation
21
- $! 0.08 20120219 Make it work on VAX again, pre-load missing symbols to shared
22
- $! image
23
- $! 0.09 20120305 SMS. P1 sets builder ("MMK", "MMS", " " (built-in)).
24
- $! "" -> automatic, preference: MMK, MMS, built-in.
25
- $!
26
- $ on error then goto err_exit
27
- $!
28
- $ true = 1
29
- $ false = 0
30
- $ tmpnam = "temp_" + f$getjpi("","pid")
31
- $ tt = tmpnam + ".txt"
32
- $ tc = tmpnam + ".c"
33
- $ th = tmpnam + ".h"
34
- $ define/nolog tconfig 'th'
35
- $ its_decc = false
36
- $ its_vaxc = false
37
- $ its_gnuc = false
38
- $ s_case = False
39
- $!
40
- $! Setup variables holding "config" information
41
- $!
42
- $ Make = "''p1'"
43
- $ name = "Zlib"
44
- $ version = "?.?.?"
45
- $ v_string = "ZLIB_VERSION"
46
- $ v_file = "zlib.h"
47
- $ ccopt = "/include = []"
48
- $ lopts = ""
49
- $ dnsrl = ""
50
- $ aconf_in_file = "zconf.h.in#zconf.h_in#zconf_h.in"
51
- $ conf_check_string = ""
52
- $ linkonly = false
53
- $ optfile = name + ".opt"
54
- $ mapfile = name + ".map"
55
- $ libdefs = ""
56
- $ vax = f$getsyi("HW_MODEL").lt.1024
57
- $ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096
58
- $ ia64 = f$getsyi("HW_MODEL").ge.4096
59
- $!
60
- $! 2012-03-05 SMS.
61
- $! Why is this needed? And if it is needed, why not simply ".not. vax"?
62
- $!
63
- $!!! if axp .or. ia64 then set proc/parse=extended
64
- $!
65
- $ whoami = f$parse(f$environment("Procedure"),,,,"NO_CONCEAL")
66
- $ mydef = F$parse(whoami,,,"DEVICE")
67
- $ mydir = f$parse(whoami,,,"DIRECTORY") - "]["
68
- $ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type")
69
- $!
70
- $! Check for MMK/MMS
71
- $!
72
- $ if (Make .eqs. "")
73
- $ then
74
- $ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
75
- $ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
76
- $ else
77
- $ Make = f$edit( Make, "trim")
78
- $ endif
79
- $!
80
- $ gosub find_version
81
- $!
82
- $ open/write topt tmp.opt
83
- $ open/write optf 'optfile'
84
- $!
85
- $ gosub check_opts
86
- $!
87
- $! Look for the compiler used
88
- $!
89
- $ gosub check_compiler
90
- $ close topt
91
- $ close optf
92
- $!
93
- $ if its_decc
94
- $ then
95
- $ ccopt = "/prefix=all" + ccopt
96
- $ if f$trnlnm("SYS") .eqs. ""
97
- $ then
98
- $ if axp
99
- $ then
100
- $ define sys sys$library:
101
- $ else
102
- $ ccopt = "/decc" + ccopt
103
- $ define sys decc$library_include:
104
- $ endif
105
- $ endif
106
- $!
107
- $! 2012-03-05 SMS.
108
- $! Why /NAMES = AS_IS? Why not simply ".not. vax"? And why not on VAX?
109
- $!
110
- $ if axp .or. ia64
111
- $ then
112
- $ ccopt = ccopt + "/name=as_is/opt=(inline=speed)"
113
- $ s_case = true
114
- $ endif
115
- $ endif
116
- $ if its_vaxc .or. its_gnuc
117
- $ then
118
- $ if f$trnlnm("SYS").eqs."" then define sys sys$library:
119
- $ endif
120
- $!
121
- $! Build a fake configure input header
122
- $!
123
- $ open/write conf_hin config.hin
124
- $ write conf_hin "#undef _LARGEFILE64_SOURCE"
125
- $ close conf_hin
126
- $!
127
- $!
128
- $ i = 0
129
- $FIND_ACONF:
130
- $ fname = f$element(i,"#",aconf_in_file)
131
- $ if fname .eqs. "#" then goto AMISS_ERR
132
- $ if f$search(fname) .eqs. ""
133
- $ then
134
- $ i = i + 1
135
- $ goto find_aconf
136
- $ endif
137
- $ open/read/err=aconf_err aconf_in 'fname'
138
- $ open/write aconf zconf.h
139
- $ACONF_LOOP:
140
- $ read/end_of_file=aconf_exit aconf_in line
141
- $ work = f$edit(line, "compress,trim")
142
- $ if f$extract(0,6,work) .nes. "#undef"
143
- $ then
144
- $ if f$extract(0,12,work) .nes. "#cmakedefine"
145
- $ then
146
- $ write aconf line
147
- $ endif
148
- $ else
149
- $ cdef = f$element(1," ",work)
150
- $ gosub check_config
151
- $ endif
152
- $ goto aconf_loop
153
- $ACONF_EXIT:
154
- $ write aconf ""
155
- $ write aconf "/* VMS specifics added by make_vms.com: */"
156
- $ write aconf "#define VMS 1"
157
- $ write aconf "#include <unistd.h>"
158
- $ write aconf "#include <unixio.h>"
159
- $ write aconf "#ifdef _LARGEFILE"
160
- $ write aconf "# define off64_t __off64_t"
161
- $ write aconf "# define fopen64 fopen"
162
- $ write aconf "# define fseeko64 fseeko"
163
- $ write aconf "# define lseek64 lseek"
164
- $ write aconf "# define ftello64 ftell"
165
- $ write aconf "#endif"
166
- $ write aconf "#if !defined( __VAX) && (__CRTL_VER >= 70312000)"
167
- $ write aconf "# define HAVE_VSNPRINTF"
168
- $ write aconf "#endif"
169
- $ close aconf_in
170
- $ close aconf
171
- $ if f$search("''th'") .nes. "" then delete 'th';*
172
- $! Build the thing plain or with mms
173
- $!
174
- $ write sys$output "Compiling Zlib sources ..."
175
- $ if make.eqs.""
176
- $ then
177
- $ if (f$search( "example.obj;*") .nes. "") then delete example.obj;*
178
- $ if (f$search( "minigzip.obj;*") .nes. "") then delete minigzip.obj;*
179
- $ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" -
180
- adler32.c zlib.h zconf.h
181
- $ CALL MAKE compress.OBJ "CC ''CCOPT' compress" -
182
- compress.c zlib.h zconf.h
183
- $ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" -
184
- crc32.c zlib.h zconf.h
185
- $ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" -
186
- deflate.c deflate.h zutil.h zlib.h zconf.h
187
- $ CALL MAKE gzclose.OBJ "CC ''CCOPT' gzclose" -
188
- gzclose.c zutil.h zlib.h zconf.h
189
- $ CALL MAKE gzlib.OBJ "CC ''CCOPT' gzlib" -
190
- gzlib.c zutil.h zlib.h zconf.h
191
- $ CALL MAKE gzread.OBJ "CC ''CCOPT' gzread" -
192
- gzread.c zutil.h zlib.h zconf.h
193
- $ CALL MAKE gzwrite.OBJ "CC ''CCOPT' gzwrite" -
194
- gzwrite.c zutil.h zlib.h zconf.h
195
- $ CALL MAKE infback.OBJ "CC ''CCOPT' infback" -
196
- infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
197
- $ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" -
198
- inffast.c zutil.h zlib.h zconf.h inffast.h
199
- $ CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" -
200
- inflate.c zutil.h zlib.h zconf.h infblock.h
201
- $ CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" -
202
- inftrees.c zutil.h zlib.h zconf.h inftrees.h
203
- $ CALL MAKE trees.OBJ "CC ''CCOPT' trees" -
204
- trees.c deflate.h zutil.h zlib.h zconf.h
205
- $ CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" -
206
- uncompr.c zlib.h zconf.h
207
- $ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" -
208
- zutil.c zutil.h zlib.h zconf.h
209
- $ write sys$output "Building Zlib ..."
210
- $ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ
211
- $ write sys$output "Building example..."
212
- $ CALL MAKE example.OBJ "CC ''CCOPT' [.test]example" -
213
- [.test]example.c zlib.h zconf.h
214
- $ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
215
- $ write sys$output "Building minigzip..."
216
- $ CALL MAKE minigzip.OBJ "CC ''CCOPT' [.test]minigzip" -
217
- [.test]minigzip.c zlib.h zconf.h
218
- $ call make minigzip.exe -
219
- "LINK minigzip,libz.olb/lib" -
220
- minigzip.obj libz.olb
221
- $ else
222
- $ gosub crea_mms
223
- $ write sys$output "Make ''name' ''version' with ''Make' "
224
- $ 'make'
225
- $ endif
226
- $!
227
- $! Create shareable image
228
- $!
229
- $ gosub crea_olist
230
- $ write sys$output "Creating libzshr.exe"
231
- $ call map_2_shopt 'mapfile' 'optfile'
232
- $ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,'optfile'/opt
233
- $ write sys$output "Zlib build completed"
234
- $ delete/nolog tmp.opt;*
235
- $ exit
236
- $AMISS_ERR:
237
- $ write sys$output "No source for config.hin found."
238
- $ write sys$output "Tried any of ''aconf_in_file'"
239
- $ goto err_exit
240
- $CC_ERR:
241
- $ write sys$output "C compiler required to build ''name'"
242
- $ goto err_exit
243
- $ERR_EXIT:
244
- $ set message/facil/ident/sever/text
245
- $ close/nolog optf
246
- $ close/nolog topt
247
- $ close/nolog aconf_in
248
- $ close/nolog aconf
249
- $ close/nolog out
250
- $ close/nolog min
251
- $ close/nolog mod
252
- $ close/nolog h_in
253
- $ write sys$output "Exiting..."
254
- $ exit 2
255
- $!
256
- $!
257
- $MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
258
- $ V = 'F$Verify(0)
259
- $! P1 = What we are trying to make
260
- $! P2 = Command to make it
261
- $! P3 - P8 What it depends on
262
- $
263
- $ If F$Search(P1) .Eqs. "" Then Goto Makeit
264
- $ Time = F$CvTime(F$File(P1,"RDT"))
265
- $arg=3
266
- $Loop:
267
- $ Argument = P'arg
268
- $ If Argument .Eqs. "" Then Goto Exit
269
- $ El=0
270
- $Loop2:
271
- $ File = F$Element(El," ",Argument)
272
- $ If File .Eqs. " " Then Goto Endl
273
- $ AFile = ""
274
- $Loop3:
275
- $ OFile = AFile
276
- $ AFile = F$Search(File)
277
- $ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
278
- $ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
279
- $ Goto Loop3
280
- $NextEL:
281
- $ El = El + 1
282
- $ Goto Loop2
283
- $EndL:
284
- $ arg=arg+1
285
- $ If arg .Le. 8 Then Goto Loop
286
- $ Goto Exit
287
- $
288
- $Makeit:
289
- $ VV=F$VERIFY(0)
290
- $ write sys$output P2
291
- $ 'P2
292
- $ VV='F$Verify(VV)
293
- $Exit:
294
- $ If V Then Set Verify
295
- $ENDSUBROUTINE
296
- $!------------------------------------------------------------------------------
297
- $!
298
- $! Check command line options and set symbols accordingly
299
- $!
300
- $!------------------------------------------------------------------------------
301
- $! Version history
302
- $! 0.01 20041206 First version to receive a number
303
- $! 0.02 20060126 Add new "HELP" target
304
- $ CHECK_OPTS:
305
- $ i = 1
306
- $ OPT_LOOP:
307
- $ if i .lt. 9
308
- $ then
309
- $ cparm = f$edit(p'i',"upcase")
310
- $!
311
- $! Check if parameter actually contains something
312
- $!
313
- $ if f$edit(cparm,"trim") .nes. ""
314
- $ then
315
- $ if cparm .eqs. "DEBUG"
316
- $ then
317
- $ ccopt = ccopt + "/noopt/deb"
318
- $ lopts = lopts + "/deb"
319
- $ endif
320
- $ if f$locate("CCOPT=",cparm) .lt. f$length(cparm)
321
- $ then
322
- $ start = f$locate("=",cparm) + 1
323
- $ len = f$length(cparm) - start
324
- $ ccopt = ccopt + f$extract(start,len,cparm)
325
- $ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) -
326
- then s_case = true
327
- $ endif
328
- $ if cparm .eqs. "LINK" then linkonly = true
329
- $ if f$locate("LOPTS=",cparm) .lt. f$length(cparm)
330
- $ then
331
- $ start = f$locate("=",cparm) + 1
332
- $ len = f$length(cparm) - start
333
- $ lopts = lopts + f$extract(start,len,cparm)
334
- $ endif
335
- $ if f$locate("CC=",cparm) .lt. f$length(cparm)
336
- $ then
337
- $ start = f$locate("=",cparm) + 1
338
- $ len = f$length(cparm) - start
339
- $ cc_com = f$extract(start,len,cparm)
340
- if (cc_com .nes. "DECC") .and. -
341
- (cc_com .nes. "VAXC") .and. -
342
- (cc_com .nes. "GNUC")
343
- $ then
344
- $ write sys$output "Unsupported compiler choice ''cc_com' ignored"
345
- $ write sys$output "Use DECC, VAXC, or GNUC instead"
346
- $ else
347
- $ if cc_com .eqs. "DECC" then its_decc = true
348
- $ if cc_com .eqs. "VAXC" then its_vaxc = true
349
- $ if cc_com .eqs. "GNUC" then its_gnuc = true
350
- $ endif
351
- $ endif
352
- $ if f$locate("MAKE=",cparm) .lt. f$length(cparm)
353
- $ then
354
- $ start = f$locate("=",cparm) + 1
355
- $ len = f$length(cparm) - start
356
- $ mmks = f$extract(start,len,cparm)
357
- $ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS")
358
- $ then
359
- $ make = mmks
360
- $ else
361
- $ write sys$output "Unsupported make choice ''mmks' ignored"
362
- $ write sys$output "Use MMK or MMS instead"
363
- $ endif
364
- $ endif
365
- $ if cparm .eqs. "HELP" then gosub bhelp
366
- $ endif
367
- $ i = i + 1
368
- $ goto opt_loop
369
- $ endif
370
- $ return
371
- $!------------------------------------------------------------------------------
372
- $!
373
- $! Look for the compiler used
374
- $!
375
- $! Version history
376
- $! 0.01 20040223 First version to receive a number
377
- $! 0.02 20040229 Save/set value of decc$no_rooted_search_lists
378
- $! 0.03 20060202 Extend handling of GNU C
379
- $! 0.04 20090402 Compaq -> hp
380
- $CHECK_COMPILER:
381
- $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
382
- $ then
383
- $ its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "")
384
- $ its_vaxc = .not. its_decc .and. (F$Search("SYS$System:VAXC.Exe") .nes. "")
385
- $ its_gnuc = .not. (its_decc .or. its_vaxc) .and. (f$trnlnm("gnu_cc") .nes. "")
386
- $ endif
387
- $!
388
- $! Exit if no compiler available
389
- $!
390
- $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
391
- $ then goto CC_ERR
392
- $ else
393
- $ if its_decc
394
- $ then
395
- $ write sys$output "CC compiler check ... hp C"
396
- $ if f$trnlnm("decc$no_rooted_search_lists") .nes. ""
397
- $ then
398
- $ dnrsl = f$trnlnm("decc$no_rooted_search_lists")
399
- $ endif
400
- $ define/nolog decc$no_rooted_search_lists 1
401
- $ else
402
- $ if its_vaxc then write sys$output "CC compiler check ... VAX C"
403
- $ if its_gnuc
404
- $ then
405
- $ write sys$output "CC compiler check ... GNU C"
406
- $ if f$trnlnm(topt) then write topt "gnu_cc:[000000]gcclib.olb/lib"
407
- $ if f$trnlnm(optf) then write optf "gnu_cc:[000000]gcclib.olb/lib"
408
- $ cc = "gcc"
409
- $ endif
410
- $ if f$trnlnm(topt) then write topt "sys$share:vaxcrtl.exe/share"
411
- $ if f$trnlnm(optf) then write optf "sys$share:vaxcrtl.exe/share"
412
- $ endif
413
- $ endif
414
- $ return
415
- $!------------------------------------------------------------------------------
416
- $!
417
- $! If MMS/MMK are available dump out the descrip.mms if required
418
- $!
419
- $CREA_MMS:
420
- $ write sys$output "Creating descrip.mms..."
421
- $ create descrip.mms
422
- $ open/append out descrip.mms
423
- $ copy sys$input: out
424
- $ deck
425
- # descrip.mms: MMS description file for building zlib on VMS
426
- # written by Martin P.J. Zinser
427
- # <zinser@zinser.no-ip.info or martin.zinser@eurexchange.com>
428
-
429
- OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\
430
- gzread.obj, gzwrite.obj, uncompr.obj, infback.obj\
431
- deflate.obj, trees.obj, zutil.obj, inflate.obj, \
432
- inftrees.obj, inffast.obj
433
-
434
- $ eod
435
- $ write out "CFLAGS=", ccopt
436
- $ write out "LOPTS=", lopts
437
- $ write out "all : example.exe minigzip.exe libz.olb"
438
- $ copy sys$input: out
439
- $ deck
440
- @ write sys$output " Example applications available"
441
-
442
- libz.olb : libz.olb($(OBJS))
443
- @ write sys$output " libz available"
444
-
445
- example.exe : example.obj libz.olb
446
- link $(LOPTS) example,libz.olb/lib
447
-
448
- minigzip.exe : minigzip.obj libz.olb
449
- link $(LOPTS) minigzip,libz.olb/lib
450
-
451
- clean :
452
- delete *.obj;*,libz.olb;*,*.opt;*,*.exe;*
453
-
454
-
455
- # Other dependencies.
456
- adler32.obj : adler32.c zutil.h zlib.h zconf.h
457
- compress.obj : compress.c zlib.h zconf.h
458
- crc32.obj : crc32.c zutil.h zlib.h zconf.h
459
- deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h
460
- example.obj : [.test]example.c zlib.h zconf.h
461
- gzclose.obj : gzclose.c zutil.h zlib.h zconf.h
462
- gzlib.obj : gzlib.c zutil.h zlib.h zconf.h
463
- gzread.obj : gzread.c zutil.h zlib.h zconf.h
464
- gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h
465
- inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h
466
- inflate.obj : inflate.c zutil.h zlib.h zconf.h
467
- inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h
468
- minigzip.obj : [.test]minigzip.c zlib.h zconf.h
469
- trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h
470
- uncompr.obj : uncompr.c zlib.h zconf.h
471
- zutil.obj : zutil.c zutil.h zlib.h zconf.h
472
- infback.obj : infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
473
- $ eod
474
- $ close out
475
- $ return
476
- $!------------------------------------------------------------------------------
477
- $!
478
- $! Read list of core library sources from makefile.in and create options
479
- $! needed to build shareable image
480
- $!
481
- $CREA_OLIST:
482
- $ open/read min makefile.in
483
- $ open/write mod modules.opt
484
- $ src_check_list = "OBJZ =#OBJG ="
485
- $MRLOOP:
486
- $ read/end=mrdone min rec
487
- $ i = 0
488
- $SRC_CHECK_LOOP:
489
- $ src_check = f$element(i, "#", src_check_list)
490
- $ i = i+1
491
- $ if src_check .eqs. "#" then goto mrloop
492
- $ if (f$extract(0,6,rec) .nes. src_check) then goto src_check_loop
493
- $ rec = rec - src_check
494
- $ gosub extra_filnam
495
- $ if (f$element(1,"\",rec) .eqs. "\") then goto mrloop
496
- $MRSLOOP:
497
- $ read/end=mrdone min rec
498
- $ gosub extra_filnam
499
- $ if (f$element(1,"\",rec) .nes. "\") then goto mrsloop
500
- $MRDONE:
501
- $ close min
502
- $ close mod
503
- $ return
504
- $!------------------------------------------------------------------------------
505
- $!
506
- $! Take record extracted in crea_olist and split it into single filenames
507
- $!
508
- $EXTRA_FILNAM:
509
- $ myrec = f$edit(rec - "\", "trim,compress")
510
- $ i = 0
511
- $FELOOP:
512
- $ srcfil = f$element(i," ", myrec)
513
- $ if (srcfil .nes. " ")
514
- $ then
515
- $ write mod f$parse(srcfil,,,"NAME"), ".obj"
516
- $ i = i + 1
517
- $ goto feloop
518
- $ endif
519
- $ return
520
- $!------------------------------------------------------------------------------
521
- $!
522
- $! Find current Zlib version number
523
- $!
524
- $FIND_VERSION:
525
- $ open/read h_in 'v_file'
526
- $hloop:
527
- $ read/end=hdone h_in rec
528
- $ rec = f$edit(rec,"TRIM")
529
- $ if (f$extract(0,1,rec) .nes. "#") then goto hloop
530
- $ rec = f$edit(rec - "#", "TRIM")
531
- $ if f$element(0," ",rec) .nes. "define" then goto hloop
532
- $ if f$element(1," ",rec) .eqs. v_string
533
- $ then
534
- $ version = 'f$element(2," ",rec)'
535
- $ goto hdone
536
- $ endif
537
- $ goto hloop
538
- $hdone:
539
- $ close h_in
540
- $ return
541
- $!------------------------------------------------------------------------------
542
- $!
543
- $CHECK_CONFIG:
544
- $!
545
- $ in_ldef = f$locate(cdef,libdefs)
546
- $ if (in_ldef .lt. f$length(libdefs))
547
- $ then
548
- $ write aconf "#define ''cdef' 1"
549
- $ libdefs = f$extract(0,in_ldef,libdefs) + -
550
- f$extract(in_ldef + f$length(cdef) + 1, -
551
- f$length(libdefs) - in_ldef - f$length(cdef) - 1, -
552
- libdefs)
553
- $ else
554
- $ if (f$type('cdef') .eqs. "INTEGER")
555
- $ then
556
- $ write aconf "#define ''cdef' ", 'cdef'
557
- $ else
558
- $ if (f$type('cdef') .eqs. "STRING")
559
- $ then
560
- $ write aconf "#define ''cdef' ", """", '''cdef'', """"
561
- $ else
562
- $ gosub check_cc_def
563
- $ endif
564
- $ endif
565
- $ endif
566
- $ return
567
- $!------------------------------------------------------------------------------
568
- $!
569
- $! Check if this is a define relating to the properties of the C/C++
570
- $! compiler
571
- $!
572
- $ CHECK_CC_DEF:
573
- $ if (cdef .eqs. "_LARGEFILE64_SOURCE")
574
- $ then
575
- $ copy sys$input: 'tc'
576
- $ deck
577
- #include "tconfig"
578
- #define _LARGEFILE
579
- #include <stdio.h>
580
-
581
- int main(){
582
- FILE *fp;
583
- fp = fopen("temp.txt","r");
584
- fseeko(fp,1,SEEK_SET);
585
- fclose(fp);
586
- }
587
-
588
- $ eod
589
- $ test_inv = false
590
- $ comm_h = false
591
- $ gosub cc_prop_check
592
- $ return
593
- $ endif
594
- $ write aconf "/* ", line, " */"
595
- $ return
596
- $!------------------------------------------------------------------------------
597
- $!
598
- $! Check for properties of C/C++ compiler
599
- $!
600
- $! Version history
601
- $! 0.01 20031020 First version to receive a number
602
- $! 0.02 20031022 Added logic for defines with value
603
- $! 0.03 20040309 Make sure local config file gets not deleted
604
- $! 0.04 20041230 Also write include for configure run
605
- $! 0.05 20050103 Add processing of "comment defines"
606
- $CC_PROP_CHECK:
607
- $ cc_prop = true
608
- $ is_need = false
609
- $ is_need = (f$extract(0,4,cdef) .eqs. "NEED") .or. (test_inv .eq. true)
610
- $ if f$search(th) .eqs. "" then create 'th'
611
- $ set message/nofac/noident/nosever/notext
612
- $ on error then continue
613
- $ cc 'tmpnam'
614
- $ if .not. ($status) then cc_prop = false
615
- $ on error then continue
616
- $! The headers might lie about the capabilities of the RTL
617
- $ link 'tmpnam',tmp.opt/opt
618
- $ if .not. ($status) then cc_prop = false
619
- $ set message/fac/ident/sever/text
620
- $ on error then goto err_exit
621
- $ delete/nolog 'tmpnam'.*;*/exclude='th'
622
- $ if (cc_prop .and. .not. is_need) .or. -
623
- (.not. cc_prop .and. is_need)
624
- $ then
625
- $ write sys$output "Checking for ''cdef'... yes"
626
- $ if f$type('cdef_val'_yes) .nes. ""
627
- $ then
628
- $ if f$type('cdef_val'_yes) .eqs. "INTEGER" -
629
- then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_yes)
630
- $ if f$type('cdef_val'_yes) .eqs. "STRING" -
631
- then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_yes)
632
- $ else
633
- $ call write_config f$fao("#define !AS 1",cdef)
634
- $ endif
635
- $ if (cdef .eqs. "HAVE_FSEEKO") .or. (cdef .eqs. "_LARGE_FILES") .or. -
636
- (cdef .eqs. "_LARGEFILE64_SOURCE") then -
637
- call write_config f$string("#define _LARGEFILE 1")
638
- $ else
639
- $ write sys$output "Checking for ''cdef'... no"
640
- $ if (comm_h)
641
- $ then
642
- call write_config f$fao("/* !AS */",line)
643
- $ else
644
- $ if f$type('cdef_val'_no) .nes. ""
645
- $ then
646
- $ if f$type('cdef_val'_no) .eqs. "INTEGER" -
647
- then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_no)
648
- $ if f$type('cdef_val'_no) .eqs. "STRING" -
649
- then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_no)
650
- $ else
651
- $ call write_config f$fao("#undef !AS",cdef)
652
- $ endif
653
- $ endif
654
- $ endif
655
- $ return
656
- $!------------------------------------------------------------------------------
657
- $!
658
- $! Check for properties of C/C++ compiler with multiple result values
659
- $!
660
- $! Version history
661
- $! 0.01 20040127 First version
662
- $! 0.02 20050103 Reconcile changes from cc_prop up to version 0.05
663
- $CC_MPROP_CHECK:
664
- $ cc_prop = true
665
- $ i = 1
666
- $ idel = 1
667
- $ MT_LOOP:
668
- $ if f$type(result_'i') .eqs. "STRING"
669
- $ then
670
- $ set message/nofac/noident/nosever/notext
671
- $ on error then continue
672
- $ cc 'tmpnam'_'i'
673
- $ if .not. ($status) then cc_prop = false
674
- $ on error then continue
675
- $! The headers might lie about the capabilities of the RTL
676
- $ link 'tmpnam'_'i',tmp.opt/opt
677
- $ if .not. ($status) then cc_prop = false
678
- $ set message/fac/ident/sever/text
679
- $ on error then goto err_exit
680
- $ delete/nolog 'tmpnam'_'i'.*;*
681
- $ if (cc_prop)
682
- $ then
683
- $ write sys$output "Checking for ''cdef'... ", mdef_'i'
684
- $ if f$type(mdef_'i') .eqs. "INTEGER" -
685
- then call write_config f$fao("#define !AS !UL",cdef,mdef_'i')
686
- $ if f$type('cdef_val'_yes) .eqs. "STRING" -
687
- then call write_config f$fao("#define !AS !AS",cdef,mdef_'i')
688
- $ goto msym_clean
689
- $ else
690
- $ i = i + 1
691
- $ goto mt_loop
692
- $ endif
693
- $ endif
694
- $ write sys$output "Checking for ''cdef'... no"
695
- $ call write_config f$fao("#undef !AS",cdef)
696
- $ MSYM_CLEAN:
697
- $ if (idel .le. msym_max)
698
- $ then
699
- $ delete/sym mdef_'idel'
700
- $ idel = idel + 1
701
- $ goto msym_clean
702
- $ endif
703
- $ return
704
- $!------------------------------------------------------------------------------
705
- $!
706
- $! Write configuration to both permanent and temporary config file
707
- $!
708
- $! Version history
709
- $! 0.01 20031029 First version to receive a number
710
- $!
711
- $WRITE_CONFIG: SUBROUTINE
712
- $ write aconf 'p1'
713
- $ open/append confh 'th'
714
- $ write confh 'p1'
715
- $ close confh
716
- $ENDSUBROUTINE
717
- $!------------------------------------------------------------------------------
718
- $!
719
- $! Analyze the project map file and create the symbol vector for a shareable
720
- $! image from it
721
- $!
722
- $! Version history
723
- $! 0.01 20120128 First version
724
- $! 0.02 20120226 Add pre-load logic
725
- $!
726
- $ MAP_2_SHOPT: Subroutine
727
- $!
728
- $ SAY := "WRITE_ SYS$OUTPUT"
729
- $!
730
- $ IF F$SEARCH("''P1'") .EQS. ""
731
- $ THEN
732
- $ SAY "MAP_2_SHOPT-E-NOSUCHFILE: Error, inputfile ''p1' not available"
733
- $ goto exit_m2s
734
- $ ENDIF
735
- $ IF "''P2'" .EQS. ""
736
- $ THEN
737
- $ SAY "MAP_2_SHOPT: Error, no output file provided"
738
- $ goto exit_m2s
739
- $ ENDIF
740
- $!
741
- $ module1 = "deflate#deflateEnd#deflateInit_#deflateParams#deflateSetDictionary"
742
- $ module2 = "gzclose#gzerror#gzgetc#gzgets#gzopen#gzprintf#gzputc#gzputs#gzread"
743
- $ module3 = "gzseek#gztell#inflate#inflateEnd#inflateInit_#inflateSetDictionary"
744
- $ module4 = "inflateSync#uncompress#zlibVersion#compress"
745
- $ open/read map 'p1
746
- $ if axp .or. ia64
747
- $ then
748
- $ open/write aopt a.opt
749
- $ open/write bopt b.opt
750
- $ write aopt " CASE_SENSITIVE=YES"
751
- $ write bopt "SYMBOL_VECTOR= (-"
752
- $ mod_sym_num = 1
753
- $ MOD_SYM_LOOP:
754
- $ if f$type(module'mod_sym_num') .nes. ""
755
- $ then
756
- $ mod_in = 0
757
- $ MOD_SYM_IN:
758
- $ shared_proc = f$element(mod_in, "#", module'mod_sym_num')
759
- $ if shared_proc .nes. "#"
760
- $ then
761
- $ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",-
762
- f$edit(shared_proc,"upcase"),shared_proc)
763
- $ write bopt f$fao("!AS=PROCEDURE,-",shared_proc)
764
- $ mod_in = mod_in + 1
765
- $ goto mod_sym_in
766
- $ endif
767
- $ mod_sym_num = mod_sym_num + 1
768
- $ goto mod_sym_loop
769
- $ endif
770
- $MAP_LOOP:
771
- $ read/end=map_end map line
772
- $ if (f$locate("{",line).lt. f$length(line)) .or. -
773
- (f$locate("global:", line) .lt. f$length(line))
774
- $ then
775
- $ proc = true
776
- $ goto map_loop
777
- $ endif
778
- $ if f$locate("}",line).lt. f$length(line) then proc = false
779
- $ if f$locate("local:", line) .lt. f$length(line) then proc = false
780
- $ if proc
781
- $ then
782
- $ shared_proc = f$edit(line,"collapse")
783
- $ chop_semi = f$locate(";", shared_proc)
784
- $ if chop_semi .lt. f$length(shared_proc) then -
785
- shared_proc = f$extract(0, chop_semi, shared_proc)
786
- $ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",-
787
- f$edit(shared_proc,"upcase"),shared_proc)
788
- $ write bopt f$fao("!AS=PROCEDURE,-",shared_proc)
789
- $ endif
790
- $ goto map_loop
791
- $MAP_END:
792
- $ close/nolog aopt
793
- $ close/nolog bopt
794
- $ open/append libopt 'p2'
795
- $ open/read aopt a.opt
796
- $ open/read bopt b.opt
797
- $ALOOP:
798
- $ read/end=aloop_end aopt line
799
- $ write libopt line
800
- $ goto aloop
801
- $ALOOP_END:
802
- $ close/nolog aopt
803
- $ sv = ""
804
- $BLOOP:
805
- $ read/end=bloop_end bopt svn
806
- $ if (svn.nes."")
807
- $ then
808
- $ if (sv.nes."") then write libopt sv
809
- $ sv = svn
810
- $ endif
811
- $ goto bloop
812
- $BLOOP_END:
813
- $ write libopt f$extract(0,f$length(sv)-2,sv), "-"
814
- $ write libopt ")"
815
- $ close/nolog bopt
816
- $ delete/nolog/noconf a.opt;*,b.opt;*
817
- $ else
818
- $ if vax
819
- $ then
820
- $ open/append libopt 'p2'
821
- $ mod_sym_num = 1
822
- $ VMOD_SYM_LOOP:
823
- $ if f$type(module'mod_sym_num') .nes. ""
824
- $ then
825
- $ mod_in = 0
826
- $ VMOD_SYM_IN:
827
- $ shared_proc = f$element(mod_in, "#", module'mod_sym_num')
828
- $ if shared_proc .nes. "#"
829
- $ then
830
- $ write libopt f$fao("UNIVERSAL=!AS",-
831
- f$edit(shared_proc,"upcase"))
832
- $ mod_in = mod_in + 1
833
- $ goto vmod_sym_in
834
- $ endif
835
- $ mod_sym_num = mod_sym_num + 1
836
- $ goto vmod_sym_loop
837
- $ endif
838
- $VMAP_LOOP:
839
- $ read/end=vmap_end map line
840
- $ if (f$locate("{",line).lt. f$length(line)) .or. -
841
- (f$locate("global:", line) .lt. f$length(line))
842
- $ then
843
- $ proc = true
844
- $ goto vmap_loop
845
- $ endif
846
- $ if f$locate("}",line).lt. f$length(line) then proc = false
847
- $ if f$locate("local:", line) .lt. f$length(line) then proc = false
848
- $ if proc
849
- $ then
850
- $ shared_proc = f$edit(line,"collapse")
851
- $ chop_semi = f$locate(";", shared_proc)
852
- $ if chop_semi .lt. f$length(shared_proc) then -
853
- shared_proc = f$extract(0, chop_semi, shared_proc)
854
- $ write libopt f$fao("UNIVERSAL=!AS",-
855
- f$edit(shared_proc,"upcase"))
856
- $ endif
857
- $ goto vmap_loop
858
- $VMAP_END:
859
- $ else
860
- $ write sys$output "Unknown Architecture (Not VAX, AXP, or IA64)"
861
- $ write sys$output "No options file created"
862
- $ endif
863
- $ endif
864
- $ EXIT_M2S:
865
- $ close/nolog map
866
- $ close/nolog libopt
867
- $ endsubroutine
1
+ $! make libz under VMS written by
2
+ $! Martin P.J. Zinser
3
+ $!
4
+ $! In case of problems with the install you might contact me at
5
+ $! zinser@zinser.no-ip.info(preferred) or
6
+ $! martin.zinser@eurexchange.com (work)
7
+ $!
8
+ $! Make procedure history for Zlib
9
+ $!
10
+ $!------------------------------------------------------------------------------
11
+ $! Version history
12
+ $! 0.01 20060120 First version to receive a number
13
+ $! 0.02 20061008 Adapt to new Makefile.in
14
+ $! 0.03 20091224 Add support for large file check
15
+ $! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite
16
+ $! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in
17
+ $! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new examples
18
+ $! subdir path, update module search in makefile.in
19
+ $! 0.07 20120115 Triggered by work done by Alexey Chupahin completely redesigned
20
+ $! shared image creation
21
+ $! 0.08 20120219 Make it work on VAX again, pre-load missing symbols to shared
22
+ $! image
23
+ $! 0.09 20120305 SMS. P1 sets builder ("MMK", "MMS", " " (built-in)).
24
+ $! "" -> automatic, preference: MMK, MMS, built-in.
25
+ $!
26
+ $ on error then goto err_exit
27
+ $!
28
+ $ true = 1
29
+ $ false = 0
30
+ $ tmpnam = "temp_" + f$getjpi("","pid")
31
+ $ tt = tmpnam + ".txt"
32
+ $ tc = tmpnam + ".c"
33
+ $ th = tmpnam + ".h"
34
+ $ define/nolog tconfig 'th'
35
+ $ its_decc = false
36
+ $ its_vaxc = false
37
+ $ its_gnuc = false
38
+ $ s_case = False
39
+ $!
40
+ $! Setup variables holding "config" information
41
+ $!
42
+ $ Make = "''p1'"
43
+ $ name = "Zlib"
44
+ $ version = "?.?.?"
45
+ $ v_string = "ZLIB_VERSION"
46
+ $ v_file = "zlib.h"
47
+ $ ccopt = "/include = []"
48
+ $ lopts = ""
49
+ $ dnsrl = ""
50
+ $ aconf_in_file = "zconf.h.in#zconf.h_in#zconf_h.in"
51
+ $ conf_check_string = ""
52
+ $ linkonly = false
53
+ $ optfile = name + ".opt"
54
+ $ mapfile = name + ".map"
55
+ $ libdefs = ""
56
+ $ vax = f$getsyi("HW_MODEL").lt.1024
57
+ $ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096
58
+ $ ia64 = f$getsyi("HW_MODEL").ge.4096
59
+ $!
60
+ $! 2012-03-05 SMS.
61
+ $! Why is this needed? And if it is needed, why not simply ".not. vax"?
62
+ $!
63
+ $!!! if axp .or. ia64 then set proc/parse=extended
64
+ $!
65
+ $ whoami = f$parse(f$environment("Procedure"),,,,"NO_CONCEAL")
66
+ $ mydef = F$parse(whoami,,,"DEVICE")
67
+ $ mydir = f$parse(whoami,,,"DIRECTORY") - "]["
68
+ $ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type")
69
+ $!
70
+ $! Check for MMK/MMS
71
+ $!
72
+ $ if (Make .eqs. "")
73
+ $ then
74
+ $ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
75
+ $ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
76
+ $ else
77
+ $ Make = f$edit( Make, "trim")
78
+ $ endif
79
+ $!
80
+ $ gosub find_version
81
+ $!
82
+ $ open/write topt tmp.opt
83
+ $ open/write optf 'optfile'
84
+ $!
85
+ $ gosub check_opts
86
+ $!
87
+ $! Look for the compiler used
88
+ $!
89
+ $ gosub check_compiler
90
+ $ close topt
91
+ $ close optf
92
+ $!
93
+ $ if its_decc
94
+ $ then
95
+ $ ccopt = "/prefix=all" + ccopt
96
+ $ if f$trnlnm("SYS") .eqs. ""
97
+ $ then
98
+ $ if axp
99
+ $ then
100
+ $ define sys sys$library:
101
+ $ else
102
+ $ ccopt = "/decc" + ccopt
103
+ $ define sys decc$library_include:
104
+ $ endif
105
+ $ endif
106
+ $!
107
+ $! 2012-03-05 SMS.
108
+ $! Why /NAMES = AS_IS? Why not simply ".not. vax"? And why not on VAX?
109
+ $!
110
+ $ if axp .or. ia64
111
+ $ then
112
+ $ ccopt = ccopt + "/name=as_is/opt=(inline=speed)"
113
+ $ s_case = true
114
+ $ endif
115
+ $ endif
116
+ $ if its_vaxc .or. its_gnuc
117
+ $ then
118
+ $ if f$trnlnm("SYS").eqs."" then define sys sys$library:
119
+ $ endif
120
+ $!
121
+ $! Build a fake configure input header
122
+ $!
123
+ $ open/write conf_hin config.hin
124
+ $ write conf_hin "#undef _LARGEFILE64_SOURCE"
125
+ $ close conf_hin
126
+ $!
127
+ $!
128
+ $ i = 0
129
+ $FIND_ACONF:
130
+ $ fname = f$element(i,"#",aconf_in_file)
131
+ $ if fname .eqs. "#" then goto AMISS_ERR
132
+ $ if f$search(fname) .eqs. ""
133
+ $ then
134
+ $ i = i + 1
135
+ $ goto find_aconf
136
+ $ endif
137
+ $ open/read/err=aconf_err aconf_in 'fname'
138
+ $ open/write aconf zconf.h
139
+ $ACONF_LOOP:
140
+ $ read/end_of_file=aconf_exit aconf_in line
141
+ $ work = f$edit(line, "compress,trim")
142
+ $ if f$extract(0,6,work) .nes. "#undef"
143
+ $ then
144
+ $ if f$extract(0,12,work) .nes. "#cmakedefine"
145
+ $ then
146
+ $ write aconf line
147
+ $ endif
148
+ $ else
149
+ $ cdef = f$element(1," ",work)
150
+ $ gosub check_config
151
+ $ endif
152
+ $ goto aconf_loop
153
+ $ACONF_EXIT:
154
+ $ write aconf ""
155
+ $ write aconf "/* VMS specifics added by make_vms.com: */"
156
+ $ write aconf "#define VMS 1"
157
+ $ write aconf "#include <unistd.h>"
158
+ $ write aconf "#include <unixio.h>"
159
+ $ write aconf "#ifdef _LARGEFILE"
160
+ $ write aconf "# define off64_t __off64_t"
161
+ $ write aconf "# define fopen64 fopen"
162
+ $ write aconf "# define fseeko64 fseeko"
163
+ $ write aconf "# define lseek64 lseek"
164
+ $ write aconf "# define ftello64 ftell"
165
+ $ write aconf "#endif"
166
+ $ write aconf "#if !defined( __VAX) && (__CRTL_VER >= 70312000)"
167
+ $ write aconf "# define HAVE_VSNPRINTF"
168
+ $ write aconf "#endif"
169
+ $ close aconf_in
170
+ $ close aconf
171
+ $ if f$search("''th'") .nes. "" then delete 'th';*
172
+ $! Build the thing plain or with mms
173
+ $!
174
+ $ write sys$output "Compiling Zlib sources ..."
175
+ $ if make.eqs.""
176
+ $ then
177
+ $ if (f$search( "example.obj;*") .nes. "") then delete example.obj;*
178
+ $ if (f$search( "minigzip.obj;*") .nes. "") then delete minigzip.obj;*
179
+ $ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" -
180
+ adler32.c zlib.h zconf.h
181
+ $ CALL MAKE compress.OBJ "CC ''CCOPT' compress" -
182
+ compress.c zlib.h zconf.h
183
+ $ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" -
184
+ crc32.c zlib.h zconf.h
185
+ $ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" -
186
+ deflate.c deflate.h zutil.h zlib.h zconf.h
187
+ $ CALL MAKE gzclose.OBJ "CC ''CCOPT' gzclose" -
188
+ gzclose.c zutil.h zlib.h zconf.h
189
+ $ CALL MAKE gzlib.OBJ "CC ''CCOPT' gzlib" -
190
+ gzlib.c zutil.h zlib.h zconf.h
191
+ $ CALL MAKE gzread.OBJ "CC ''CCOPT' gzread" -
192
+ gzread.c zutil.h zlib.h zconf.h
193
+ $ CALL MAKE gzwrite.OBJ "CC ''CCOPT' gzwrite" -
194
+ gzwrite.c zutil.h zlib.h zconf.h
195
+ $ CALL MAKE infback.OBJ "CC ''CCOPT' infback" -
196
+ infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
197
+ $ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" -
198
+ inffast.c zutil.h zlib.h zconf.h inffast.h
199
+ $ CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" -
200
+ inflate.c zutil.h zlib.h zconf.h infblock.h
201
+ $ CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" -
202
+ inftrees.c zutil.h zlib.h zconf.h inftrees.h
203
+ $ CALL MAKE trees.OBJ "CC ''CCOPT' trees" -
204
+ trees.c deflate.h zutil.h zlib.h zconf.h
205
+ $ CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" -
206
+ uncompr.c zlib.h zconf.h
207
+ $ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" -
208
+ zutil.c zutil.h zlib.h zconf.h
209
+ $ write sys$output "Building Zlib ..."
210
+ $ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ
211
+ $ write sys$output "Building example..."
212
+ $ CALL MAKE example.OBJ "CC ''CCOPT' [.test]example" -
213
+ [.test]example.c zlib.h zconf.h
214
+ $ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
215
+ $ write sys$output "Building minigzip..."
216
+ $ CALL MAKE minigzip.OBJ "CC ''CCOPT' [.test]minigzip" -
217
+ [.test]minigzip.c zlib.h zconf.h
218
+ $ call make minigzip.exe -
219
+ "LINK minigzip,libz.olb/lib" -
220
+ minigzip.obj libz.olb
221
+ $ else
222
+ $ gosub crea_mms
223
+ $ write sys$output "Make ''name' ''version' with ''Make' "
224
+ $ 'make'
225
+ $ endif
226
+ $!
227
+ $! Create shareable image
228
+ $!
229
+ $ gosub crea_olist
230
+ $ write sys$output "Creating libzshr.exe"
231
+ $ call map_2_shopt 'mapfile' 'optfile'
232
+ $ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,'optfile'/opt
233
+ $ write sys$output "Zlib build completed"
234
+ $ delete/nolog tmp.opt;*
235
+ $ exit
236
+ $AMISS_ERR:
237
+ $ write sys$output "No source for config.hin found."
238
+ $ write sys$output "Tried any of ''aconf_in_file'"
239
+ $ goto err_exit
240
+ $CC_ERR:
241
+ $ write sys$output "C compiler required to build ''name'"
242
+ $ goto err_exit
243
+ $ERR_EXIT:
244
+ $ set message/facil/ident/sever/text
245
+ $ close/nolog optf
246
+ $ close/nolog topt
247
+ $ close/nolog aconf_in
248
+ $ close/nolog aconf
249
+ $ close/nolog out
250
+ $ close/nolog min
251
+ $ close/nolog mod
252
+ $ close/nolog h_in
253
+ $ write sys$output "Exiting..."
254
+ $ exit 2
255
+ $!
256
+ $!
257
+ $MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
258
+ $ V = 'F$Verify(0)
259
+ $! P1 = What we are trying to make
260
+ $! P2 = Command to make it
261
+ $! P3 - P8 What it depends on
262
+ $
263
+ $ If F$Search(P1) .Eqs. "" Then Goto Makeit
264
+ $ Time = F$CvTime(F$File(P1,"RDT"))
265
+ $arg=3
266
+ $Loop:
267
+ $ Argument = P'arg
268
+ $ If Argument .Eqs. "" Then Goto Exit
269
+ $ El=0
270
+ $Loop2:
271
+ $ File = F$Element(El," ",Argument)
272
+ $ If File .Eqs. " " Then Goto Endl
273
+ $ AFile = ""
274
+ $Loop3:
275
+ $ OFile = AFile
276
+ $ AFile = F$Search(File)
277
+ $ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
278
+ $ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
279
+ $ Goto Loop3
280
+ $NextEL:
281
+ $ El = El + 1
282
+ $ Goto Loop2
283
+ $EndL:
284
+ $ arg=arg+1
285
+ $ If arg .Le. 8 Then Goto Loop
286
+ $ Goto Exit
287
+ $
288
+ $Makeit:
289
+ $ VV=F$VERIFY(0)
290
+ $ write sys$output P2
291
+ $ 'P2
292
+ $ VV='F$Verify(VV)
293
+ $Exit:
294
+ $ If V Then Set Verify
295
+ $ENDSUBROUTINE
296
+ $!------------------------------------------------------------------------------
297
+ $!
298
+ $! Check command line options and set symbols accordingly
299
+ $!
300
+ $!------------------------------------------------------------------------------
301
+ $! Version history
302
+ $! 0.01 20041206 First version to receive a number
303
+ $! 0.02 20060126 Add new "HELP" target
304
+ $ CHECK_OPTS:
305
+ $ i = 1
306
+ $ OPT_LOOP:
307
+ $ if i .lt. 9
308
+ $ then
309
+ $ cparm = f$edit(p'i',"upcase")
310
+ $!
311
+ $! Check if parameter actually contains something
312
+ $!
313
+ $ if f$edit(cparm,"trim") .nes. ""
314
+ $ then
315
+ $ if cparm .eqs. "DEBUG"
316
+ $ then
317
+ $ ccopt = ccopt + "/noopt/deb"
318
+ $ lopts = lopts + "/deb"
319
+ $ endif
320
+ $ if f$locate("CCOPT=",cparm) .lt. f$length(cparm)
321
+ $ then
322
+ $ start = f$locate("=",cparm) + 1
323
+ $ len = f$length(cparm) - start
324
+ $ ccopt = ccopt + f$extract(start,len,cparm)
325
+ $ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) -
326
+ then s_case = true
327
+ $ endif
328
+ $ if cparm .eqs. "LINK" then linkonly = true
329
+ $ if f$locate("LOPTS=",cparm) .lt. f$length(cparm)
330
+ $ then
331
+ $ start = f$locate("=",cparm) + 1
332
+ $ len = f$length(cparm) - start
333
+ $ lopts = lopts + f$extract(start,len,cparm)
334
+ $ endif
335
+ $ if f$locate("CC=",cparm) .lt. f$length(cparm)
336
+ $ then
337
+ $ start = f$locate("=",cparm) + 1
338
+ $ len = f$length(cparm) - start
339
+ $ cc_com = f$extract(start,len,cparm)
340
+ if (cc_com .nes. "DECC") .and. -
341
+ (cc_com .nes. "VAXC") .and. -
342
+ (cc_com .nes. "GNUC")
343
+ $ then
344
+ $ write sys$output "Unsupported compiler choice ''cc_com' ignored"
345
+ $ write sys$output "Use DECC, VAXC, or GNUC instead"
346
+ $ else
347
+ $ if cc_com .eqs. "DECC" then its_decc = true
348
+ $ if cc_com .eqs. "VAXC" then its_vaxc = true
349
+ $ if cc_com .eqs. "GNUC" then its_gnuc = true
350
+ $ endif
351
+ $ endif
352
+ $ if f$locate("MAKE=",cparm) .lt. f$length(cparm)
353
+ $ then
354
+ $ start = f$locate("=",cparm) + 1
355
+ $ len = f$length(cparm) - start
356
+ $ mmks = f$extract(start,len,cparm)
357
+ $ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS")
358
+ $ then
359
+ $ make = mmks
360
+ $ else
361
+ $ write sys$output "Unsupported make choice ''mmks' ignored"
362
+ $ write sys$output "Use MMK or MMS instead"
363
+ $ endif
364
+ $ endif
365
+ $ if cparm .eqs. "HELP" then gosub bhelp
366
+ $ endif
367
+ $ i = i + 1
368
+ $ goto opt_loop
369
+ $ endif
370
+ $ return
371
+ $!------------------------------------------------------------------------------
372
+ $!
373
+ $! Look for the compiler used
374
+ $!
375
+ $! Version history
376
+ $! 0.01 20040223 First version to receive a number
377
+ $! 0.02 20040229 Save/set value of decc$no_rooted_search_lists
378
+ $! 0.03 20060202 Extend handling of GNU C
379
+ $! 0.04 20090402 Compaq -> hp
380
+ $CHECK_COMPILER:
381
+ $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
382
+ $ then
383
+ $ its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "")
384
+ $ its_vaxc = .not. its_decc .and. (F$Search("SYS$System:VAXC.Exe") .nes. "")
385
+ $ its_gnuc = .not. (its_decc .or. its_vaxc) .and. (f$trnlnm("gnu_cc") .nes. "")
386
+ $ endif
387
+ $!
388
+ $! Exit if no compiler available
389
+ $!
390
+ $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
391
+ $ then goto CC_ERR
392
+ $ else
393
+ $ if its_decc
394
+ $ then
395
+ $ write sys$output "CC compiler check ... hp C"
396
+ $ if f$trnlnm("decc$no_rooted_search_lists") .nes. ""
397
+ $ then
398
+ $ dnrsl = f$trnlnm("decc$no_rooted_search_lists")
399
+ $ endif
400
+ $ define/nolog decc$no_rooted_search_lists 1
401
+ $ else
402
+ $ if its_vaxc then write sys$output "CC compiler check ... VAX C"
403
+ $ if its_gnuc
404
+ $ then
405
+ $ write sys$output "CC compiler check ... GNU C"
406
+ $ if f$trnlnm(topt) then write topt "gnu_cc:[000000]gcclib.olb/lib"
407
+ $ if f$trnlnm(optf) then write optf "gnu_cc:[000000]gcclib.olb/lib"
408
+ $ cc = "gcc"
409
+ $ endif
410
+ $ if f$trnlnm(topt) then write topt "sys$share:vaxcrtl.exe/share"
411
+ $ if f$trnlnm(optf) then write optf "sys$share:vaxcrtl.exe/share"
412
+ $ endif
413
+ $ endif
414
+ $ return
415
+ $!------------------------------------------------------------------------------
416
+ $!
417
+ $! If MMS/MMK are available dump out the descrip.mms if required
418
+ $!
419
+ $CREA_MMS:
420
+ $ write sys$output "Creating descrip.mms..."
421
+ $ create descrip.mms
422
+ $ open/append out descrip.mms
423
+ $ copy sys$input: out
424
+ $ deck
425
+ # descrip.mms: MMS description file for building zlib on VMS
426
+ # written by Martin P.J. Zinser
427
+ # <zinser@zinser.no-ip.info or martin.zinser@eurexchange.com>
428
+
429
+ OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\
430
+ gzread.obj, gzwrite.obj, uncompr.obj, infback.obj\
431
+ deflate.obj, trees.obj, zutil.obj, inflate.obj, \
432
+ inftrees.obj, inffast.obj
433
+
434
+ $ eod
435
+ $ write out "CFLAGS=", ccopt
436
+ $ write out "LOPTS=", lopts
437
+ $ write out "all : example.exe minigzip.exe libz.olb"
438
+ $ copy sys$input: out
439
+ $ deck
440
+ @ write sys$output " Example applications available"
441
+
442
+ libz.olb : libz.olb($(OBJS))
443
+ @ write sys$output " libz available"
444
+
445
+ example.exe : example.obj libz.olb
446
+ link $(LOPTS) example,libz.olb/lib
447
+
448
+ minigzip.exe : minigzip.obj libz.olb
449
+ link $(LOPTS) minigzip,libz.olb/lib
450
+
451
+ clean :
452
+ delete *.obj;*,libz.olb;*,*.opt;*,*.exe;*
453
+
454
+
455
+ # Other dependencies.
456
+ adler32.obj : adler32.c zutil.h zlib.h zconf.h
457
+ compress.obj : compress.c zlib.h zconf.h
458
+ crc32.obj : crc32.c zutil.h zlib.h zconf.h
459
+ deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h
460
+ example.obj : [.test]example.c zlib.h zconf.h
461
+ gzclose.obj : gzclose.c zutil.h zlib.h zconf.h
462
+ gzlib.obj : gzlib.c zutil.h zlib.h zconf.h
463
+ gzread.obj : gzread.c zutil.h zlib.h zconf.h
464
+ gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h
465
+ inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h
466
+ inflate.obj : inflate.c zutil.h zlib.h zconf.h
467
+ inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h
468
+ minigzip.obj : [.test]minigzip.c zlib.h zconf.h
469
+ trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h
470
+ uncompr.obj : uncompr.c zlib.h zconf.h
471
+ zutil.obj : zutil.c zutil.h zlib.h zconf.h
472
+ infback.obj : infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
473
+ $ eod
474
+ $ close out
475
+ $ return
476
+ $!------------------------------------------------------------------------------
477
+ $!
478
+ $! Read list of core library sources from makefile.in and create options
479
+ $! needed to build shareable image
480
+ $!
481
+ $CREA_OLIST:
482
+ $ open/read min makefile.in
483
+ $ open/write mod modules.opt
484
+ $ src_check_list = "OBJZ =#OBJG ="
485
+ $MRLOOP:
486
+ $ read/end=mrdone min rec
487
+ $ i = 0
488
+ $SRC_CHECK_LOOP:
489
+ $ src_check = f$element(i, "#", src_check_list)
490
+ $ i = i+1
491
+ $ if src_check .eqs. "#" then goto mrloop
492
+ $ if (f$extract(0,6,rec) .nes. src_check) then goto src_check_loop
493
+ $ rec = rec - src_check
494
+ $ gosub extra_filnam
495
+ $ if (f$element(1,"\",rec) .eqs. "\") then goto mrloop
496
+ $MRSLOOP:
497
+ $ read/end=mrdone min rec
498
+ $ gosub extra_filnam
499
+ $ if (f$element(1,"\",rec) .nes. "\") then goto mrsloop
500
+ $MRDONE:
501
+ $ close min
502
+ $ close mod
503
+ $ return
504
+ $!------------------------------------------------------------------------------
505
+ $!
506
+ $! Take record extracted in crea_olist and split it into single filenames
507
+ $!
508
+ $EXTRA_FILNAM:
509
+ $ myrec = f$edit(rec - "\", "trim,compress")
510
+ $ i = 0
511
+ $FELOOP:
512
+ $ srcfil = f$element(i," ", myrec)
513
+ $ if (srcfil .nes. " ")
514
+ $ then
515
+ $ write mod f$parse(srcfil,,,"NAME"), ".obj"
516
+ $ i = i + 1
517
+ $ goto feloop
518
+ $ endif
519
+ $ return
520
+ $!------------------------------------------------------------------------------
521
+ $!
522
+ $! Find current Zlib version number
523
+ $!
524
+ $FIND_VERSION:
525
+ $ open/read h_in 'v_file'
526
+ $hloop:
527
+ $ read/end=hdone h_in rec
528
+ $ rec = f$edit(rec,"TRIM")
529
+ $ if (f$extract(0,1,rec) .nes. "#") then goto hloop
530
+ $ rec = f$edit(rec - "#", "TRIM")
531
+ $ if f$element(0," ",rec) .nes. "define" then goto hloop
532
+ $ if f$element(1," ",rec) .eqs. v_string
533
+ $ then
534
+ $ version = 'f$element(2," ",rec)'
535
+ $ goto hdone
536
+ $ endif
537
+ $ goto hloop
538
+ $hdone:
539
+ $ close h_in
540
+ $ return
541
+ $!------------------------------------------------------------------------------
542
+ $!
543
+ $CHECK_CONFIG:
544
+ $!
545
+ $ in_ldef = f$locate(cdef,libdefs)
546
+ $ if (in_ldef .lt. f$length(libdefs))
547
+ $ then
548
+ $ write aconf "#define ''cdef' 1"
549
+ $ libdefs = f$extract(0,in_ldef,libdefs) + -
550
+ f$extract(in_ldef + f$length(cdef) + 1, -
551
+ f$length(libdefs) - in_ldef - f$length(cdef) - 1, -
552
+ libdefs)
553
+ $ else
554
+ $ if (f$type('cdef') .eqs. "INTEGER")
555
+ $ then
556
+ $ write aconf "#define ''cdef' ", 'cdef'
557
+ $ else
558
+ $ if (f$type('cdef') .eqs. "STRING")
559
+ $ then
560
+ $ write aconf "#define ''cdef' ", """", '''cdef'', """"
561
+ $ else
562
+ $ gosub check_cc_def
563
+ $ endif
564
+ $ endif
565
+ $ endif
566
+ $ return
567
+ $!------------------------------------------------------------------------------
568
+ $!
569
+ $! Check if this is a define relating to the properties of the C/C++
570
+ $! compiler
571
+ $!
572
+ $ CHECK_CC_DEF:
573
+ $ if (cdef .eqs. "_LARGEFILE64_SOURCE")
574
+ $ then
575
+ $ copy sys$input: 'tc'
576
+ $ deck
577
+ #include "tconfig"
578
+ #define _LARGEFILE
579
+ #include <stdio.h>
580
+
581
+ int main(){
582
+ FILE *fp;
583
+ fp = fopen("temp.txt","r");
584
+ fseeko(fp,1,SEEK_SET);
585
+ fclose(fp);
586
+ }
587
+
588
+ $ eod
589
+ $ test_inv = false
590
+ $ comm_h = false
591
+ $ gosub cc_prop_check
592
+ $ return
593
+ $ endif
594
+ $ write aconf "/* ", line, " */"
595
+ $ return
596
+ $!------------------------------------------------------------------------------
597
+ $!
598
+ $! Check for properties of C/C++ compiler
599
+ $!
600
+ $! Version history
601
+ $! 0.01 20031020 First version to receive a number
602
+ $! 0.02 20031022 Added logic for defines with value
603
+ $! 0.03 20040309 Make sure local config file gets not deleted
604
+ $! 0.04 20041230 Also write include for configure run
605
+ $! 0.05 20050103 Add processing of "comment defines"
606
+ $CC_PROP_CHECK:
607
+ $ cc_prop = true
608
+ $ is_need = false
609
+ $ is_need = (f$extract(0,4,cdef) .eqs. "NEED") .or. (test_inv .eq. true)
610
+ $ if f$search(th) .eqs. "" then create 'th'
611
+ $ set message/nofac/noident/nosever/notext
612
+ $ on error then continue
613
+ $ cc 'tmpnam'
614
+ $ if .not. ($status) then cc_prop = false
615
+ $ on error then continue
616
+ $! The headers might lie about the capabilities of the RTL
617
+ $ link 'tmpnam',tmp.opt/opt
618
+ $ if .not. ($status) then cc_prop = false
619
+ $ set message/fac/ident/sever/text
620
+ $ on error then goto err_exit
621
+ $ delete/nolog 'tmpnam'.*;*/exclude='th'
622
+ $ if (cc_prop .and. .not. is_need) .or. -
623
+ (.not. cc_prop .and. is_need)
624
+ $ then
625
+ $ write sys$output "Checking for ''cdef'... yes"
626
+ $ if f$type('cdef_val'_yes) .nes. ""
627
+ $ then
628
+ $ if f$type('cdef_val'_yes) .eqs. "INTEGER" -
629
+ then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_yes)
630
+ $ if f$type('cdef_val'_yes) .eqs. "STRING" -
631
+ then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_yes)
632
+ $ else
633
+ $ call write_config f$fao("#define !AS 1",cdef)
634
+ $ endif
635
+ $ if (cdef .eqs. "HAVE_FSEEKO") .or. (cdef .eqs. "_LARGE_FILES") .or. -
636
+ (cdef .eqs. "_LARGEFILE64_SOURCE") then -
637
+ call write_config f$string("#define _LARGEFILE 1")
638
+ $ else
639
+ $ write sys$output "Checking for ''cdef'... no"
640
+ $ if (comm_h)
641
+ $ then
642
+ call write_config f$fao("/* !AS */",line)
643
+ $ else
644
+ $ if f$type('cdef_val'_no) .nes. ""
645
+ $ then
646
+ $ if f$type('cdef_val'_no) .eqs. "INTEGER" -
647
+ then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_no)
648
+ $ if f$type('cdef_val'_no) .eqs. "STRING" -
649
+ then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_no)
650
+ $ else
651
+ $ call write_config f$fao("#undef !AS",cdef)
652
+ $ endif
653
+ $ endif
654
+ $ endif
655
+ $ return
656
+ $!------------------------------------------------------------------------------
657
+ $!
658
+ $! Check for properties of C/C++ compiler with multiple result values
659
+ $!
660
+ $! Version history
661
+ $! 0.01 20040127 First version
662
+ $! 0.02 20050103 Reconcile changes from cc_prop up to version 0.05
663
+ $CC_MPROP_CHECK:
664
+ $ cc_prop = true
665
+ $ i = 1
666
+ $ idel = 1
667
+ $ MT_LOOP:
668
+ $ if f$type(result_'i') .eqs. "STRING"
669
+ $ then
670
+ $ set message/nofac/noident/nosever/notext
671
+ $ on error then continue
672
+ $ cc 'tmpnam'_'i'
673
+ $ if .not. ($status) then cc_prop = false
674
+ $ on error then continue
675
+ $! The headers might lie about the capabilities of the RTL
676
+ $ link 'tmpnam'_'i',tmp.opt/opt
677
+ $ if .not. ($status) then cc_prop = false
678
+ $ set message/fac/ident/sever/text
679
+ $ on error then goto err_exit
680
+ $ delete/nolog 'tmpnam'_'i'.*;*
681
+ $ if (cc_prop)
682
+ $ then
683
+ $ write sys$output "Checking for ''cdef'... ", mdef_'i'
684
+ $ if f$type(mdef_'i') .eqs. "INTEGER" -
685
+ then call write_config f$fao("#define !AS !UL",cdef,mdef_'i')
686
+ $ if f$type('cdef_val'_yes) .eqs. "STRING" -
687
+ then call write_config f$fao("#define !AS !AS",cdef,mdef_'i')
688
+ $ goto msym_clean
689
+ $ else
690
+ $ i = i + 1
691
+ $ goto mt_loop
692
+ $ endif
693
+ $ endif
694
+ $ write sys$output "Checking for ''cdef'... no"
695
+ $ call write_config f$fao("#undef !AS",cdef)
696
+ $ MSYM_CLEAN:
697
+ $ if (idel .le. msym_max)
698
+ $ then
699
+ $ delete/sym mdef_'idel'
700
+ $ idel = idel + 1
701
+ $ goto msym_clean
702
+ $ endif
703
+ $ return
704
+ $!------------------------------------------------------------------------------
705
+ $!
706
+ $! Write configuration to both permanent and temporary config file
707
+ $!
708
+ $! Version history
709
+ $! 0.01 20031029 First version to receive a number
710
+ $!
711
+ $WRITE_CONFIG: SUBROUTINE
712
+ $ write aconf 'p1'
713
+ $ open/append confh 'th'
714
+ $ write confh 'p1'
715
+ $ close confh
716
+ $ENDSUBROUTINE
717
+ $!------------------------------------------------------------------------------
718
+ $!
719
+ $! Analyze the project map file and create the symbol vector for a shareable
720
+ $! image from it
721
+ $!
722
+ $! Version history
723
+ $! 0.01 20120128 First version
724
+ $! 0.02 20120226 Add pre-load logic
725
+ $!
726
+ $ MAP_2_SHOPT: Subroutine
727
+ $!
728
+ $ SAY := "WRITE_ SYS$OUTPUT"
729
+ $!
730
+ $ IF F$SEARCH("''P1'") .EQS. ""
731
+ $ THEN
732
+ $ SAY "MAP_2_SHOPT-E-NOSUCHFILE: Error, inputfile ''p1' not available"
733
+ $ goto exit_m2s
734
+ $ ENDIF
735
+ $ IF "''P2'" .EQS. ""
736
+ $ THEN
737
+ $ SAY "MAP_2_SHOPT: Error, no output file provided"
738
+ $ goto exit_m2s
739
+ $ ENDIF
740
+ $!
741
+ $ module1 = "deflate#deflateEnd#deflateInit_#deflateParams#deflateSetDictionary"
742
+ $ module2 = "gzclose#gzerror#gzgetc#gzgets#gzopen#gzprintf#gzputc#gzputs#gzread"
743
+ $ module3 = "gzseek#gztell#inflate#inflateEnd#inflateInit_#inflateSetDictionary"
744
+ $ module4 = "inflateSync#uncompress#zlibVersion#compress"
745
+ $ open/read map 'p1
746
+ $ if axp .or. ia64
747
+ $ then
748
+ $ open/write aopt a.opt
749
+ $ open/write bopt b.opt
750
+ $ write aopt " CASE_SENSITIVE=YES"
751
+ $ write bopt "SYMBOL_VECTOR= (-"
752
+ $ mod_sym_num = 1
753
+ $ MOD_SYM_LOOP:
754
+ $ if f$type(module'mod_sym_num') .nes. ""
755
+ $ then
756
+ $ mod_in = 0
757
+ $ MOD_SYM_IN:
758
+ $ shared_proc = f$element(mod_in, "#", module'mod_sym_num')
759
+ $ if shared_proc .nes. "#"
760
+ $ then
761
+ $ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",-
762
+ f$edit(shared_proc,"upcase"),shared_proc)
763
+ $ write bopt f$fao("!AS=PROCEDURE,-",shared_proc)
764
+ $ mod_in = mod_in + 1
765
+ $ goto mod_sym_in
766
+ $ endif
767
+ $ mod_sym_num = mod_sym_num + 1
768
+ $ goto mod_sym_loop
769
+ $ endif
770
+ $MAP_LOOP:
771
+ $ read/end=map_end map line
772
+ $ if (f$locate("{",line).lt. f$length(line)) .or. -
773
+ (f$locate("global:", line) .lt. f$length(line))
774
+ $ then
775
+ $ proc = true
776
+ $ goto map_loop
777
+ $ endif
778
+ $ if f$locate("}",line).lt. f$length(line) then proc = false
779
+ $ if f$locate("local:", line) .lt. f$length(line) then proc = false
780
+ $ if proc
781
+ $ then
782
+ $ shared_proc = f$edit(line,"collapse")
783
+ $ chop_semi = f$locate(";", shared_proc)
784
+ $ if chop_semi .lt. f$length(shared_proc) then -
785
+ shared_proc = f$extract(0, chop_semi, shared_proc)
786
+ $ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",-
787
+ f$edit(shared_proc,"upcase"),shared_proc)
788
+ $ write bopt f$fao("!AS=PROCEDURE,-",shared_proc)
789
+ $ endif
790
+ $ goto map_loop
791
+ $MAP_END:
792
+ $ close/nolog aopt
793
+ $ close/nolog bopt
794
+ $ open/append libopt 'p2'
795
+ $ open/read aopt a.opt
796
+ $ open/read bopt b.opt
797
+ $ALOOP:
798
+ $ read/end=aloop_end aopt line
799
+ $ write libopt line
800
+ $ goto aloop
801
+ $ALOOP_END:
802
+ $ close/nolog aopt
803
+ $ sv = ""
804
+ $BLOOP:
805
+ $ read/end=bloop_end bopt svn
806
+ $ if (svn.nes."")
807
+ $ then
808
+ $ if (sv.nes."") then write libopt sv
809
+ $ sv = svn
810
+ $ endif
811
+ $ goto bloop
812
+ $BLOOP_END:
813
+ $ write libopt f$extract(0,f$length(sv)-2,sv), "-"
814
+ $ write libopt ")"
815
+ $ close/nolog bopt
816
+ $ delete/nolog/noconf a.opt;*,b.opt;*
817
+ $ else
818
+ $ if vax
819
+ $ then
820
+ $ open/append libopt 'p2'
821
+ $ mod_sym_num = 1
822
+ $ VMOD_SYM_LOOP:
823
+ $ if f$type(module'mod_sym_num') .nes. ""
824
+ $ then
825
+ $ mod_in = 0
826
+ $ VMOD_SYM_IN:
827
+ $ shared_proc = f$element(mod_in, "#", module'mod_sym_num')
828
+ $ if shared_proc .nes. "#"
829
+ $ then
830
+ $ write libopt f$fao("UNIVERSAL=!AS",-
831
+ f$edit(shared_proc,"upcase"))
832
+ $ mod_in = mod_in + 1
833
+ $ goto vmod_sym_in
834
+ $ endif
835
+ $ mod_sym_num = mod_sym_num + 1
836
+ $ goto vmod_sym_loop
837
+ $ endif
838
+ $VMAP_LOOP:
839
+ $ read/end=vmap_end map line
840
+ $ if (f$locate("{",line).lt. f$length(line)) .or. -
841
+ (f$locate("global:", line) .lt. f$length(line))
842
+ $ then
843
+ $ proc = true
844
+ $ goto vmap_loop
845
+ $ endif
846
+ $ if f$locate("}",line).lt. f$length(line) then proc = false
847
+ $ if f$locate("local:", line) .lt. f$length(line) then proc = false
848
+ $ if proc
849
+ $ then
850
+ $ shared_proc = f$edit(line,"collapse")
851
+ $ chop_semi = f$locate(";", shared_proc)
852
+ $ if chop_semi .lt. f$length(shared_proc) then -
853
+ shared_proc = f$extract(0, chop_semi, shared_proc)
854
+ $ write libopt f$fao("UNIVERSAL=!AS",-
855
+ f$edit(shared_proc,"upcase"))
856
+ $ endif
857
+ $ goto vmap_loop
858
+ $VMAP_END:
859
+ $ else
860
+ $ write sys$output "Unknown Architecture (Not VAX, AXP, or IA64)"
861
+ $ write sys$output "No options file created"
862
+ $ endif
863
+ $ endif
864
+ $ EXIT_M2S:
865
+ $ close/nolog map
866
+ $ close/nolog libopt
867
+ $ endsubroutine