mirror of
https://github.com/janet-lang/janet
synced 2025-07-18 18:02:58 +00:00
Don't compile library loading code on windows if it is disabled.
This commit is contained in:
parent
75179de8da
commit
d8d1de2dcb
@ -1,6 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## ??? - Unreleased
|
||||||
|
- Add build-time detection for cygwin.
|
||||||
|
|
||||||
## 1.26.0 - 2023-01-07
|
## 1.26.0 - 2023-01-07
|
||||||
- Add `ffi/malloc` and `ffi/free`. Useful as tools of last resort.
|
- Add `ffi/malloc` and `ffi/free`. Useful as tools of last resort.
|
||||||
- Add `ffi/jitfn` to allow calling function pointers generated at runtime from machine code.
|
- Add `ffi/jitfn` to allow calling function pointers generated at runtime from machine code.
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
project('janet', 'c',
|
project('janet', 'c',
|
||||||
default_options : ['c_std=c99', 'build.c_std=c99', 'b_lundef=false', 'default_library=both'],
|
default_options : ['c_std=c99', 'build.c_std=c99', 'b_lundef=false', 'default_library=both'],
|
||||||
version : '1.26.0')
|
version : '1.26.1')
|
||||||
|
|
||||||
# Global settings
|
# Global settings
|
||||||
janet_path = join_paths(get_option('prefix'), get_option('libdir'), 'janet')
|
janet_path = join_paths(get_option('prefix'), get_option('libdir'), 'janet')
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
#define JANET_VERSION_MAJOR 1
|
#define JANET_VERSION_MAJOR 1
|
||||||
#define JANET_VERSION_MINOR 26
|
#define JANET_VERSION_MINOR 26
|
||||||
#define JANET_VERSION_PATCH 0
|
#define JANET_VERSION_PATCH 1
|
||||||
#define JANET_VERSION_EXTRA ""
|
#define JANET_VERSION_EXTRA "-dev"
|
||||||
#define JANET_VERSION "1.26.0"
|
#define JANET_VERSION "1.26.1-dev"
|
||||||
|
|
||||||
/* #define JANET_BUILD "local" */
|
/* #define JANET_BUILD "local" */
|
||||||
|
|
||||||
|
@ -920,6 +920,13 @@ char *get_processed_name(const char *name) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(JANET_NO_DYNAMIC_MODULES)
|
||||||
|
|
||||||
|
const char *error_clib(void) {
|
||||||
|
return "dynamic modules not supported";
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
#if defined(JANET_WINDOWS)
|
#if defined(JANET_WINDOWS)
|
||||||
|
|
||||||
static char error_clib_buf[256];
|
static char error_clib_buf[256];
|
||||||
@ -967,6 +974,7 @@ void *symbol_clib(HINSTANCE clib, const char *sym) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Alloc function macro fills */
|
/* Alloc function macro fills */
|
||||||
|
@ -135,7 +135,7 @@ int janet_gettime(struct timespec *spec);
|
|||||||
typedef int Clib;
|
typedef int Clib;
|
||||||
#define load_clib(name) ((void) name, 0)
|
#define load_clib(name) ((void) name, 0)
|
||||||
#define symbol_clib(lib, sym) ((void) lib, (void) sym, NULL)
|
#define symbol_clib(lib, sym) ((void) lib, (void) sym, NULL)
|
||||||
#define error_clib() "dynamic libraries not supported"
|
const char *error_clib(void);
|
||||||
#define free_clib(c) ((void) (c), 0)
|
#define free_clib(c) ((void) (c), 0)
|
||||||
#elif defined(JANET_WINDOWS)
|
#elif defined(JANET_WINDOWS)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
@ -150,7 +150,7 @@ typedef void *Clib;
|
|||||||
#define load_clib(name) dlopen((name), RTLD_NOW)
|
#define load_clib(name) dlopen((name), RTLD_NOW)
|
||||||
#define free_clib(lib) dlclose((lib))
|
#define free_clib(lib) dlclose((lib))
|
||||||
#define symbol_clib(lib, sym) dlsym((lib), (sym))
|
#define symbol_clib(lib, sym) dlsym((lib), (sym))
|
||||||
#define error_clib() dlerror()
|
#define error_clib dlerror
|
||||||
#endif
|
#endif
|
||||||
char *get_processed_name(const char *name);
|
char *get_processed_name(const char *name);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user