1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-17 15:57:12 +00:00

Allow binding pre-loaded symbols in windows FFI.

Mimic the posix RTLD_NOW setting for dlopen by iterating
opened DLLs to look for symbols.
This commit is contained in:
bakpakin
2022-08-14 13:26:13 -05:00
parent 5b2169e0d1
commit f8a9efa8e4
8 changed files with 110 additions and 49 deletions

View File

@@ -164,9 +164,9 @@ extern "C" {
#endif
/* Enable or disable the FFI library. Currently, FFI only enabled on
* x86-64, non-windows operating systems. */
* x86-64 operating systems. */
#ifndef JANET_NO_FFI
#if !defined(JANET_WINDOWS) && !defined(__EMSCRIPTEN__) && (defined(__x86_64__) || defined(_M_X64))
#if !defined(__EMSCRIPTEN__) && (defined(__x86_64__) || defined(_M_X64))
#define JANET_FFI
#endif
#endif