]>
Commit | Line | Data |
---|---|---|
9800b1a0 | 1 | /* |
4333b89f | 2 | * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. |
9800b1a0 RL |
3 | * |
4 | * Licensed under the Apache License 2.0 (the "License"). You may not use | |
5 | * this file except in compliance with the License. You can obtain a copy | |
6 | * in the file LICENSE in the source distribution or at | |
7 | * https://www.openssl.org/source/license.html | |
8 | */ | |
9 | ||
10 | #ifndef OSSL_TEST_SIMPLEDYNAMIC_H | |
11 | # define OSSL_TEST_SIMPLEDYNAMIC_H | |
12 | ||
13 | # include "crypto/dso_conf.h" | |
14 | ||
06521974 | 15 | # if defined(DSO_DLFCN) || defined(DSO_VMS) |
9800b1a0 RL |
16 | |
17 | # include <dlfcn.h> | |
18 | ||
19 | # define SD_INIT NULL | |
06521974 RL |
20 | # ifdef DSO_VMS |
21 | # define SD_SHLIB 0 | |
22 | # define SD_MODULE 0 | |
23 | # else | |
24 | # define SD_SHLIB (RTLD_GLOBAL|RTLD_LAZY) | |
25 | # define SD_MODULE (RTLD_LOCAL|RTLD_NOW) | |
26 | # endif | |
9800b1a0 RL |
27 | |
28 | typedef void *SD; | |
29 | typedef void *SD_SYM; | |
30 | ||
31 | # elif defined(DSO_WIN32) | |
32 | ||
33 | # include <windows.h> | |
34 | ||
35 | # define SD_INIT 0 | |
36 | # define SD_SHLIB 0 | |
37 | # define SD_MODULE 0 | |
38 | ||
39 | typedef HINSTANCE SD; | |
40 | typedef void *SD_SYM; | |
41 | ||
42 | # endif | |
43 | ||
06521974 | 44 | # if defined(DSO_DLFCN) || defined(DSO_WIN32) || defined(DSO_VMS) |
9800b1a0 RL |
45 | int sd_load(const char *filename, SD *sd, int type); |
46 | int sd_sym(SD sd, const char *symname, SD_SYM *sym); | |
47 | int sd_close(SD lib); | |
48 | const char *sd_error(void); | |
732e24bb | 49 | # endif |
9800b1a0 RL |
50 | |
51 | #endif |