clsql/db-mysql Makefile,1.1,1.2 clsql-mysql.c,1.1,1.2 mysql-loader.lisp,1.5,1.6
"Kevin M. Rosenberg" <[email protected]> Mon, 9 Dec 2002 03:34:18 -0700
| Newsgroups | gmane.lisp.clsql.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /pubcvs/clsql/db-mysql
In directory boa.b9.com:/tmp/cvs-serv2151/clsql/db-mysql
Modified Files:
Makefile clsql-mysql.c mysql-loader.lisp
Log Message:
Index: Makefile
===================================================================
RCS file: /pubcvs/clsql/db-mysql/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Makefile 18 Sep 2002 07:43:40 -0000 1.1
--- Makefile 9 Dec 2002 10:34:16 -0000 1.2
***************
*** 4,8 ****
#
# Name: Makefile
! # Purpose: Makefile for the CLSQL UFFI helper package
# Programer: Kevin M. Rosenberg
# Date Started: Mar 2002
--- 4,8 ----
#
# Name: Makefile
! # Purpose: Makefile for the CLSQL MySQL database interface
# Programer: Kevin M. Rosenberg
# Date Started: Mar 2002
***************
*** 50,55 ****
$(CC) ${SHARED_CC_OPT} $(INCLUDE_DIRS) -c $< -o $@
! $(shared_lib): $(object) -lmysqlclient
$(LD) ${SHARED_LD_OPT} $^ -o $@
clean:
--- 50,60 ----
$(CC) ${SHARED_CC_OPT} $(INCLUDE_DIRS) -c $< -o $@
! $(shared_lib): $(object)
$(LD) ${SHARED_LD_OPT} $^ -o $@
+
+ mac: $(object)
+ ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress $(object) -o $(base).dylib
+ ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /sw/lib/libmysqlclient.dylib -o libmysqlclient.dylib
+ ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz.dylib -o libz.dylib
clean:
Index: clsql-mysql.c
===================================================================
RCS file: /pubcvs/clsql/db-mysql/clsql-mysql.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** clsql-mysql.c 18 Sep 2002 07:43:40 -0000 1.1
--- clsql-mysql.c 9 Dec 2002 10:34:16 -0000 1.2
***************
*** 53,57 ****
located sent via a pointer */
! const unsigned int bitmask_32bits = 0xFFFFFFFF;
#define lower_32bits(int64) ((unsigned int) int64 & bitmask_32bits)
#define upper_32bits(int64) ((unsigned int) (int64 >> 32))
--- 53,57 ----
located sent via a pointer */
! static const unsigned int bitmask_32bits = 0xFFFFFFFF;
#define lower_32bits(int64) ((unsigned int) int64 & bitmask_32bits)
#define upper_32bits(int64) ((unsigned int) (int64 >> 32))
Index: mysql-loader.lisp
===================================================================
RCS file: /pubcvs/clsql/db-mysql/mysql-loader.lisp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mysql-loader.lisp 23 Nov 2002 18:00:26 -0000 1.5
--- mysql-loader.lisp 9 Dec 2002 10:34:16 -0000 1.6
***************
*** 26,30 ****
;;;; -- support Allegro CL and Lispworks
! (defvar *clsql-mysql-library-filename*
(uffi:find-foreign-library
"clsql-mysql"
--- 26,30 ----
;;;; -- support Allegro CL and Lispworks
! (defparameter *clsql-mysql-library-path*
(uffi:find-foreign-library
"clsql-mysql"
***************
*** 34,43 ****
"/home/kevin/debian/src/clsql/db-mysql/")
:drive-letters '("C" "D" "E")))
(defvar *mysql-library-candidate-names*
'("libmysqlclient" "libmysql"))
! (defvar *mysql-library-candidate-directories*
! '("/opt/mysql/lib/mysql/" "/usr/local/lib/" "/usr/lib/" "/usr/local/lib/mysql/" "/usr/lib/mysql/" "/mysql/lib/opt/" "/sw/lib/mysql/"))
(defvar *mysql-library-candidate-drive-letters* '("C" "D" "E"))
--- 34,54 ----
"/home/kevin/debian/src/clsql/db-mysql/")
:drive-letters '("C" "D" "E")))
+
+ (defparameter *libz-library-path*
+ (uffi:find-foreign-library
+ "libz"
+ `(,(make-pathname :directory (pathname-directory *load-truename*))
+ "/usr/lib/"
+ "/sw/lib/"
+ "/usr/local/lib/"
+ "/home/kevin/debian/src/clsql/db-mysql/")
+ :drive-letters '("C" "D" "E")))
(defvar *mysql-library-candidate-names*
'("libmysqlclient" "libmysql"))
! (defparameter *mysql-library-candidate-directories*
! `(,(pathname-directory *load-pathname*)
! "/opt/mysql/lib/mysql/" "/usr/local/lib/" "/usr/lib/" "/usr/local/lib/mysql/" "/usr/lib/mysql/" "/mysql/lib/opt/" "/sw/lib/mysql/"))
(defvar *mysql-library-candidate-drive-letters* '("C" "D" "E"))
***************
*** 59,78 ****
*mysql-library-candidate-directories*
:drive-letters
! *mysql-library-candidate-drive-letters*))
! (zlib-path
! (uffi:find-foreign-library '("libz" "zlib")
! '("/usr/lib/" "/usr/local/lib/" "/lib/"))))
(unless (probe-file mysql-path)
(error "Can't find mysql client library to load"))
- (unless (probe-file zlib-path)
- (error "Can't find zlib client library to load"))
-
- (uffi:load-foreign-library zlib-path)
(if (and
(uffi:load-foreign-library mysql-path
:module "mysql"
:supporting-libraries
*mysql-supporting-libraries*)
! (uffi:load-foreign-library *clsql-mysql-library-filename*
:module "clsql-mysql"
:supporting-libraries
--- 70,83 ----
*mysql-library-candidate-directories*
:drive-letters
! *mysql-library-candidate-drive-letters*)))
(unless (probe-file mysql-path)
(error "Can't find mysql client library to load"))
(if (and
+ (uffi:load-foreign-library *libz-library-path*)
(uffi:load-foreign-library mysql-path
:module "mysql"
:supporting-libraries
*mysql-supporting-libraries*)
! (uffi:load-foreign-library *clsql-mysql-library-path*
:module "clsql-mysql"
:supporting-libraries