[Ecls-list] Compilation errors using msvc/Makefile

Claus Brod claus.brod at googlemail.com
Fri Feb 27 07:35:45 UTC 2009


Hi,

I just updated using CVS
(CVSROOT=:pserver:anonymous at ecls.cvs.sourceforge.net:/cvsroot/ecls), and
tried to compile using MS Visual Studio 2008 and msvc/Makefile.

In src/c/main.d, I run into the following error:
../../src/c/main.d(726) : error C2065: 'temp' : undeclared identifier

And indeed, the variable temp is never declared. Fix proposal:

***************
*** 723,729 ****
                value = cl_format(4, Cnil,
make_constant_base_string("~A=~A"), v
ar,
                                  value);
                value = si_copy_to_simple_base_string(value);
!               putenv((char*)temp->base_string.self);
  #endif
        }
        if (ret_val == -1)
--- 723,729 ----
                value = cl_format(4, Cnil,
make_constant_base_string("~A=~A"), v
ar,
                                  value);
                value = si_copy_to_simple_base_string(value);
!               putenv((char*)value->base_string.self);
  #endif
        }
        if (ret_val == -1)


With that fixed, I still run into more problems a little later in
src/c/unixint.d. A couple of those errors occur because Windows knows
SIGSEGV, but not SIGBUS. Those fixes are simple:

RCS file: /cvsroot/ecls/ecl/src/c/unixint.d,v
retrieving revision 1.38
diff -c -r1.38 unixint.d
*** ../src/c/unixint.d  26 Dec 2008 09:47:28 -0000      1.38
--- ../src/c/unixint.d  27 Feb 2009 07:32:37 -0000
***************
*** 264,269 ****
--- 264,270 ----
                }
                ecl_internal_error("SIGSEGV without handler to jump to.");
        }
+ #ifdef SIGBUS // {
        case SIGBUS: {
                ecl_frame_ptr destination = frs_sch(OBJNULL);
                if (destination) {
***************
*** 272,277 ****
--- 273,279 ----
                }
                ecl_internal_error("SIGSEGV without handler to jump to.");
        }
+ #endif // }
        default:
                FEerror("Serious signal ~D caught.", 1, MAKE_FIXNUM(sig));
        }
***************
*** 352,359 ****
--- 354,363 ----
                        printf("Postponing signal %d\n", sig);
                        sigaction(SIGSEGV, NULL, &oact);
                        printf("SIGSEGV Handler: %x\n", oact.sa_sigaction);
+ #ifdef SIGBUS // {
                        sigaction(SIGBUS, NULL, &oact);
                        printf("SIGBUS Handler: %x\n", oact.sa_sigaction);
+ #endif // }
                        printf("sigsegv_handler: %x\n", sigsegv_handler);
  #ifdef ECL_USE_MPROTECT
                        printf("Protecting %x\n", the_env);
***************
*** 497,504 ****
--- 501,510 ----
                                mysignal(code_int, SIG_DFL);
                        else if (code_int == SIGSEGV)
                                mysignal(code_int, sigsegv_handler);
+ #ifdef SIGBUS // {
                        else if (code_int == SIGBUS)
                                mysignal(code_int, sigbus_handler);
+ #endif // }
                        else
                                mysignal(code_int, non_evil_signal_handler);
                        @(return Ct)


With all of the above out of the way, I still run into:
../../src/c/unixint.d(351) : error C2079: 'oact' uses undefined struct
'sigaction'
../../src/c/unixint.d(356) : error C2224: left of '.sa_sigaction' must have
struct/union type
../../src/c/unixint.d(422) : error C2065: 'sigsegv_signal_handler' :
undeclared identifier
../../src/c/unixint.d(436) : error C2065: 'info' : undeclared identifier
../../src/c/unixint.d(436) : error C2223: left of '->si_addr' must point to
struct/union

These occur because the code relies on UNIX-specific signal handling
functionality. I'm not sure how to address those.

  Claus

http://www.clausbrod.de/Blog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20090227/3f9595cd/attachment.html>


More information about the ecl-devel mailing list