2
0

VMS.pm 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package platform::VMS;
  2. use strict;
  3. use warnings;
  4. use Carp;
  5. use vars qw(@ISA);
  6. require platform::BASE;
  7. @ISA = qw(platform::BASE);
  8. # Assume someone set @INC right before loading this module
  9. use configdata;
  10. # VMS has a cultural standard where all installed libraries are prefixed.
  11. # For OpenSSL, the choice is 'ossl$' (this prefix was claimed in a
  12. # conversation with VSI, Tuesday January 26 2016)
  13. sub osslprefix { 'OSSL$' }
  14. sub binext { '.EXE' }
  15. sub dsoext { '.EXE' }
  16. sub shlibext { '.EXE' }
  17. sub libext { '.OLB' }
  18. sub defext { '.OPT' }
  19. sub objext { '.OBJ' }
  20. sub depext { '.D' }
  21. sub asmext { '.ASM' }
  22. # Other extra that aren't defined in platform::BASE
  23. sub shlibvariant { $target{shlib_variant} || '' }
  24. sub optext { '.OPT' }
  25. sub optname { return $_[1] }
  26. sub opt { return $_[0]->optname($_[1]) . $_[0]->optext() }
  27. # Other projects include the pointer size in the name of installed libraries,
  28. # so we do too.
  29. sub staticname {
  30. # Non-installed libraries are *always* static, and their names remain
  31. # the same, except for the mandatory extension
  32. my $in_libname = platform::BASE->staticname($_[1]);
  33. return $in_libname if $unified_info{attributes}->{$_[1]}->{noinst};
  34. return platform::BASE::__concat($_[0]->osslprefix(),
  35. platform::BASE->staticname($_[1]),
  36. $target{pointer_size});
  37. }
  38. # To enable installation of multiple major OpenSSL releases, we include the
  39. # version number in installed shared library names.
  40. my $sover_filename =
  41. join('', map { sprintf "%02d", $_ } split(m|\.|, $config{shlib_version}));
  42. sub shlib_version_as_filename {
  43. return $sover_filename;
  44. }
  45. sub sharedname {
  46. return platform::BASE::__concat($_[0]->osslprefix(),
  47. platform::BASE->sharedname($_[1]),
  48. $_[0]->shlib_version_as_filename(),
  49. ($_[0]->shlibvariant() // ''),
  50. "_shr$target{pointer_size}");
  51. }
  52. 1;