From: Richard Levitte Date: Wed, 23 Jun 2021 06:21:04 +0000 (+0200) Subject: TEST: Modify simpledynamic.[ch] to allow use on VMS as well X-Git-Tag: openssl-3.0.0-beta2~223 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0652197407e1cb0d550f9528d9253c79f980608d;p=thirdparty%2Fopenssl.git TEST: Modify simpledynamic.[ch] to allow use on VMS as well Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15872) --- diff --git a/test/simpledynamic.c b/test/simpledynamic.c index bbeeae02a49..390836891fc 100644 --- a/test/simpledynamic.c +++ b/test/simpledynamic.c @@ -12,7 +12,7 @@ #include #include "simpledynamic.h" -#if defined(DSO_DLFCN) +#if defined(DSO_DLFCN) || defined(DSO_VMS) int sd_load(const char *filename, SD *lib, int type) { diff --git a/test/simpledynamic.h b/test/simpledynamic.h index bf5b21552fb..d6e1dcbfd1e 100644 --- a/test/simpledynamic.h +++ b/test/simpledynamic.h @@ -12,13 +12,18 @@ # include "crypto/dso_conf.h" -# if defined(DSO_DLFCN) +# if defined(DSO_DLFCN) || defined(DSO_VMS) # include # define SD_INIT NULL -# define SD_SHLIB (RTLD_GLOBAL|RTLD_LAZY) -# define SD_MODULE (RTLD_LOCAL|RTLD_NOW) +# ifdef DSO_VMS +# define SD_SHLIB 0 +# define SD_MODULE 0 +# else +# define SD_SHLIB (RTLD_GLOBAL|RTLD_LAZY) +# define SD_MODULE (RTLD_LOCAL|RTLD_NOW) +# endif typedef void *SD; typedef void *SD_SYM; @@ -36,7 +41,7 @@ typedef void *SD_SYM; # endif -# if defined(DSO_DLFCN) || defined(DSO_WIN32) +# if defined(DSO_DLFCN) || defined(DSO_WIN32) || defined(DSO_VMS) int sd_load(const char *filename, SD *sd, int type); int sd_sym(SD sd, const char *symname, SD_SYM *sym); int sd_close(SD lib);