Merge branch 'release-15.2.21'

This commit is contained in:
Daniel Kochmański 2015-02-21 21:08:10 +01:00
commit ee989b9776
13 changed files with 74 additions and 23 deletions

View file

@ -35,9 +35,20 @@ Known issues
quicklisp and have a C compiler accessible to ECL, you may use
(ext:install-c-compiler) to switch back to the Lisp-to-C compiler.
Changes since 13.5.1
====================
Changes since last release
==========================
* Features coverity scan model, ffi-unload-module implementation,
probably more.
* Build system
enhancements, parallel builds, fixes, simplifications, cleanups,
maintenance. minor cleanup, maintenance.
* Numerous fixes
Changes since 12.7.1
====================
Some highlights of this release are:

View file

@ -1,5 +1,6 @@
---- BEGINNING OF COPYRIGHT FOR THE ECL CORE ENVIRONMENT ------------
Copyright (c) 2015, Daniel Kochmański
Copyright (c) 2000, Juan Jose Garcia Ripoll
Copyright (c) 1990, 1991, 1993 Giuseppe Attardi
Copyright (c) 1984 Taiichi Yuasa and Masami Hagiya

View file

@ -10,8 +10,8 @@ srcdir = ..\src
SHORT_SITE_NAME =
LONG_SITE_NAME =
ECL_VERSION = 13.4.1
ECL_VERSION_NUMBER= 130401
ECL_VERSION = 15.2.21
ECL_VERSION_NUMBER= 150221
ARCHITECTURE = PENTIUM4
SOFTWARE_TYPE = NT
SOFTWARE_VERSION = 5.0

View file

@ -728,6 +728,33 @@ si_load_foreign_module(cl_object filename)
#endif
}
cl_object
si_unload_foreign_module(cl_object module)
{
#if !defined(ENABLE_DLOPEN)
FEerror("SI:UNLOAD-FOREIGN-MODULE does not work when ECL is statically linked", 0);
#else
cl_object output = ECL_NIL;
if (ecl_unlikely(ecl_t_of(module) != t_codeblock)) {
FEerror("UNLOAD-FOREIGN-MODULE: Argument is not a foreign module: ~S ",
1, module);
}
# ifdef ECL_THREADS
mp_get_lock(1, ecl_symbol_value(@'mp::+load-compile-lock+'));
ECL_UNWIND_PROTECT_BEGIN(ecl_process_env()) {
# endif
if (ecl_likely(ecl_library_close(module))) output = ECL_T;
# ifdef ECL_THREADS
(void)0; /* MSVC complains about missing ';' before '}' */
} ECL_UNWIND_PROTECT_EXIT {
mp_giveup_lock(ecl_symbol_value(@'mp::+load-compile-lock+'));
} ECL_UNWIND_PROTECT_END;
# endif
@(return output)
#endif
}
cl_object
si_find_foreign_symbol(cl_object var, cl_object module, cl_object type, cl_object size)
{

View file

@ -205,7 +205,7 @@ dlopen_wrapper(cl_object block)
set_library_error(block);
}
static void
static int
dlclose_wrapper(cl_object block)
{
if (block->cblock.handle != NULL) {
@ -219,7 +219,9 @@ dlclose_wrapper(cl_object block)
FreeLibrary(block->cblock.handle);
#endif
block->cblock.handle = NULL;
return TRUE;
}
return FALSE;
}
static cl_object
@ -419,18 +421,23 @@ ecl_library_error(cl_object block) {
return block->cblock.error;
}
void
bool
ecl_library_close(cl_object block) {
const cl_env_ptr the_env = ecl_process_env();
bool success = TRUE;
ECL_WITH_GLOBAL_LOCK_BEGIN(the_env) {
ecl_disable_interrupts();
if (block->cblock.refs != ecl_make_fixnum(1)) {
/* is it ever a case? no matter how many times i call
load-foreign-module it seems that block->cblock.refs = 1 */
if (block->cblock.refs > ecl_make_fixnum(1)) {
block->cblock.refs = ecl_one_minus(block->cblock.refs);
block = ECL_NIL;
} else if (block->cblock.handle != NULL) {
GC_call_with_alloc_lock(dlclose_wrapper, block);
success = GC_call_with_alloc_lock(dlclose_wrapper, block);
cl_core.libraries = ecl_remove_eq(block, cl_core.libraries);
}
} else { /* block not loaded */
success = FALSE;
}
ecl_enable_interrupts();
} ECL_WITH_GLOBAL_LOCK_END;
if (block != ECL_NIL && block->cblock.self_destruct) {
@ -438,6 +445,7 @@ ecl_library_close(cl_object block) {
unlink((char*)block->cblock.name->base_string.self);
}
}
return success;
}
void

View file

