Dear all,
Now ecl compiles without threads support under win32. Here is what I did:
1. After I took a closer look I found that the real problem is "ERROR" IS
defined, so I added #undef ERROR in the "no threads" branch and compiled it
again. Now there was only one error building ecl-min.exe
cinit.obj : error LNK2019: unresolved external symbol __ecl_w32_exception_filter
@4 referenced in function _si_simple_toplevel
2. After a bit code reading, I found that cinit.c includes stack.h's try/catch
macros, which is defined as:
#if defined(_MSC_VER)
# define ECL_CATCH_ALL_BEGIN(the_env) do { \
const cl_env_ptr __the_env = (the_env); \
_try { \
const cl_env_ptr __the_env = (the_env); \
if (ecl_frs_push(__the_env,ECL_PROTECT_TAG) == 0) {
# define ECL_CATCH_ALL_IF_CAUGHT } else {
# define ECL_CATCH_ALL_END }} \
_except(_ecl_w32_exception_filter(GetExceptionInformation())) \
{ (void)0; } \
ecl_frs_pop(__the_env); } while(0)
...
However, _ecl_w32_exception_filter is defined in unixint.c like this:
#ifdef ECL_WINDOWS_THREADS
static LPTOP_LEVEL_EXCEPTION_FILTER old_W32_exception_filter = NULL;
LONG WINAPI
_ecl_w32_exception_filter(struct _EXCEPTION_POINTERS* ep)
{
...
So no wonder it isn't defined. Since my goal is to support emscripten, there is
no need to implement a fake _ecl_w32_exception_filter, so I just changed the
_exception(...) part into _except(1) and then ecl.exe was produced.
I've played around a bit and didn't find anything wrong. Ctrl-C also works: it
terminates the program normally without crash. That means the win32 crash bug
(Issue 8) may be related to _ecl_w32_exception_filter.
Any thoughts about this?
- Rujia
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list