Mercurial > irccd
comparison extern/libcompat/win/dlfcn/dlfcn.h @ 948:21a91311c8ea
cmake: switch back, GNU make is painful
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 16 Jan 2021 17:58:46 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
947:95201fd9ad88 | 948:21a91311c8ea |
---|---|
1 /* | |
2 * dlfcn-win32 | |
3 * Copyright (c) 2007 Ramiro Polla | |
4 * | |
5 * Permission is hereby granted, free of charge, to any person obtaining a copy | |
6 * of this software and associated documentation files (the "Software"), to deal | |
7 * in the Software without restriction, including without limitation the rights | |
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
9 * copies of the Software, and to permit persons to whom the Software is | |
10 * furnished to do so, subject to the following conditions: | |
11 * | |
12 * The above copyright notice and this permission notice shall be included in | |
13 * all copies or substantial portions of the Software. | |
14 * | |
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
21 * THE SOFTWARE. | |
22 */ | |
23 | |
24 #ifndef DLFCN_H | |
25 #define DLFCN_H | |
26 | |
27 #ifdef __cplusplus | |
28 extern "C" { | |
29 #endif | |
30 | |
31 #if defined(DLFCN_BUILD_DLL) | |
32 # define DLFCN_EXPORT __declspec(dllexport) | |
33 #else | |
34 # define DLFCN_EXPORT | |
35 #endif | |
36 | |
37 /* Relocations are performed when the object is loaded. */ | |
38 #define RTLD_NOW 0 | |
39 | |
40 /* Relocations are performed at an implementation-defined time. | |
41 * Windows API does not support lazy symbol resolving (when first reference | |
42 * to a given symbol occurs). So RTLD_LAZY implementation is same as RTLD_NOW. | |
43 */ | |
44 #define RTLD_LAZY RTLD_NOW | |
45 | |
46 /* All symbols are available for relocation processing of other modules. */ | |
47 #define RTLD_GLOBAL (1 << 1) | |
48 | |
49 /* All symbols are not made available for relocation processing by other modules. */ | |
50 #define RTLD_LOCAL (1 << 2) | |
51 | |
52 /* These two were added in The Open Group Base Specifications Issue 6. | |
53 * Note: All other RTLD_* flags in any dlfcn.h are not standard compliant. | |
54 */ | |
55 | |
56 /* The symbol lookup happens in the normal global scope. */ | |
57 #define RTLD_DEFAULT ((void *)0) | |
58 | |
59 /* Specifies the next object after this one that defines name. */ | |
60 #define RTLD_NEXT ((void *)-1) | |
61 | |
62 /* Open a symbol table handle. */ | |
63 DLFCN_EXPORT void *dlopen(const char *file, int mode); | |
64 | |
65 /* Close a symbol table handle. */ | |
66 DLFCN_EXPORT int dlclose(void *handle); | |
67 | |
68 /* Get the address of a symbol from a symbol table handle. */ | |
69 DLFCN_EXPORT void *dlsym(void *handle, const char *name); | |
70 | |
71 /* Get diagnostic information. */ | |
72 DLFCN_EXPORT char *dlerror(void); | |
73 | |
74 #ifdef __cplusplus | |
75 } | |
76 #endif | |
77 | |
78 #endif /* DLFCN_H */ |