@ -1485,6 +1485,7 @@ cl_symbols[] = {
{SYS_ "FREE-FOREIGN-DATA", SI_ORDINARY, si_free_foreign_data, 1, OBJNULL},
{SYS_ "MAKE-FOREIGN-DATA-FROM-ARRAY", SI_ORDINARY, si_make_foreign_data_from_array, 1, OBJNULL},
{SYS_ "LOAD-FOREIGN-MODULE", SI_ORDINARY, si_load_foreign_module, 1, OBJNULL},
{SYS_ "UNLOAD-FOREIGN-MODULE", SI_ORDINARY, si_unload_foreign_module, 1, OBJNULL},
{SYS_ "NULL-POINTER-P", SI_ORDINARY, si_null_pointer_p, 1, OBJNULL},
{SYS_ "SIZE-OF-FOREIGN-ELT-TYPE", SI_ORDINARY, si_size_of_foreign_elt_type, 1, OBJNULL},
{SYS_ "ALIGNMENT-OF-FOREIGN-ELT-TYPE", SI_ORDINARY, si_alignment_of_foreign_elt_type, 1, OBJNULL},

View file

@ -1485,6 +1485,7 @@ cl_symbols[] = {
{SYS_ "FREE-FOREIGN-DATA","si_free_foreign_data"},
{SYS_ "MAKE-FOREIGN-DATA-FROM-ARRAY","si_make_foreign_data_from_array"},
{SYS_ "LOAD-FOREIGN-MODULE","si_load_foreign_module"},
{SYS_ "UNLOAD-FOREIGN-MODULE","si_unload_foreign_module"},
{SYS_ "NULL-POINTER-P","si_null_pointer_p"},
{SYS_ "SIZE-OF-FOREIGN-ELT-TYPE","si_size_of_foreign_elt_type"},
{SYS_ "ALIGNMENT-OF-FOREIGN-ELT-TYPE","si_alignment_of_foreign_elt_type"},

20
src/configure vendored
View file

@ -1,7 +1,7 @@
#! /bin/sh
# From configure.in Revision.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for ecl 13.5.1.
# Generated by GNU Autoconf 2.69 for ecl 15.2.21.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@ -578,8 +578,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ecl'
PACKAGE_TARNAME='ecl'
PACKAGE_VERSION='13.5.1'
PACKAGE_STRING='ecl 13.5.1'
PACKAGE_VERSION='15.2.21'
PACKAGE_STRING='ecl 15.2.21'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1365,7 +1365,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures ecl 13.5.1 to adapt to many kinds of systems.
\`configure' configures ecl 15.2.21 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1434,7 +1434,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ecl 13.5.1:";;
short | recursive ) echo "Configuration of ecl 15.2.21:";;
esac
cat <<\_ACEOF
@ -1611,7 +1611,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ecl configure 13.5.1
ecl configure 15.2.21
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -2198,7 +2198,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ecl $as_me 13.5.1, which was
It was created by ecl $as_me 15.2.21, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -10025,7 +10025,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ecl $as_me 13.5.1, which was
This file was extended by ecl $as_me 15.2.21, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -10087,7 +10087,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
ecl config.status 13.5.1
ecl config.status 15.2.21
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@ -10814,4 +10814,4 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
for i in $srcdir/c/*/; do mkdir c/`basename $i`; done
for i in $srcdir/c/*/; do mkdir -p c/`basename $i`; done

View file

@ -8,7 +8,7 @@ dnl AUTOCONF configuration for ECL
dnl Giuseppe Attardi 25.1.1994
dnl
AC_INIT([ecl],[13.5.1],[])
AC_INIT([ecl],[15.2.21],[])
AC_REVISION([$Revision$])
AC_CONFIG_SRCDIR([bare.lsp.in])
AC_CONFIG_AUX_DIR([gmp])
@ -902,4 +902,4 @@ AC_CONFIG_FILES([
])
AC_CONFIG_HEADERS([ecl/config.h:ecl/configpre.h]) # FIXME
AC_OUTPUT
for i in $srcdir/c/*/; do mkdir c/`basename $i`; done
for i in $srcdir/c/*/; do mkdir -p c/`basename $i`; done

View file

@ -1 +0,0 @@
/usr/local/Cellar/automake/1.14/share/automake-1.14/compile

View file

@ -618,7 +618,7 @@ extern ECL_API cl_object ecl_make_codeblock();
extern ECL_API cl_object ecl_library_open(cl_object filename, bool force_reload);
extern ECL_API void *ecl_library_symbol(cl_object block, const char *symbol, bool lock);
extern ECL_API cl_object ecl_library_error(cl_object block);
extern ECL_API void ecl_library_close(cl_object block);
extern ECL_API bool ecl_library_close(cl_object block);
extern ECL_API void ecl_library_close_all(void);
/* ffi/mmap.d */
@ -650,6 +650,7 @@ extern ECL_API cl_object si_null_pointer_p(cl_object f);
extern ECL_API cl_object si_size_of_foreign_elt_type(cl_object tag);
extern ECL_API cl_object si_alignment_of_foreign_elt_type(cl_object tag);
extern ECL_API cl_object si_load_foreign_module(cl_object module);
extern ECL_API cl_object si_unload_foreign_module(cl_object module);
extern ECL_API cl_object si_find_foreign_symbol(cl_object var, cl_object module, cl_object type, cl_object size);
extern ECL_API cl_object si_call_cfun(cl_narg, cl_object fun, cl_object return_type, cl_object arg_types, cl_object args, ...);
extern ECL_API cl_object si_make_dynamic_callback(cl_narg, cl_object fun, cl_object sym, cl_object return_type, cl_object arg_types, ...);

View file

@ -422,6 +422,7 @@ extern void cl_write_object(cl_object x, cl_object stream);
#endif /* ECL_THREADS */
#ifdef ECL_THREADS
# define AO_REQUIRE_CAS
# ifdef ECL_LIBATOMIC_OPS_H
# include <ecl/atomic_ops.h>
# else

View file

@ -402,6 +402,7 @@ The top-level loop of ECL. It is called by default when ECL is invoked."
(format t "~%Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya~@
Copyright (C) 1993 Giuseppe Attardi~@
Copyright (C) 2000 Juan J. Garcia-Ripoll
Copyright (C) 2015 Daniel Kochmański
ECL is free software, and you are welcome to redistribute it~@
under certain conditions; see file 'Copyright' for details.")
(format *standard-output* "~%Type :h for Help. "))