From 9db6946c8331a477b309608ec6232cbfabb97d24 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sat, 30 Dec 2006 21:36:58 +0000 Subject: [PATCH] r11417: 28 Dec 2006 Kevin Rosenberg * 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 | 6 +++ debian/changelog | 2 +- uffi/.gitignore | 3 ++ uffi/Makefile.32+64bits | 99 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 uffi/Makefile.32+64bits diff --git a/ChangeLog b/ChangeLog index e4a5cd4..c0e40cf 100644 --- 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 * Version 3.7.8 diff --git a/debian/changelog b/debian/changelog index a821b31..3d63306 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ cl-sql (3.7.9-1) unstable; urgency=low * New upstream - -- Kevin M. Rosenberg Thu, 28 Dec 2006 11:07:05 -0700 + -- Kevin M. Rosenberg Sat, 30 Dec 2006 14:36:03 -0700 cl-sql (3.7.8-1) unstable; urgency=low diff --git a/uffi/.gitignore b/uffi/.gitignore index 6d99fca..f999fc4 100644 --- a/uffi/.gitignore +++ b/uffi/.gitignore @@ -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 index 0000000..b781aca --- /dev/null +++ b/uffi/Makefile.32+64bits @@ -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 + -- 2.34.1