summaryrefslogtreecommitdiffstats
path: root/util/local_shlib.com.in
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-03-14 22:09:57 +0100
committerRichard Levitte <levitte@openssl.org>2017-03-14 22:27:17 +0100
commita74db02a2e182a16c76a12da1ac8ae8a215746b0 (patch)
tree0acbe5eeb52a04b55d47ba6b09f0ed84a9877ed5 /util/local_shlib.com.in
parent2de2df7fe8986e6e25afa72a5fe6a92272eaa4ff (diff)
VMS: throw away [.util]shareable_image_wrap.c.in and add replacement scripts
[.util]shareable_image_wrap.c.in was never useful because lib$spawn() insisted on combining stdout and stderr into one. Instead, we introduce two scripts that create and destroy a temporary environment where the local shareable images become available, [.util]local_shlib.com and [.util]unlocal_shlib.com. They also define DBG$IMAGE_DSF_PATH, which is require so the debugger can find the Debug Symbol Files. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2947)
Diffstat (limited to 'util/local_shlib.com.in')
-rw-r--r--util/local_shlib.com.in31
1 files changed, 31 insertions, 0 deletions
diff --git a/util/local_shlib.com.in b/util/local_shlib.com.in
new file mode 100644
index 0000000000..daceffc506
--- /dev/null
+++ b/util/local_shlib.com.in
@@ -0,0 +1,31 @@
+${-
+ use File::Spec::Functions qw(rel2abs);
+
+ my $bldtop = rel2abs($config{builddir});
+ our %names = ( ( map { $_ => $bldtop.$_.".EXE" }
+ map { $unified_info{sharednames}->{$_} || () }
+ @{$unified_info{libraries}} ),
+ 'DBG$IMAGE_DSF_PATH' => $bldtop );
+ "" -}
+$ ! Create a local environment with the shared library logical names
+$ ! properly set. Undo this with unlocal_shlib.com
+$
+$ OPENSSL_NAMES := OPENSSL_NAMES_'F$GETJPI("","PID")'
+$ CREATE/NAME_TABLE/PARENT_TABLE=LNM$PROCESS_DIRECTORY 'OPENSSL_NAMES'
+$ DEFINE/TABLE='OPENSSL_NAMES' OSSL_FLAG YES
+$
+$ NAMES := {- join(",", keys %names); -}
+{-
+ join("\n", map { "\$ __$_ = \"".$names{$_}."\"" } keys %names);
+-}
+$ I = 0
+$ LOOP:
+$ E = F$ELEMENT(I,",",NAMES)
+$ I = I + 1
+$ IF E .EQS. "," THEN GOTO ENDLOOP
+$ EV = __'E'
+$ OLDV = F$TRNLNM(E,"LNM$PROCESS")
+$ IF OLDV .NES. "" THEN DEFINE/TABLE='OPENSSL_NAMES' 'E' 'OLDV'
+$ DEFINE 'E' 'EV'
+$ GOTO LOOP
+$ ENDLOOP: