Subject: [clisp-list] "global" no longer defined in clisp.h

From: Aurelio Bignoli <[email-masked]>
Date: Wed Oct 8 14:47:13 2003

Since 2.31, "global" is no longer defined in clisp.h (at least under
Linux), but it is used by the compiler for call-in functions.

Test code:

(eval-when (:compile-toplevel)
  (use-package :ffi))

(def-call-in call-in-test
  (:name "call_in_test")
  (:return-type int)
  (:language :stdc))

C code generated by compilation:

#include "clisp.h"

extern object module__call_in_test__object_tab[];

global int (call_in_test) (void)
{
[...]

---

From: Sam Steingold <[email-masked]>
Date: Thu Oct 9 06:35:14 2003

> * Aurelio Bignoli <[email-masked]> [2003-10-08 16:59:25 +0200]:
>

thanks for the bug report.
it is now fixed in the CVS.
please use the appended patch.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Software is like sex: it's better when it's free.

--- foreign1.lisp.~1.47.~	2003-08-14 11:03:29.897609700 -0400
+++ foreign1.lisp	2003-10-09 09:32:57.721926400 -0400
@@ -932,7 +932,7 @@
                              argtypes)))
       (prepare-c-typedecl rettype)
       ;(mapc #'prepare-c-typedecl argtypes)
-      (format *coutput-stream* "~%global ~A "
+      (format *coutput-stream* "~%extern ~A "
               (to-c-typedecl rettype (format nil "(~A)" c-name)))
       (if (flag-set-p flags ff-language-ansi-c)
         ; ANSI C parameter declarations