State of the expect cvs head source code?

Help
2010-04-07
2013-05-02
  • I've been struggling for a while now to get the current cvs head to compile and run properly. There are a variety of things that I have to change in the code to get it to compile using Sun's C compiler, which is a requirement for my site. After I fiddle around long enough to get the source to compile, then it core dumps when I run the test suite.

    I'm just curious whether other people on other platforms are seeing the same issues.

     
  • Well, after hacking of a half dozen of the files, I've reached a problem in Dbg.c that I've not been able to figure out how to fix.

    Near the top of the file is:

    static int simple_interactor(Tcl_Interp *);
    static int zero(Tcl_Interp *, char *);

    /* most of the static variables in this file may be */
    /* moved into Tcl_Interp */

    static Dbg_InterProc *interactor = simple_interactor;

    The compiler says:

    "/usr/include/limits.h", line 236: warning: macro redefined: LLONG_MIN
    "/usr/include/limits.h", line 237: warning: macro redefined: LLONG_MAX
    "/usr/include/varargs.h", line 69: warning: macro redefined: va_start
    "/usr/include/varargs.h", line 86: warning: macro redefined: va_end
    "../Dbg.c", line 31: warning: initialization type mismatch
    "../Dbg.c", line 1116: warning: argument mismatch
    "../Dbg.c", line 1144: operands have incompatible types:
             pointer to function(pointer to struct Tcl_Interp {pointer to char unused3, pointer to function(..) returning void unused4, int unused5}, pointer to void) returning int ":" pointer to function(pointer to struct Tcl_Interp {pointer to char unused3, pointer to function(..) returning void unused4, int unused5}) returning int

    Line 31 is the one with interactor.
    Line 1116 is
            interp = TCL_VARARGS_START(Tcl_Interp *,arg1,args);
    I'm uncertain what this is warning about.
    1144 is:
            interactor = (inter_proc?inter_proc:simple_interactor);

    and here again, the attempt to assign the address of a function returning an int to a variable that should be a Dbg_InterProc address is failing.

    I tried forcing a cast, but get an error about an invalid cast.