diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2015-11-23 18:48:42 -0800 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-11-23 19:01:51 -0800 |
| commit | da8c7ca2647d2e111a415f59c6b59053a19bdb61 (patch) | |
| tree | 04dd13e37031bbee8b6ff6c0365db28b846c5a5c /src/emacs-module.c | |
| parent | ceaca7bec6adf5735d51c1ca7efea5a2e05f470e (diff) | |
| download | emacs-da8c7ca2647d2e111a415f59c6b59053a19bdb61.tar.gz | |
Port better to FreeBSD’s dlfunc vs dlsym
This avoids warnings when converting between void * and
function pointers, which strict C11 does not allow.
* configure.ac (dlfunc): Check for existence.
* src/dynlib.c (dlfunc) [!HAVE_DLFUNC]: New macro.
(dynlib_func): New function.
* src/dynlib.h (dynlib_function_ptr, dynlib_func): New decls.
* src/emacs-module.c (Fmodule_load): Use dynlib_func, not
dynlib_sym, for function pointers.
Diffstat (limited to 'src/emacs-module.c')
| -rw-r--r-- | src/emacs-module.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index 1a5e253c969..209f99baf0f 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -710,7 +710,7 @@ DEFUN ("module-load", Fmodule_load, Smodule_load, 1, 1, 0, if (!gpl_sym) error ("Module %s is not GPL compatible", SDATA (file)); - module_init = (emacs_init_function) dynlib_sym (handle, "emacs_module_init"); + module_init = (emacs_init_function) dynlib_func (handle, "emacs_module_init"); if (!module_init) error ("Module %s does not have an init function.", SDATA (file)); @@ -937,7 +937,8 @@ allocate_emacs_value (emacs_env *env, struct emacs_value_storage *storage, /* Mark all objects allocated from local environments so that they don't get garbage-collected. */ -void mark_modules (void) +void +mark_modules (void) { for (Lisp_Object tem = Vmodule_environments; CONSP (tem); tem = XCDR (tem)) { |
