From: Bruno H. <br...@cl...> - 2004-08-24 14:18:31
|
> 2004-08-11 Sam Steingold <sd...@gn...> >=20 > * ffi.tst (c-malloc, c-free): added a couple of poor-style tests These tests fail under Linux: =46orm: (LIST (DEF-CALL-OUT C-MALLOC (:ARGUMENTS (L LONG)) (:NAME "malloc")= (:LANGUAGE :STDC) (:RETURN-TYPE C-POINTER) (:LIBRARY "c")) (DEF-CALL-OUT C= =2DFREE (:ARGUMENTS (P C-POINTER)) (:NAME "free") (:LANGUAGE :STDC) (:RETUR= N-TYPE NIL) (:LIBRARY "c"))) CORRECT: (C-MALLOC C-FREE) CLISP : ERROR =46FI::FOREIGN-LIBRARY: Kann Bibliothek "c" nicht =F6ffnen: "c: cannot open= shared object file: No such file or directory" =46orm: (LET ((M (C-MALLOC 4)) RET) (UNWIND-PROTECT (WITH-C-VAR (V '(C-PTR = (C-ARRAY UINT8 4))) (SETF (CAST V 'C-POINTER) M) (WITH-C-VAR (I '(C-PTR UIN= T32)) (SETF (CAST I 'C-POINTER) M) (SETQ I 0) (PUSH V RET) (SETQ I (1- (ASH= 1 32))) (PUSH V RET) (SETQ V #(1 2 3 4)) (ASSERT (OR (=3D I (+ (ASH 4 24) = (ASH 3 16) (ASH 2 8) 1)) (=3D I (+ (ASH 1 24) (ASH 2 16) (ASH 3 8) 4))))) (= NREVERSE RET)) (C-FREE M))) CORRECT: (#(0 0 0 0) #(255 255 255 255)) CLISP : ERROR EVAL: Die Funktion C-MALLOC ist nicht definiert. I cannot fix this, because I don't know whether the test should have (:LIBRARY "libc"), or whether DEF-CALL-OUT should do the transformation "c" -> "libc" on its own. Bruno |