From: Thomas F. B. <tfb@OCF.Berkeley.EDU> - 2003-10-29 00:24:57
|
Sam Steingold writes: > > * Thomas F. Burdick <gso@BPS.Orexryrl.RQH> [2003-10-27 17:19:25 -0800]: > > > > I'm trying to compile a clisp with the syscalls module, so I can use > > posix:stream-lock instead of the gross hack I currently use, but > > compiling 2.31 on Linux/x86 dies. I must be doing something wrong, > > because I'd imagine this would be the most tested platform. > > indeed... > > > calls.c: In function `C_subr_posix_file_stat': > > calls.c:553: parse error before `file' > > calls.c:556: `file' undeclared (first use in this function) > > calls.c:556: (Each undeclared identifier is reported only once > > calls.c:556: for each function it appears in.) > > calls.c:557: warning: left-hand operand of comma expression has no effect > > calls.c:561: `buf' undeclared (first use in this function) > > calls.c:578: warning: left-hand operand of comma expression has no effect > > make[1]: *** [calls.o] Error 1 > > make[1]: Leaving directory `/tmp/build/clisp-2.31/build-myclient/syscalls' > > make: *** [syscalls] Error 2 > > I bet your GCC is not 3 (i.e., not C99). Nope, it's 2.95 > Sorry. > Please try the appended patch. Thanks, that almost does it. After applying that patch, the compiler complained that clisp.h was declaring a global variable after a function definition, when it was included from calls.c. With the appended patch, it compiles all the way, and the produced clisp seems to kind-of work. Actually, it dies in "make testsuite" with a segfault on this test: (LET ((H (MAKE-HASH-TABLE :TEST `(,(LAMBDA (A B) (LIST (LIST '= A B)) (= A B)) . ,(LAMBDA (X) (LET ((Z (SXHASH (COERCE X 'DOUBLE-FLOAT)))) (LIST `((HASH ,X) => ,Z)) Z)))))) (LOOP :FOR I :FROM 0 :TO 1000 :DO (SETF (GETHASH I H) (FORMAT NIL "~r" I))) (LOOP :FOR I :FROM 0 :TO 1000 :UNLESS (STRING= (GETHASH (FLOAT I 1.0d0) H) (GETHASH (FLOAT I 1.0s0) H)) :COLLECT I)) make[1]: *** [tests] Segmentation fault The non-syscalls build fails here, cleanly: (IF *NO-ICONV-P* "AZ" (CONVERT-STRING-FROM-BYTES '#(255 254 65 0 13) (MAKE-ENCODING :CHARSET "utf-16" :INPUT-ERROR-ACTION #\Z))) ERROR!! " *** - Character #\uFEFF cannot be represented in the character set CHARSET:ISO-8859-1 I'm a little uncomfortable with the resulting build, but I'll try testing the actual application with it. --- syscalls/calls-orig.c Tue Oct 28 09:42:18 2003 +++ syscalls/calls.c Tue Oct 28 09:42:46 2003 @@ -5,6 +5,7 @@ */ #include "config.h" +#include "clisp.h" #if defined(TIME_WITH_SYS_TIME) # include <sys/time.h> @@ -39,8 +40,6 @@ # define UNIX_CYGWIN32 # undef UNICODE #endif - -#include "clisp.h" /* #define DEBUG */ #if defined(DEBUG) -- /|_ .-----------------------. ,' .\ / | No to Imperialist war | ,--' _,' | Wage class war! | / / `-----------------------' ( -. | | ) | (`-. '--.) `. )----' |