Add :long-long support
authorKevin Rosenberg <kevin@rosenberg.net>
Fri, 29 Jan 2010 21:22:14 +0000 (14:22 -0700)
committerKevin Rosenberg <kevin@rosenberg.net>
Fri, 29 Jan 2010 21:22:14 +0000 (14:22 -0700)
ChangeLog
doc/fo.xsl
doc/html.tar.gz
doc/ref_primitive.xml
doc/uffi.pdf
src/primitives.lisp

index 3ceca64638f5ddd4a38c75b6ff1a920b05962e50..792933b62a4db29f687a73a4f4d06a74aed1fd35 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-29 Kevin Rosenberg (kevin@rosenberg.net)
+       * Version 1.7.1
+       * src/primitives.lisp: Add :long-long and :unsigned-long-long
+       for lisp implementations that support it. Push uffi:no-long-long
+       on cl:*features* for lisp implementations that don't support it.
+
 2010-01-28 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.7.0
        * src/{functions.lisp,objects.lisp,strings.lisp}: Support Lispworks 6
 2006-09-02 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.5.16
        * src/libraries.lisp: Add cygwin support
-       
+
 2006-08-13 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.5.15
-       * src/{objects,strings}.lisp: Add support for Lispworks 5 
-       thanks to patches from Bill Atkins 
+       * src/{objects,strings}.lisp: Add support for Lispworks 5
+       thanks to patches from Bill Atkins
 
 2006-07-04 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.5.14
        * src/{objects,strings}.lisp: Apply patch from Edi Weitz
 
 2006-05-17 Kevin Rosenberg (kevin@rosenberg.net)
-       * Version 1.5.13 
+       * Version 1.5.13
        * src/libraries.lisp: Revert buggy patch from Yaroslav Kavenchuk.
 
 2006-05-17 Kevin Rosenberg (kevin@rosenberg.net)
-       * Version 1.5.12 
+       * Version 1.5.12
        * src/libraries.lisp: Patch from Yaroslav Kavenchuk to set
        default drive letters on MS Windows.
 
@@ -59,7 +65,7 @@
 2005-11-14 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.5.7
        * src/strings.lisp: Add with-foreign-strings by James Biel
-       
+
 2005-11-14 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.5.6
        * src/os.lisp: Remove getenv setter
 2005-11-07 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.5.5
        * src/os.lisp: Add support for getenv getter and setter
-       
+
 2005-09-17 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.5.4
        * src/objects.lisp: prepend _ character for entry
        point on Allegro macosx, patch by Luis Oliveira
-       
+
 2005-07-05 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.5.0
        * Remove vestigial LLGPL license notices as UFFI as been
        BSD-licensed for several years.
-       
+
 2005-06-09 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.4.39
-       * tests/objects.lisp: Rename from pointers.lisp. 
+       * tests/objects.lisp: Rename from pointers.lisp.
        Fix test CHPTR.4 as noted by Jorg Hohle
        * src/objects.lisp: Remove default from ensure-char-integer
-       
+
 2005-06-09 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.4.38
        * src/libraries.lisp: Commit patch from Edi Weitz to
        * tests/cast.lisp: Add :module keyword as noted by Jorg Hohle.
        * src/strings.lisp: Avoid multiple evaluation of input
        parameters for macros as noted by Jorg Hohle.
-       
+
 2005-04-12 Kevin Rosenberg (kevin@rosenberg.net)
        * Version 1.4.37
        * src/strings.lisp: Fix variable name
-       
+
 2005-04-04 Kevin Rosenberg (kevin@rosenberg.net)
        * src/strings.lisp, src/aggregates.lisp: Support change in SBCL copy
        function [Thanks for Nathan Froyd and Zach Beane]
-       
+
 2005-04-03 Kevin Rosenberg (kevin@rosenberg.net)
        * src/objects.lisp: Commit patch from James Bielman to add
        def-foreign-var support for OpenMCL
-       
+
 2005-03-03 Kevin Rosenberg (kevin@rosenberg.net)
        * src/primitives.lisp: Add support for :union types
        [patch from Cyrus Harmon]
        * tests/union.lisp, tests/structs.lisp: Tests for
        union and structure types [from Cyrus Harmon]
-       
+
 2005-02-22 Kevin Rosenberg (kevin@rosenberg.net)
-       * src/primitives.lisp, src/strings.lisp: Better support 
+       * src/primitives.lisp, src/strings.lisp: Better support
        for sb-unicode [from Yoshinori Tahara and R. Mattes]
 
 2005-01-22 Kevin Rosenberg (kevin@rosenberg.net)
        * src/primitives.lisp: Better support SBCL-AMD64
