r11417: 28 Dec 2006 Kevin Rosenberg <kevin@rosenberg.net>
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 30 Dec 2006 21:36:58 +0000 (21:36 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 30 Dec 2006 21:36:58 +0000 (21:36 +0000)
* Version 3.7.9
* sql/expressions.lisp: Commit patch from Edi Weitz to
use *default-database* for SQL-OUTPUT if no database is
explicitly passed to function.
* uffi/clsql-uffi-loader.lisp: Change load order to first try
plain name/type before attempting user-specified paths (patch
from Edi Weitz)
* uffi/ptrbits.c: New file to return number of bits in an pointer
* uffi/Makefile: use intbits to name .so file based on bit size.
Build both 32-bit and 64-bit libraries on 64-bit platform.

ChangeLog
debian/changelog
uffi/.gitignore
uffi/Makefile.32+64bits [new file with mode: 0644]

index e4a5cd4e94c9d18e259ec440f959d534328743c1..c0e40cfae0b18364194f183621975012a81d90b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,12 @@
        * sql/expressions.lisp: Commit patch from Edi Weitz to
        use *default-database* for SQL-OUTPUT if no database is
        explicitly passed to function.
+       * uffi/clsql-uffi-loader.lisp: Change load order to first try
+       plain name/type before attempting user-specified paths (patch
+       from Edi Weitz)
+       * uffi/ptrbits.c: New file to return number of bits in an pointer
+       * uffi/Makefile: use intbits to name .so file based on bit size.
+       Build both 32-bit and 64-bit libraries on 64-bit platform.
        
 30 Nov 2006  Kevin Rosenberg <kevin@rosenberg.net>
        * Version 3.7.8
index a821b31fb5e6cc4ac21e0dec4f2bcae44d15d623..3d633065f587e1fd342bb0f1b0933dfabf1cb6d3 100644 (file)
@@ -2,7 +2,7 @@ cl-sql (3.7.9-1) unstable; urgency=low
 
   * New upstream
 
- -- Kevin M. Rosenberg <kmr@debian.org>  Thu, 28 Dec 2006 11:07:05 -0700
+ -- Kevin M. Rosenberg <kmr@debian.org>  Sat, 30 Dec 2006 14:36:03 -0700
 
 cl-sql (3.7.8-1) unstable; urgency=low
 
index 6d99fcae4ded0f4aed94f17a6145b31b2fed021c..f999fc44f16e6f75378a150d8b55ed43f1e4b9ed 100644 (file)
@@ -1,4 +1,6 @@
 clsql_uffi.so
+clsql_uffi32.so
+clsql_uffi64.so
 uffi.so
 uffi.dll
 uffi.lib
@@ -13,3 +15,4 @@ uffi.dylib
 *.faslm16
 *.faslm8
 *.fsl
+intbits
diff --git a/uffi/Makefile.32+64bits b/uffi/Makefile.32+64bits
new file mode 100644 (file)
index 0000000..b781aca
--- /dev/null
@@ -0,0 +1,99 @@
+#!/usr/bin/make
+# FILE IDENTIFICATION
+#
+#  Name:         Makefile
+#  Purpose:      Makefile for CLSQL UFFI interface
+#  Programer:    Kevin M. Rosenberg
+#  Date Started: Mar 2002
+#
+#  CVS Id:   $Id: Makefile 11058 2006-08-30 08:05:21Z kevin $
+#
+# This file, part of CLSQL, is Copyright (c) 2002-2006 by Kevin M. Rosenberg
+#
+# CLSQL users are granted the rights to distribute and use this software
+# as governed by the terms of the Lisp Lesser GNU Public License
+# (http://opensource.franz.com/preamble.html), also known as the LLGPL.
+
+SUBDIRS=
+
+include ../Makefile.common
+
+PTRBITS:=$(shell gcc -o ptrbits ptrbits.c && ./ptrbits)
+
+base:=clsql_uffi
+basebits:=$(base)
+ifeq ($(PTRBITS),64)
+    basebits:=$(base)64
+endif
+source=$(base).c
+object=$(basebits).o
+shared_lib=$(basebits).so
+shared_lib32=$(base)32.so
+object32=$(base)32.o
+
+.PHONY: all
+ifeq ($(PTRBITS),64)
+  all: $(shared_lib) $(shared_lib32)
+else
+  all: $(shared_lib)
+endif
+
+$(shared_lib): $(source) Makefile
+ifneq ($(OS_AIX),0)
+       gcc -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $(source)
+       make_shared -o $(shared_lib) $(object)
+else
+  ifneq ($(OS_SUNOS),0)
+       cc -KPIC -c $(source) -o $(object)
+       cc -G $(object) -o $(shared_lib)
+  else
+    ifneq ($(OS_DARWIN),0)
+       cc -dynamic -c $(source) -o $(object)
+       ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $(base).dylib $(object)
+       ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz.dylib -o z.dylib
+    else
+      ifneq ($(OS_CYGWIN),0)
+       gcc -c $(source) -o $(object)
+       ld -shared -soname=$(base) $(LDFLAGS) $(object) -o $(shared_lib)
+      else
+       gcc -fPIC -DPIC -c $(source) -o $(object)
+       ld -shared -soname=$(base) -lc $(object) -o $(shared_lib)
+      endif
+    endif
+  endif
+endif
+       rm $(object)
+
+ifeq ($(PTRBITS),64)
+$(shared_lib32): $(source) Makefile
+  ifneq ($(OS_AIX),0)
+         gcc -m32 -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $(source) -o ($object32)
+         make_shared -o $(shared_lib32) $(object32)
+  else
+    ifneq ($(OS_SUNOS),0)
+         cc -m32 -KPIC -c $(source) -o $(object32)
+         cc -G $(object32) -o $(shared_lib32)
+    else
+      ifneq ($(OS_DARWIN),0)
+         cc -m32 -dynamic -c $(source) -o $(object32)
+         ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $(base)32.dylib $(object32)
+         ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz32.dylib -o z.dylib
+      else
+        ifneq ($(OS_CYGWIN),0)
+         gcc -m32 -c $(source) -o $(object32)
+         ld -shared -soname=$(base) $(LDFLAGS) $(object32) -o $(shared_lib32)
+        else
+         gcc -m32 -fPIC -DPIC -c $(source) -o $(object32)
+         ld -shared -soname=$(base) -L /lib32 -L /usr/lib32 -lc $(object32) -o $(shared_lib32)
+        endif
+      endif
+    endif
+  endif
+endif
+       rm $(object32)
+
+.PHONY: distclean
+distclean: clean
+       rm -f $(base).dylib $(base).dylib $(basebits).so $(base).o ptrbits
+