On Allegro the feature  
   (pushnew 'no-long-long *features*)
is always set.

The no-long-long feature is incredibly broken on 64-bit Linux, as it
assumes that a long is 32-bits when it is actually 64-bits. This causes
very hard crashes (Allegro's strange SIGEMT).

64-bit Allegro can handle long-longs. On Linux an long is a long-long,
but on MS Windows a long is an int. Therefore we use the :nat and
:unsigned-nat types which are consistently 64-bit.

Here is a patch to correct it; I think I munged the beautiful whitespace
though (with my proportional width font it looks munged anyway . . .).

--- old-cffi/src/cffi-allegro.lisp	2009-08-20 11:33:41.000000000 +0900
+++ new-cffi/src/cffi-allegro.lisp	2009-08-20 11:33:41.000000000 +0900
@@ -63,7 +63,9 @@
 
 ;;;# Mis-features
 
+#-64bit
 (pushnew 'no-long-long *features*)
+
 (pushnew 'flat-namespace *features*)
 
 ;;;# Symbol Case
@@ -184,6 +186,10 @@
     (:unsigned-int     :unsigned-int)
     (:long             :long)
     (:unsigned-long    :unsigned-long)
+#+64bit
+    (:unsigned-long-long :unsigned-nat)
+#+64bit
+    (:long-long :nat)
     (:float            :float)
     (:double           :double)
     (:pointer          :unsigned-nat)

_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel

Reply via email to