-       
+
 2004-11-08 Kevin Rosenberg (kevin@rosenberg.net)
        * src/strings.lisp: Better support sb-unicode
        * tests/compress.lisp: Support sb-unicode
-       
+
 2004-10-07 Kevin Rosenberg (kevin@rosenberg.net)
        * src/objects.lisp: Add new function:
        convert-from-foreign-usb8
-       
+
 2004-04-15 Kevin Rosenberg (kevin@rosenberg.net)
        * src/objects.lisp: Add new functions:
        MAKE-POINTER and POINTER-ADDRESS
 
 2003-08-15 Kevin Rosenberg (kevin@rosenberg.net)
        * Added with-cast-pointer and def-foreign-var (patches submitted
-       by Edi Weitz). 
+       by Edi Weitz).
        * Added many new tests
-       
+
 2002-10-16 Kevin Rosenberg (kevin@rosenberg.net)
         * Added support for SBCL and SCL
-       
+
 2002-09-29 Kevin Rosenberg (kevin@rosenberg.net)
        * Numerous changes in openmcl support (uffi now supports
        clsql on openmcl)
-       
+
 2002-09-19 Kevin Rosenberg (kevin@rosenberg.net)
         - Integrate John Desoi's OpenMCL support into src-mcl
        * examples/Makefile: add section for building on MacOS X (John Desoi)
        * examples/test-examples: changed from mk: to asdf: package loading (KMR)
-       * examples/run-examples: changed from mk: to asdf: package loading (KMR), 
+       * examples/run-examples: changed from mk: to asdf: package loading (KMR),
        add conditional loading if UFFI not loaded (John Desoi)
        * examples/compress.cl: Add dylib to library types for MacOSX (John Desoi),
        converted compressed output to hexidecimal display (KMR)
        * examples/union.cl: Rework the tests (KMR)
        * src-main/libraries.cl: add dylib as default library type on MacOSX (John Desoi)
        * src-main/aggregates.cl: convert from uffi type in deref-array (John Desoi)
-       
+
 2002-09-16 Kevin Rosenberg (kevin@rosenberg.net)
        - Restructure directories to move to a asdf definition file
        without pathnames.
-       
+
 2002-08-25 Kevin Rosenberg (kevin@rosenberg.net)
        - Restructure directories to attempt to properly handle both
        Common Lisp Controller and non-CLC systems
-       
-2002-08-17 Kevin Rosenberg (kevin@rosenberg.net)
 
+2002-08-17 Kevin Rosenberg (kevin@rosenberg.net)
        - add uffi.asd for ASDF users
 
 2002-08-01 Kevin Rosenberg (kevin@rosenberg.net)
        - Restructure directories to improve Common Lisp Controller v3
        compatibility
-       
-2002-07-25 Kevin Rosenberg (kevin@rosenberg.net)
 
+2002-07-25 Kevin Rosenberg (kevin@rosenberg.net)
        - Rework handling of logical pathnames.
        - Move run-examples.cl to examples directory.
-       
-2002-06-28 Kevin Rosenberg (kevin@rosenberg.net)
 
+2002-06-28 Kevin Rosenberg (kevin@rosenberg.net)
        - Added size-of-foreign-type function.
-       
-2002-06-26 Kevin Rosenberg (kevin@rosenberg.net)
 
+2002-06-26 Kevin Rosenberg (kevin@rosenberg.net)
        - Fix bug in Lispworks allocate-foreign-object
-       - Added new :unsigned-byte type. Made :byte signed. 
-       
+       - Added new :unsigned-byte type. Made :byte signed.
+
 2002-04-27 Kevin Rosenberg (kevin@rosenberg.net)
        - misc files
        First debian version
