TEST: Modify simpledynamic.[ch] to allow use on VMS as well

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15872)
This commit is contained in:
Richard Levitte 2021-06-23 08:21:04 +02:00 committed by Pauli
parent 505fcdb5de
commit 0652197407
2 changed files with 10 additions and 5 deletions

View File

@ -12,7 +12,7 @@
#include <openssl/e_os2.h>
#include "simpledynamic.h"
#if defined(DSO_DLFCN)
#if defined(DSO_DLFCN) || defined(DSO_VMS)
int sd_load(const char *filename, SD *lib, int type)
{

View File

@ -12,13 +12,18 @@
# include "crypto/dso_conf.h"
# if defined(DSO_DLFCN)
# if defined(DSO_DLFCN) || defined(DSO_VMS)
# include <dlfcn.h>
# 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);