[Ecls-list] Some changes for an ECL --with-cxx build

Erik Winkels aerique at xs4all.nl
Fri Dec 5 12:19:10 UTC 2008


Hi,

Even though it's specifically asked on http://ecls.sourceforge.net/resources.html
to submit fixes and improvements through the tracker I'm going to submit
them to this list as well, since the patches tracker didn't seem to have
been used before.

This is for the downloadable, non-cvs 0.9l release.

Following are some changes I had to make to the ECL sources to make it
compile with the --with-cxx switch on Linux Debian Test (and I didn't want
to compile with --without-gmp and --without-tcp).

These changes were checked against the SourceForge CVS version of ECL and
they weren't in there yet.

I had to add the following clines form to contrib/sockets/sockets.lisp:

    ;; Foreign functions

    (clines 
      "#ifdef __cplusplus"
      "extern \"C\" {"
      "int close(int);"
      "}"
      "#endif")

    (defentry ff-socket (:int :int :int) (:int "socket"))


And I had to add #ifdef _GMP_H... to src/gmp/gmp-h.in:

    #define mpq_denref(Q) (&((Q)->_mp_den))


    #if defined (__cplusplus)
    extern "C" {
    #ifdef _GMP_H_HAVE_FILE
    using std::FILE;
    #endif
    #endif

    #define mp_set_memory_functions __gmp_set_memory_functions


Regards,
Erik




More information about the ecl-devel mailing list