-       
+
 2002-04-23 Kevin Rosenberg (kevin@rosenberg.net)
        - doc/*
        Updated to debian docbook catalog
-       
+
 2002-04-23 John DeSoi (desoi@mac.com)
        * src/mcl/*
        Improved MCL support
        Added documentation for find-foreign-library
        * uffi.system:
        Simplied logical pathnames and MCL loading
-       
+
 2002-04-04 John DeSoi (desoi@mac.com)
        * src/mcl/*.cl
        Added initial support for MCL
        Added support for SPARC big-endian
        * test-examples.cl:
        Automated testing suite
-       
+
 2002-04-01 Kevin Rosenberg (kevin@rosenberg.net)
        * src/libraries.cl:
        * examples/Makefile:
        Create a .a library file for FreeBSD
        * src/libraries.cl:
        Added default type and find-foreign-library functions
-       
+
 2002-03-29  Kevin Rosenberg (kevin@rosenberg.net)
-       * src/objects.cl: 
+       * src/objects.cl:
        Fixed bug in deref-pointer (Thanks John Desoi!)
 
 2002-03-22  Kevin Rosenberg (kevin@rosenberg.net)
-       * src/aggregates.cl: 
+       * src/aggregates.cl:
        Changed name and implementation of def-array to more appropriate
        def-array-pointer
        * src/ref.sgml:
        Made type be evaluated for with-foreign-object and allocate-foreign-object
        * VERSION:
        Increase to 0.3.0 to coincide with the release of CLSQL.
-       
+
 21 Mar 2002
        * Fixed problem with NULL foreign-strings with CMUCL
        * Added c-test-fns to examples for allow more specific testing
        of UFFI. Builds on UNIX and Win32 platforms.
        * Added def-union function, added union.cl example
        * Fixed error with ensure-char-[character|integer]
-       * Added 2-d array example to examples/arrays.cl 
+       * Added 2-d array example to examples/arrays.cl
        * Fixed documentation error on gethostname
        * Added ensure-char-* and def-union to documentation
        * Added double-float vector example to c-test-fns
        converting a char array to a char pointer
        * Converted with-foreign-object to use stack allocation on CMUCL and LW
        * Added benchmark code, first file is for allocation
-       
+
 20 Mar 2002
        * Updated strings.cl so that foreign-strings are always unsigned.
        Fixes a problem with strtol example.
        differences in implementations dereferencing of (* :char).
        * Added section on design priorities for UFFI
        * Added section in TODO on splitting implementation-dependent code
-       
+
 19 Mar 2002
        * Added size parameter to allocate-foreign-object. Creates an array
        of dimensions size.
        * Got array-2d example working with a 1-d array.
        * Cleaned strtol example
        * Added TODO file
-       
+
 18 Mar 2002
        * Documentation fixes (Erik Winkels)
        * Fixed missing '.' in CMUCL type declarations (Erik Winkels)
-       
+
 17 Mar 2002
        * Changed deref-pointer so it always returns a character when
        called with a :char or :unsigned-char type
        * Changed default string type in Lispworks to :unsigned-char
        which is the native type for Lispworks foreign-strings.
        * Reworked strtol to handle new character pointing method
-       
+
 16 Mar 2002
        * Fixed return value in load-foreign-library (Thanks Erik Winkels),
        modified routine to accept pathnames as well as strings.
        * Fix documention with :pointer-void (Again, Erik Winkels)
        * Added missing type specifiers for CMUCL (Thanks a bunch, Erik!)
-       
+
 15 Mar 2002
        * Finished basic skeleton of documentation.
-       
+
 14 Mar 2002
        * Changed license to more liberal Lisp Lessor GNU Public License
-       * Fixed problem with uffi.system absent from in distribution 
+       * Fixed problem with uffi.system absent from in distribution
        (Thanks John DeSoi)
        * Fixed compiler warnings
-       
 
 11 Mar 2002
        * Changed def-type to def-foreign-type
        * Created new macro def-type to generate cl:deftype forms. Removed
        uffi-declare and uffi-slot-type as they are no longer necessary.
-        
+
 10 Mar 2002
        * Modified input parameters to load-foreign-library
        * Added to documention
-       * Changed parameter order in get-slot-value and deref-array 
-       
+       * Changed parameter order in get-slot-value and deref-array
+
 9 Mar 2002
        * Added to documentation
        * Made Allegro CL array access more efficient
        * Modified compress.cl to setup output buffer as :unsigned*char
        * Added test-all-examples function. All routines tested okay with
        ACL, LW, and CMUCL
-       
+
 8 Mar 2002
        * Added ZIP file output with LF->CRLF translations to distribution
        * Modified def-enum to use uffi:def-constant rather than
        cl:defconstant
-       
index d04b2de90eb28e8666ebb1aa7887061aed465866..d5e959d4b332bc165efe5abb7507396fde636c1e 100644 (file)
@@ -3,6 +3,6 @@
                 version="1.0">
 
 <xsl:import href="docbook_fo.xsl"/>
-<xsl:param name="fop.extensions" select="1"/>
+<xsl:param name="fop1.extensions" select="1"/>
 </xsl:stylesheet>
 
index d673780e595ed210f4ed4fdc5d4cdc9812f1da4b..3eb7a92781fce758398c0357f414b20b92c607d0 100644 (file)
Binary files a/doc/html.tar.gz and b/doc/html.tar.gz differ
index d9c3fda455bc44ca4473c423fc5ae04f9092c3c4..79003698666d8ac462b6f70f4c4bd108ce2f3766 100644 (file)
        <para><constant>:unsigned-int</constant> - Unsigned 32-bits.</para>
       </listitem>
       <listitem>
-       <para><constant>:long</constant> - Signed 32 or 64 bits, depending upon the platform.</para>
+       <para><constant>:long</constant> - Signed 32 or 64 bit integer,
+       depending upon the platform.</para>
       </listitem>
       <listitem>
-       <para><constant>:unsigned-long</constant> - Unsigned 32 or 64 bits, depending upon the platform.</para>
+       <para><constant>:unsigned-long</constant> - Unsigned 32 or 64
+          bit integer, depending upon the platform.</para>
+      </listitem>
+      <listitem>
+       <para><constant>:long-long</constant> - Signed 64 bits integer
+          for implementations that support this.  If implementation
+          does not support
+          this, <constant>'uffi:no-long-long</constant> is pushed on
+          the <variable>cl:*features*</variable> list.</para>
+      </listitem>
+      <listitem>
+       <para><constant>:unsigned-long-long</constant> - Unsigned 64
+          bits integer for implementations that support this.  If
+          implementation does not support
+          this, <constant>'uffi:no-long-long</constant> is pushed on
+          the <variable>cl:*features*</variable> list.</para>
       </listitem>
       <listitem>
        <para><constant>:float</constant> - 32-bit floating point.</para>
index 0b97225607c4aae28632233346003e3c3ef8fe7c..ecc4dac676f5a79f574bf416c886c5e30f3e1776 100644 (file)
Binary files a/doc/uffi.pdf and b/doc/uffi.pdf differ
index 35c1d86ee96d18a68e49cded2f9d208e33586fd4..50023b354919a1932ae1e06d07efcd29f4cbe89a 100644 (file)
@@ -98,6 +98,8 @@ supports takes advantage of this optimization."
       #-x86-64 (:unsigned-long . (alien:unsigned 32))
       #+x86-64 (:long . (alien:signed 64))
       #+x86-64 (:unsigned-long . (alien:unsigned 64))
+      (:long-long (alien:signed 64))
+      (:unsigned-long-long (alien:unsigned 64))
       (:float . alien:single-float)
       (:double . alien:double-float)
       (:void . t)
@@ -118,6 +120,8 @@ supports takes advantage of this optimization."
       #-x86-64 (:unsigned-long . (sb-alien:unsigned 32))
       #+x86-64 (:long . (sb-alien:signed 64))
       #+x86-64 (:unsigned-long . (sb-alien:unsigned 64))
+      (:long-long (sb-alien:signed 64))
+      (:unsigned-long-long (sb-alien:unsigned 64))
       (:float . sb-alien:single-float)
       (:double . sb-alien:double-float)
       (:void . t)
@@ -139,6 +143,8 @@ supports takes advantage of this optimization."
       (:unsigned-short . c-call:unsigned-short)
       (:int . alien:integer) (:unsigned-int . c-call:unsigned-int)
       (:long . c-call:long) (:unsigned-long . c-call:unsigned-long)
+      (:long-long . c-call:long-long)
+      (:unsigned-long-long . c-call:unsigned-long-long)
       (:float . c-call:float) (:double . c-call:double)
       (:array . alien:array)))
 
@@ -156,6 +162,8 @@ supports takes advantage of this optimization."
       (:unsigned-short . sb-alien:unsigned-short)
       (:int . sb-alien:int) (:unsigned-int . sb-alien:unsigned-int)
       (:long . sb-alien:long) (:unsigned-long . sb-alien:unsigned-long)
+      (:long-long . sb-alien:long-long)
+      (:unsigned-long-long . sb-alien:unsigned-long-long)
       (:float . sb-alien:float) (:double . sb-alien:double)
       (:array . sb-alien:array)))
 
@@ -174,6 +182,9 @@ supports takes advantage of this optimization."
       (:float . :float) (:double . :double)
       (:array . :array)))
 
+#+(or allegro cormanlisp)
+(push 'uffi:no-long-long cl:*features)
+
 #+lispworks
 (setq *type-conversion-list*
     '((* . :pointer) (:void . :void)
@@ -191,9 +202,14 @@ supports takes advantage of this optimization."
       (:unsigned-char . (:unsigned :char))
       (:int . :int) (:unsigned-int . (:unsigned :int))
       (:long . :long) (:unsigned-long . (:unsigned :long))
+      #+lispworks6 (:long-long . :int64)
+      #+lispworks6 (:unsigned-long-long . :uint64)
       (:float . :float) (:double . :double)
       (:array . :c-array)))
 
+#+(and lispworks (not lispworks6))
+(push 'uffi:no-long-long cl:*features)
+
 #+digitool
 (setq *type-conversion-list*
      '((* . :pointer) (:void . :void)
@@ -207,6 +223,8 @@ supports takes advantage of this optimization."
        (:long . :long) (:unsigned-long . :unsigned-long)
        (:float . :single-float) (:double . :double-float)
        (:array . :array)))
+#+digitool
+(push 'uffi:no-long-long cl:*features)
 
 #+openmcl
 (setq *type-conversion-list*