r2755: move files
authorKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 18 Sep 2002 07:51:22 +0000 (07:51 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 18 Sep 2002 07:51:22 +0000 (07:51 +0000)
29 files changed:
Makefile
clsql-aodbc.asd
clsql-base.asd
clsql-mysql.asd
clsql-oracle.asd
clsql-postgresql-socket.asd
clsql-postgresql.asd
clsql-uffi.asd
clsql-uffi/.cvsignore [deleted file]
clsql-uffi/Makefile [deleted file]
clsql-uffi/Makefile.msvc [deleted file]
clsql-uffi/clsql-uffi-loader.cl [deleted file]
clsql-uffi/clsql-uffi-package.cl [deleted file]
clsql-uffi/clsql-uffi.c [deleted file]
clsql-uffi/clsql-uffi.cl [deleted file]
clsql-uffi/clsql-uffi.dll [deleted file]
clsql-uffi/clsql-uffi.lib [deleted file]
clsql.asd
debian/rules
doc/html.tar.gz
uffi/.cvsignore [new file with mode: 0755]
uffi/Makefile [new file with mode: 0644]
uffi/Makefile.msvc [new file with mode: 0644]
uffi/clsql-uffi-loader.cl [new file with mode: 0644]
uffi/clsql-uffi-package.cl [new file with mode: 0644]
uffi/clsql-uffi.c [new file with mode: 0644]
uffi/clsql-uffi.cl [new file with mode: 0644]
uffi/clsql-uffi.dll [new file with mode: 0644]
uffi/clsql-uffi.lib [new file with mode: 0644]

index 4b7b229219321127fec85e509df41f1080bc7fc5..675bc26350cfa51f583b788929eb418a13909d75 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@
 #  Programer:    Kevin M. Rosenberg
 #  Date Started: Mar 2002
 #
 #  Programer:    Kevin M. Rosenberg
 #  Date Started: Mar 2002
 #
-#  CVS Id:   $Id: Makefile,v 1.23 2002/09/18 07:43:40 kevin Exp $
+#  CVS Id:   $Id: Makefile,v 1.24 2002/09/18 07:51:22 kevin Exp $
 #
 # This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 #
 #
 # This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 #
 
 PKG    := clsql
 DEBPKG := cl-sql
 
 PKG    := clsql
 DEBPKG := cl-sql
-SUBDIRS        := sql clsql-uffi base clsql-mysql clsql-aodbc \
-          clsql-postgresql clsql-postgresql-socket 
+SUBDIRS        := sql uffi base db-mysql db-aodbc \
+          db-postgresql db-postgresql-socket 
 DOCSUBDIRS:=doc
 
 include Makefile.common
 
 DOCSUBDIRS:=doc
 
 include Makefile.common
 
-LIBSUBDIRS=clsql-mysql clsql-uffi
+LIBSUBDIRS=db-mysql uffi
 .PHONY: subdirs $(LIBSUBDIRS)
 
 .PHONY: all
 .PHONY: subdirs $(LIBSUBDIRS)
 
 .PHONY: all
index 58eb3d8f150bf57a4df96791a83963884def31aa..1c8e964d0ecf8a0cc0360385f057440106696460 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: clsql-aodbc.asd,v 1.8 2002/09/17 17:18:34 kevin Exp $
+;;;; $Id: clsql-aodbc.asd,v 1.9 2002/09/18 07:50:01 kevin Exp $
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
 
 (defsystem :clsql-aodbc
     :components
 
 (defsystem :clsql-aodbc
     :components
-    ((:module :clsql-aodbc
+    ((:module :db-aodbc
              :components
              ((:file "aodbc-package")
               (:file "aodbc-sql" :depends-on ("aodbc-package")))))
     :depends-on (:clsql-base))
 
 (defmethod source-file-type  ((c cl-source-file)
              :components
              ((:file "aodbc-package")
               (:file "aodbc-sql" :depends-on ("aodbc-package")))))
     :depends-on (:clsql-base))
 
 (defmethod source-file-type  ((c cl-source-file)
-                             (s (eql (find-system 'clsql-aodbc)))) 
+                             (s (eql (find-system :clsql-aodbc)))) 
    "cl")
 
    "cl")
 
index c45a806636a77db87437663feee2e3f31df543e7..48c68a23b9259c8c3e170ff27a89609be6d1bb13 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: clsql-base.asd,v 1.10 2002/09/17 17:16:43 kevin Exp $
+;;;; $Id: clsql-base.asd,v 1.11 2002/09/18 07:50:01 kevin Exp $
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -33,6 +33,6 @@
               (:file "initialize" :depends-on ("db-interface"))))))
 
 (defmethod source-file-type  ((c cl-source-file)
               (:file "initialize" :depends-on ("db-interface"))))))
 
 (defmethod source-file-type  ((c cl-source-file)
-                             (s (eql (find-system 'clsql-base)))) 
+                             (s (eql (find-system :clsql-base)))) 
    "cl")
 
    "cl")
 
index 0af451fea2caf7f157d0fcf58ff84463cb520454..515e8733651db561dc3f9ba3179d36c9dd4a00a2 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg\r
 ;;;; Date Started:  Aug 2002\r
 ;;;;\r
 ;;;; Programmer:    Kevin M. Rosenberg\r
 ;;;; Date Started:  Aug 2002\r
 ;;;;\r
-;;;; $Id: clsql-mysql.asd,v 1.6 2002/09/17 17:16:43 kevin Exp $\r
+;;;; $Id: clsql-mysql.asd,v 1.7 2002/09/18 07:50:01 kevin Exp $\r
 ;;;;\r
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg\r
 ;;;;\r
 ;;;;\r
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg\r
 ;;;;\r
@@ -24,7 +24,7 @@
 \r
 (defsystem :clsql-mysql\r
   :components\r
 \r
 (defsystem :clsql-mysql\r
   :components\r
-  ((:module :mysql\r
+  ((:module :db-mysql\r
            :components\r
            ((:file "mysql-package")\r
             (:file "mysql-loader" :depends-on ("mysql-package"))\r
            :components\r
            ((:file "mysql-package")\r
             (:file "mysql-loader" :depends-on ("mysql-package"))\r
@@ -34,5 +34,5 @@
   :depends-on (:uffi :clsql-base :clsql-uffi))\r
    \r
 (defmethod source-file-type  ((c cl-source-file)\r
   :depends-on (:uffi :clsql-base :clsql-uffi))\r
    \r
 (defmethod source-file-type  ((c cl-source-file)\r
-                             (s (eql (find-system 'clsql-mysql)))) \r
+                             (s (eql (find-system :clsql-mysql)))) \r
    "cl")\r
    "cl")\r
index 922772111e6e202995e695bea6d72797fa2dec7c..8cace754e6f45e579d260e2f5b0fe314fcdb3156 100644 (file)
@@ -1,7 +1,7 @@
 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
 ;;;; This is copyrighted software.  See interfaces/oracle/* files for terms.
 ;;;; 
 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
 ;;;; This is copyrighted software.  See interfaces/oracle/* files for terms.
 ;;;; 
-;;;; $Id: clsql-oracle.asd,v 1.6 2002/09/17 17:16:43 kevin Exp $
+;;;; $Id: clsql-oracle.asd,v 1.7 2002/09/18 07:50:01 kevin Exp $
 
 (in-package :asdf)
 
 
 (in-package :asdf)
 
@@ -9,7 +9,7 @@
 
 (defsystem :clsql-oracle
     :components
 
 (defsystem :clsql-oracle
     :components
-    ((:module :clsql-oracle
+    ((:module :db-oracle
              :components
              ((:file "oracle-package")
               (:file "oracle-loader" :depends-on ("oracle-package"))
              :components
              ((:file "oracle-package")
               (:file "oracle-loader" :depends-on ("oracle-package"))
@@ -21,7 +21,7 @@
     :depends-on (:clsql-base))
 
 (defmethod source-file-type  ((c cl-source-file)
     :depends-on (:clsql-base))
 
 (defmethod source-file-type  ((c cl-source-file)
-                             (s (eql (find-system 'clsql-oracle)))) 
+                             (s (eql (find-system :clsql-oracle)))) 
    "cl")
 
 
    "cl")
 
 
index 7c80ab295f568aed300b70bf52108bff9513d1c4..96e9d30e054fb96d1e2ea83edecf25642ef263e8 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg\r
 ;;;; Date Started:  Aug 2002\r
 ;;;;\r
 ;;;; Programmer:    Kevin M. Rosenberg\r
 ;;;; Date Started:  Aug 2002\r
 ;;;;\r
-;;;; $Id: clsql-postgresql-socket.asd,v 1.6 2002/09/17 17:16:43 kevin Exp $\r
+;;;; $Id: clsql-postgresql-socket.asd,v 1.7 2002/09/18 07:50:01 kevin Exp $\r
 ;;;;\r
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg\r
 ;;;;\r
 ;;;;\r
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg\r
 ;;;;\r
@@ -23,7 +23,7 @@
 \r
 (defsystem clsql-postgresql-socket\r
   :components\r
 \r
 (defsystem clsql-postgresql-socket\r
   :components\r
-  ((:module :clsql-postgresql-socket\r
+  ((:module :db-postgresql-socket\r
            :components\r
            ((:file "postgresql-socket-package")\r
             (:file "postgresql-socket-api"\r
            :components\r
            ((:file "postgresql-socket-package")\r
             (:file "postgresql-socket-api"\r
@@ -33,6 +33,6 @@
   :depends-on (:clsql-base :uffi))\r
 \r
 (defmethod source-file-type  ((c cl-source-file)\r
   :depends-on (:clsql-base :uffi))\r
 \r
 (defmethod source-file-type  ((c cl-source-file)\r
-                             (s (eql (find-system 'clsql-postgresql-socket)))) \r
+                             (s (eql (find-system :clsql-postgresql-socket)))) \r
    "cl")\r
 \r
    "cl")\r
 \r
index bc4b2bfa127b3991502e4a6146beafc57ff9320c..410dbdfba2a1e9e17f1bd47bb0d8c4d4af75556b 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg\r
 ;;;; Date Started:  Aug 2002\r
 ;;;;\r
 ;;;; Programmer:    Kevin M. Rosenberg\r
 ;;;; Date Started:  Aug 2002\r
 ;;;;\r
-;;;; $Id: clsql-postgresql.asd,v 1.6 2002/09/17 17:16:43 kevin Exp $\r
+;;;; $Id: clsql-postgresql.asd,v 1.7 2002/09/18 07:50:01 kevin Exp $\r
 ;;;;\r
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg\r
 ;;;;\r
 ;;;;\r
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg\r
 ;;;;\r
@@ -21,7 +21,7 @@
 \r
 (defsystem :clsql-postgresql\r
   :components\r
 \r
 (defsystem :clsql-postgresql\r
   :components\r
-  ((:module :clsql-postgresql\r
+  ((:module :db-postgresql\r
            :components\r
            ((:file "postgresql-package")\r
             (:file "postgresql-loader" :depends-on ("postgresql-package"))\r
            :components\r
            ((:file "postgresql-package")\r
             (:file "postgresql-loader" :depends-on ("postgresql-package"))\r
@@ -31,6 +31,6 @@
   :depends-on (:uffi :clsql-base :clsql-uffi))\r
 \r
 (defmethod source-file-type  ((c cl-source-file)\r
   :depends-on (:uffi :clsql-base :clsql-uffi))\r
 \r
 (defmethod source-file-type  ((c cl-source-file)\r
-                             (s (eql (find-system 'clsql-postgresql)))) \r
+                             (s (eql (find-system :clsql-postgresql)))) \r
    "cl")\r
 \r
    "cl")\r
 \r
index c45d31cf7e73330afbfb583a552eb69596aa5cf3..e6fe6b861c34dc4ad3076ea4af8a854aea80892b 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: clsql-uffi.asd,v 1.8 2002/09/17 17:16:43 kevin Exp $
+;;;; $Id: clsql-uffi.asd,v 1.9 2002/09/18 07:50:01 kevin Exp $
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -33,5 +33,5 @@
 
 
 (defmethod source-file-type  ((c cl-source-file)
 
 
 (defmethod source-file-type  ((c cl-source-file)
-                             (s (eql (find-system 'clsql-uffi)))) 
+                             (s (eql (find-system :clsql-uffi)))) 
    "cl")
    "cl")
diff --git a/clsql-uffi/.cvsignore b/clsql-uffi/.cvsignore
deleted file mode 100755 (executable)
index f3eb90d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-clsql-uffi.so
-clsql-uffi.dll
-clsql-uffi.lib
-.bin
diff --git a/clsql-uffi/Makefile b/clsql-uffi/Makefile
deleted file mode 100644 (file)
index f163b14..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-# -*- Mode: Makefile -*-
-###########################################################################
-# FILE IDENTIFICATION
-# 
-#  Name:         Makefile
-#  Purpose:      Makefile for the CLSQL UFFI helper package
-#  Programer:    Kevin M. Rosenberg
-#  Date Started: Mar 2002
-#
-#  CVS Id:   $Id: Makefile,v 1.1 2002/08/01 03:06:27 kevin Exp $
-#
-# This file, part of CLSQL, is Copyright (c) 2002 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.
-###########################################################################
-
-
-# These variables are correct for GCC
-CC=gcc
-SHARED_CC_OPT=-fPIC -DPIC
-SHARED_LD_OPT=-shared  # For Linux (ALL) and FreeBSD (ACL)
-LD=gcc
-
-# Use these for Sun's C compiler and Solaris (ACL)
-#CC=cc
-#SHARED_CC_OPT=-KPIC
-#SHARED_LD_OPT=-G
-#LD=ld
-
-# Nothing to configure beyond this point
-
-base=clsql-uffi
-source=$(base).c
-object=$(base).o
-shared_lib=$(base).so
-
-.PHONY: all clean distclean
-
-all: $(shared_lib)
-
-$(shared_lib): $(source) Makefile
-       $(CC) ${SHARED_CC_OPT} -c $(source) -o $(object)
-       $(LD) ${SHARED_LD_OPT} $(object) -o $(shared_lib)
-       @rm $(object)
-
-clean:
-       @rm -f $(object) $(shared_lib) *~
-
-distclean: clean
-
diff --git a/clsql-uffi/Makefile.msvc b/clsql-uffi/Makefile.msvc
deleted file mode 100644 (file)
index 49e52d2..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- Mode: Makefile -*-
-###########################################################################
-# FILE IDENTIFICATION
-# 
-#  Name:         Makefile.msvc
-#  Purpose:      Makefile for the CLSQL UFFI helper package (MSVC)
-#  Programer:    Kevin M. Rosenberg
-#  Date Started: Mar 2002
-#
-#  CVS Id:   $Id: Makefile.msvc,v 1.1 2002/08/01 03:06:27 kevin Exp $
-#
-# This file, part of CLSQL, is Copyright (c) 2002 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.
-###########################################################################
-
-
-BASE=clsql-uffi
-
-# Nothing to configure beyond here
-
-SRC=$(BASE).c
-OBJ=$(BASE).obj
-DLL=$(BASE).dll
-
-$(DLL): $(SRC) 
-       cl /MD /LD -D_MT /DWIN32=1 /D__LCC__=1 $(SRC)
-        del $(OBJ) $(BASE).exp
-
-clean:
-        del /q $(DLL)
-
-
diff --git a/clsql-uffi/clsql-uffi-loader.cl b/clsql-uffi/clsql-uffi-loader.cl
deleted file mode 100644 (file)
index dabe5c9..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
-;;;; *************************************************************************
-;;;; FILE IDENTIFICATION
-;;;;
-;;;; Name:          clsql-uffi-loader.sql
-;;;; Purpose:       library loader using CLSQL UFFI helper library
-;;;; Programmers:   Kevin M. Rosenberg
-;;;; Date Started:  Mar 2002
-;;;;
-;;;; $Id: clsql-uffi-loader.cl,v 1.2 2002/08/01 21:39:22 kevin Exp $
-;;;;
-;;;; This file, part of CLSQL, is Copyright (c) 2002 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.
-;;;; *************************************************************************
-
-(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
-(in-package :clsql-uffi)
-
-(defvar *clsql-uffi-library-filename* 
-  (uffi:find-foreign-library
-   "clsql-uffi"
-   `(,(directory-namestring
-       (translate-logical-pathname 
-       "cl-library:clsql-uffi;"))
-     "/usr/lib/clsql/")
-   :drive-letters '("C" "D" "E" "F" "G")))
-
-(defvar *clsql-uffi-supporting-libraries* '("c")
-  "Used only by CMU. List of library flags needed to be passed to ld to
-load the MySQL client library succesfully.  If this differs at your site,
-set to the right path before compiling or loading the system.")
-
-(defvar *uffi-library-loaded* nil
-  "T if foreign library was able to be loaded successfully")
-
-(defun load-uffi-foreign-library ()
-  (if (uffi:load-foreign-library *clsql-uffi-library-filename* 
-                                :module "clsql-uffi" 
-                                :supporting-libraries 
-                                *clsql-uffi-supporting-libraries*)
-      (setq *uffi-library-loaded* t)
-    (warn "Unable to load helper library ~A" *clsql-uffi-library-filename*)))
-
-(load-uffi-foreign-library)
-
-
-
diff --git a/clsql-uffi/clsql-uffi-package.cl b/clsql-uffi/clsql-uffi-package.cl
deleted file mode 100644 (file)
index f096bfc..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
-;;;; *************************************************************************
-;;;; FILE IDENTIFICATION
-;;;;
-;;;; Name:          clsql-uffi-package.cl
-;;;; Purpose:       Package definitions for common UFFI interface routines
-;;;; Programmers:   Kevin M. Rosenberg
-;;;; Date Started:  Mar 2002
-;;;;
-;;;; $Id: clsql-uffi-package.cl,v 1.1 2002/08/01 03:06:27 kevin Exp $
-;;;;
-;;;; This file, part of CLSQL, is Copyright (c) 2002 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.
-;;;; *************************************************************************
-
-(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
-(in-package :cl-user)
-
-(defpackage :clsql-uffi
-  (:export
-   #:canonicalize-type-list
-   #:convert-raw-field
-   #:atoi
-   #:atol
-   #:atof
-   #:atol64
-   #:make-64-bit-integer
-   #:split-64-bit-integer)
-  (:documentation "Common functions for interfaces using UFFI"))
-
diff --git a/clsql-uffi/clsql-uffi.c b/clsql-uffi/clsql-uffi.c
deleted file mode 100644 (file)
index 280ec61..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
- * FILE IDENTIFICATION
- *
- *   Name:          clsql-uffi.c
- *   Purpose:       Helper functions for common interfaces using UFFI
- *   Programmer:    Kevin M. Rosenberg
- *   Date Started:  Mar 2002
- *
- * $Id: clsql-uffi.c,v 1.1 2002/08/01 03:06:27 kevin Exp $
- *
- * This file, part of CLSQL, is Copyright (c) 2002 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.
- ***************************************************************************/
-
-#ifdef WIN32
-#include <windows.h>
-
-BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll, DWORD fdwReason,
-                         LPVOID lpvReserved)
-{
-        return 1;
-}
-       
-#define DLLEXPORT __declspec(dllexport)
-
-#else
-#define DLLEXPORT 
-#endif
-
-
-const unsigned int bitmask_32bits = 0xFFFFFFFF;
-#define lower_32bits(int64) ((unsigned int) int64 & bitmask_32bits)
-#define upper_32bits(int64) ((unsigned int) (int64 >> 32))
-
-/* Reads a 64-bit integer string, returns result as two 32-bit integers */
-
-DLLEXPORT
-unsigned int
-atol64 (const unsigned char* str, int* pHigh32)
-{
-#ifdef WIN32
-  __int64 result = 0;
-#else
-  long long result = 0;
-#endif
-  int minus = 0;
-  int first_char = *str;
-  if (first_char == '+')
-    ++str;
-  else if (first_char == '-') {
-    minus = 1;
-    ++str;
-  }
-
-  while (*str) {
-    int i = *str - '0';
-    if (i < 0 || i > 9) /* Non-numeric character -- quit */
-      break;
-    result = i + (10 * result);
-    str++;
-  }
-  if (minus)
-    result = -result;
-
-  *pHigh32 = upper_32bits(result);
-  return lower_32bits(result);
-}
-
-  
-  
-
-
diff --git a/clsql-uffi/clsql-uffi.cl b/clsql-uffi/clsql-uffi.cl
deleted file mode 100644 (file)
index b89ec1a..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
-;;;; *************************************************************************
-;;;; FILE IDENTIFICATION
-;;;;
-;;;; Name:          clsql-uffi.cl
-;;;; Purpose:       Common functions for interfaces using UFFI
-;;;; Programmers:   Kevin M. Rosenberg
-;;;; Date Started:  Mar 2002
-;;;;
-;;;; $Id: clsql-uffi.cl,v 1.1 2002/08/01 03:06:27 kevin Exp $
-;;;;
-;;;; This file, part of CLSQL, is Copyright (c) 2002 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.
-;;;; *************************************************************************
-
-(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
-(in-package :clsql-uffi)
-
-
-(defun canonicalize-type-list (types auto-list)
-  "Ensure a field type list meets expectations"
-  (let ((length-types (length types))
-       (new-types '()))
-    (loop for i from 0 below (length auto-list)
-         do
-         (if (>= i length-types)
-             (push t new-types) ;; types is shorted than num-fields
-             (push
-              (case (nth i types)
-                (:int
-                 (case (nth i auto-list)
-                   (:int32
-                    :int32)
-                   (:int64
-                    :int64)
-                   (t
-                    t)))
-                (:double
-                 (case (nth i auto-list)
-                   (:double
-                    :double)
-                   (t
-                    t)))
-                (:int32
-                 (if (eq :int32 (nth i auto-list))
-                     :int32
-                   t))
-                (:int64
-                 (if (eq :int64 (nth i auto-list))
-                     :int64
-                   t))
-                (t
-                 t))
-              new-types)))
-    (nreverse new-types)))
-
-(uffi:def-function "atoi"
-    ((str (* :unsigned-char)))
-  :returning :int)
-
-(uffi:def-function "atol"
-    ((str (* :unsigned-char)))
-  :returning :long)
-
-(uffi:def-function "atof"
-    ((str (* :unsigned-char)))
-  :returning :double)
-
-(uffi:def-function "atol64"
-    ((str (* :unsigned-char))
-     (high32 (* :int)))
-  :returning :unsigned-int)
-
-(uffi:def-constant +2^32+ 4294967296)
-(uffi:def-constant +2^32-1+ (1- +2^32+))
-
-(defmacro make-64-bit-integer (high32 low32)
-  `(+ ,low32 (* ,high32 +2^32+)))
-
-(defmacro split-64-bit-integer (int64)
-  `(values (ash ,int64 -32) (logand ,int64 +2^32-1+)))
-
-(defun convert-raw-field (char-ptr types index)
-  (let ((type (if (listp types)
-                 (nth index types)
-                 types)))
-    (case type
-      (:double
-       (atof char-ptr))
-      ((or :int32 :int)
-       (atoi char-ptr))
-      (:int64
-       (uffi:with-foreign-object (high32-ptr :int)
-        (let ((low32 (atol64 char-ptr high32-ptr))
-              (high32 (uffi:deref-pointer high32-ptr :int)))
-          (if (zerop high32)
-              low32
-              (make-64-bit-integer high32 low32)))))
-      (t
-       (uffi:convert-from-foreign-string char-ptr)))))
diff --git a/clsql-uffi/clsql-uffi.dll b/clsql-uffi/clsql-uffi.dll
deleted file mode 100644 (file)
index f0bf74e..0000000
Binary files a/clsql-uffi/clsql-uffi.dll and /dev/null differ
diff --git a/clsql-uffi/clsql-uffi.lib b/clsql-uffi/clsql-uffi.lib
deleted file mode 100644 (file)
index 0a1bd6c..0000000
Binary files a/clsql-uffi/clsql-uffi.lib and /dev/null differ
index 162520037dcc8fa2dff25e74a842302304dc96eb..2890db90e0f67c83b3d0196f440408fca124d1d9 100644 (file)
--- a/clsql.asd
+++ b/clsql.asd
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: clsql.asd,v 1.7 2002/09/17 17:16:43 kevin Exp $
+;;;; $Id: clsql.asd,v 1.8 2002/09/18 07:50:01 kevin Exp $
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -35,5 +35,5 @@
   )
 
 (defmethod source-file-type  ((c cl-source-file)
   )
 
 (defmethod source-file-type  ((c cl-source-file)
-                             (s (eql (find-system 'clsql)))) 
+e                            (s (eql (find-system :clsql)))) 
    "cl")
    "cl")
index 42ae71438c3fc691c9896a985bed6c42cff63ba5..46cdd6333e7ed15c7c237c9566a037cfadc66514 100755 (executable)
@@ -25,13 +25,13 @@ UPSTREAM_VER        := $(shell sed -n -e "s/${pkg} (\(.*\)-[0-9A-Za-z\.]).*/\1/p" < deb
 ## Lisp sources
 srcs           := sql clsql.asd
 srcs-base      := $(wildcard base/*.cl) 
 ## Lisp sources
 srcs           := sql clsql.asd
 srcs-base      := $(wildcard base/*.cl) 
-srcs-uffi      := $(wildcard clsql-uffi/*.cl) $(wildcard clsql-uffi/*.c)
-srcs-uffi-so:= $(wildcard clsql-uffi/*.so)
-srcs-mysql     := $(wildcard clsql-mysql/*.cl) $(wildcard clsql-mysql/*.c)
-srcs-mysql-so  :=  $(wildcard clsql-mysql/*.so)
-srcs-pg                := $(wildcard clsql-postgresql/*.cl)
-srcs-pg-socket := $(wildcard clsql-postgresql-socket/*.cl)
-srcs-aodbc     := $(wildcard clsql-aodbc/*.cl)
+srcs-uffi      := $(wildcard uffi/*.cl) $(wildcard uffi/*.c)
+srcs-uffi-so   := $(wildcard uffi/*.so)
+srcs-mysql     := $(wildcard db-mysql/*.cl) $(wildcard db-mysql/*.c)
+srcs-mysql-so  :=  $(wildcard db-mysql/*.so)
+srcs-pg                := $(wildcard db-postgresql/*.cl)
+srcs-pg-socket := $(wildcard db-postgresql-socket/*.cl)
+srcs-aodbc     := $(wildcard db-aodbc/*.cl)
 
 clc-base       := usr/share/common-lisp
 clc-source     := $(clc-base)/source
 
 clc-base       := usr/share/common-lisp
 clc-source     := $(clc-base)/source
@@ -45,17 +45,17 @@ lispdir-sql := $(clc-sql)/sql
 clc-base       := $(clc-source)/clsql-base
 lispdir-base   := $(clc-base)/base
 clc-uffi        := $(clc-source)/clsql-uffi
 clc-base       := $(clc-source)/clsql-base
 lispdir-base   := $(clc-base)/base
 clc-uffi        := $(clc-source)/clsql-uffi
-lispdir-uffi := $(clc-uffi)/clsql-uffi
-sodir-uffi := usr/lib/clsql
+lispdir-uffi   := $(clc-uffi)/uffi
+sodir-uffi     := usr/lib/clsql
 clc-mysql      := $(clc-source)/clsql-mysql
 clc-mysql      := $(clc-source)/clsql-mysql
-lispdir-mysql  := $(clc-mysql)/clsql-mysql
+lispdir-mysql  := $(clc-mysql)/db-mysql
 sodir-mysql    := usr/lib/clsql
 clc-pg         := $(clc-source)/clsql-postgresql
 sodir-mysql    := usr/lib/clsql
 clc-pg         := $(clc-source)/clsql-postgresql
-lispdir-pg     := $(clc-pg)/clsql-postgresql
-clc-socket := $(clc-source)/clsql-postgresql-socket
-lispdir-pg-socket := $(clc-pg-socket)/clsql-postgresql-socket
+lispdir-pg     := $(clc-pg)/db-postgresql
+clc-socket     := $(clc-source)/clsql-postgresql-socket
+lispdir-pg-socket := $(clc-pg-socket)/db-postgresql-socket
 clc-aodbc      := $(clc-source)/clsql-aodbc
 clc-aodbc      := $(clc-source)/clsql-aodbc
-lispdir-aodbc  := $(clc-aodbc)/clsql-aodbc
+lispdir-aodbc  := $(clc-aodbc)/db-aodbc
 
 
 configure: configure-stamp
 
 
 configure: configure-stamp
index 1cd75365290160439bbbfeb5d31b7a12eb2a8169..31b76c495ee357a2c2fa3841192974abc8425961 100644 (file)
Binary files a/doc/html.tar.gz and b/doc/html.tar.gz differ
diff --git a/uffi/.cvsignore b/uffi/.cvsignore
new file mode 100755 (executable)
index 0000000..f3eb90d
--- /dev/null
@@ -0,0 +1,4 @@
+clsql-uffi.so
+clsql-uffi.dll
+clsql-uffi.lib
+.bin
diff --git a/uffi/Makefile b/uffi/Makefile
new file mode 100644 (file)
index 0000000..8093b70
--- /dev/null
@@ -0,0 +1,52 @@
+# -*- Mode: Makefile -*-
+###########################################################################
+# FILE IDENTIFICATION
+# 
+#  Name:         Makefile
+#  Purpose:      Makefile for the CLSQL UFFI helper package
+#  Programer:    Kevin M. Rosenberg
+#  Date Started: Mar 2002
+#
+#  CVS Id:   $Id: Makefile,v 1.1 2002/09/18 07:50:01 kevin Exp $
+#
+# This file, part of CLSQL, is Copyright (c) 2002 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.
+###########################################################################
+
+
+# These variables are correct for GCC
+CC=gcc
+SHARED_CC_OPT=-fPIC -DPIC
+SHARED_LD_OPT=-shared  # For Linux (ALL) and FreeBSD (ACL)
+LD=gcc
+
+# Use these for Sun's C compiler and Solaris (ACL)
+#CC=cc
+#SHARED_CC_OPT=-KPIC
+#SHARED_LD_OPT=-G
+#LD=ld
+
+# Nothing to configure beyond this point
+
+base=clsql-uffi
+source=$(base).c
+object=$(base).o
+shared_lib=$(base).so
+
+.PHONY: all clean distclean
+
+all: $(shared_lib)
+
+$(shared_lib): $(source) Makefile
+       $(CC) ${SHARED_CC_OPT} -c $(source) -o $(object)
+       $(LD) ${SHARED_LD_OPT} $(object) -o $(shared_lib)
+       @rm $(object)
+
+clean:
+       @rm -f $(object) $(shared_lib) *~
+
+distclean: clean
+
diff --git a/uffi/Makefile.msvc b/uffi/Makefile.msvc
new file mode 100644 (file)
index 0000000..562c3dd
--- /dev/null
@@ -0,0 +1,35 @@
+# -*- Mode: Makefile -*-
+###########################################################################
+# FILE IDENTIFICATION
+# 
+#  Name:         Makefile.msvc
+#  Purpose:      Makefile for the CLSQL UFFI helper package (MSVC)
+#  Programer:    Kevin M. Rosenberg
+#  Date Started: Mar 2002
+#
+#  CVS Id:   $Id: Makefile.msvc,v 1.1 2002/09/18 07:50:01 kevin Exp $
+#
+# This file, part of CLSQL, is Copyright (c) 2002 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.
+###########################################################################
+
+
+BASE=clsql-uffi
+
+# Nothing to configure beyond here
+
+SRC=$(BASE).c
+OBJ=$(BASE).obj
+DLL=$(BASE).dll
+
+$(DLL): $(SRC) 
+       cl /MD /LD -D_MT /DWIN32=1 /D__LCC__=1 $(SRC)
+        del $(OBJ) $(BASE).exp
+
+clean:
+        del /q $(DLL)
+
+
diff --git a/uffi/clsql-uffi-loader.cl b/uffi/clsql-uffi-loader.cl
new file mode 100644 (file)
index 0000000..e48384f
--- /dev/null
@@ -0,0 +1,50 @@
+;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          clsql-uffi-loader.sql
+;;;; Purpose:       library loader using CLSQL UFFI helper library
+;;;; Programmers:   Kevin M. Rosenberg
+;;;; Date Started:  Mar 2002
+;;;;
+;;;; $Id: clsql-uffi-loader.cl,v 1.1 2002/09/18 07:50:01 kevin Exp $
+;;;;
+;;;; This file, part of CLSQL, is Copyright (c) 2002 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.
+;;;; *************************************************************************
+
+(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
+(in-package :clsql-uffi)
+
+(defvar *clsql-uffi-library-filename* 
+  (uffi:find-foreign-library
+   "clsql-uffi"
+   `(,(directory-namestring
+       (translate-logical-pathname 
+       "cl-library:clsql-uffi;"))
+     "/usr/lib/clsql/")
+   :drive-letters '("C" "D" "E" "F" "G")))
+
+(defvar *clsql-uffi-supporting-libraries* '("c")
+  "Used only by CMU. List of library flags needed to be passed to ld to
+load the MySQL client library succesfully.  If this differs at your site,
+set to the right path before compiling or loading the system.")
+
+(defvar *uffi-library-loaded* nil
+  "T if foreign library was able to be loaded successfully")
+
+(defun load-uffi-foreign-library ()
+  (if (uffi:load-foreign-library *clsql-uffi-library-filename* 
+                                :module "clsql-uffi" 
+                                :supporting-libraries 
+                                *clsql-uffi-supporting-libraries*)
+      (setq *uffi-library-loaded* t)
+    (warn "Unable to load helper library ~A" *clsql-uffi-library-filename*)))
+
+(load-uffi-foreign-library)
+
+
+
diff --git a/uffi/clsql-uffi-package.cl b/uffi/clsql-uffi-package.cl
new file mode 100644 (file)
index 0000000..4b541f9
--- /dev/null
@@ -0,0 +1,33 @@
+;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          clsql-uffi-package.cl
+;;;; Purpose:       Package definitions for common UFFI interface routines
+;;;; Programmers:   Kevin M. Rosenberg
+;;;; Date Started:  Mar 2002
+;;;;
+;;;; $Id: clsql-uffi-package.cl,v 1.1 2002/09/18 07:50:01 kevin Exp $
+;;;;
+;;;; This file, part of CLSQL, is Copyright (c) 2002 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.
+;;;; *************************************************************************
+
+(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
+(in-package :cl-user)
+
+(defpackage :clsql-uffi
+  (:export
+   #:canonicalize-type-list
+   #:convert-raw-field
+   #:atoi
+   #:atol
+   #:atof
+   #:atol64
+   #:make-64-bit-integer
+   #:split-64-bit-integer)
+  (:documentation "Common functions for interfaces using UFFI"))
+
diff --git a/uffi/clsql-uffi.c b/uffi/clsql-uffi.c
new file mode 100644 (file)
index 0000000..385df49
--- /dev/null
@@ -0,0 +1,75 @@
+/****************************************************************************
+ * FILE IDENTIFICATION
+ *
+ *   Name:          clsql-uffi.c
+ *   Purpose:       Helper functions for common interfaces using UFFI
+ *   Programmer:    Kevin M. Rosenberg
+ *   Date Started:  Mar 2002
+ *
+ * $Id: clsql-uffi.c,v 1.1 2002/09/18 07:50:01 kevin Exp $
+ *
+ * This file, part of CLSQL, is Copyright (c) 2002 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.
+ ***************************************************************************/
+
+#ifdef WIN32
+#include <windows.h>
+
+BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll, DWORD fdwReason,
+                         LPVOID lpvReserved)
+{
+        return 1;
+}
+       
+#define DLLEXPORT __declspec(dllexport)
+
+#else
+#define DLLEXPORT 
+#endif
+
+
+const unsigned int bitmask_32bits = 0xFFFFFFFF;
+#define lower_32bits(int64) ((unsigned int) int64 & bitmask_32bits)
+#define upper_32bits(int64) ((unsigned int) (int64 >> 32))
+
+/* Reads a 64-bit integer string, returns result as two 32-bit integers */
+
+DLLEXPORT
+unsigned int
+atol64 (const unsigned char* str, int* pHigh32)
+{
+#ifdef WIN32
+  __int64 result = 0;
+#else
+  long long result = 0;
+#endif
+  int minus = 0;
+  int first_char = *str;
+  if (first_char == '+')
+    ++str;
+  else if (first_char == '-') {
+    minus = 1;
+    ++str;
+  }
+
+  while (*str) {
+    int i = *str - '0';
+    if (i < 0 || i > 9) /* Non-numeric character -- quit */
+      break;
+    result = i + (10 * result);
+    str++;
+  }
+  if (minus)
+    result = -result;
+
+  *pHigh32 = upper_32bits(result);
+  return lower_32bits(result);
+}
+
+  
+  
+
+
diff --git a/uffi/clsql-uffi.cl b/uffi/clsql-uffi.cl
new file mode 100644 (file)
index 0000000..2d1cd94
--- /dev/null
@@ -0,0 +1,103 @@
+;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          clsql-uffi.cl
+;;;; Purpose:       Common functions for interfaces using UFFI
+;;;; Programmers:   Kevin M. Rosenberg
+;;;; Date Started:  Mar 2002
+;;;;
+;;;; $Id: clsql-uffi.cl,v 1.1 2002/09/18 07:50:01 kevin Exp $
+;;;;
+;;;; This file, part of CLSQL, is Copyright (c) 2002 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.
+;;;; *************************************************************************
+
+(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
+(in-package :clsql-uffi)
+
+
+(defun canonicalize-type-list (types auto-list)
+  "Ensure a field type list meets expectations"
+  (let ((length-types (length types))
+       (new-types '()))
+    (loop for i from 0 below (length auto-list)
+         do
+         (if (>= i length-types)
+             (push t new-types) ;; types is shorted than num-fields
+             (push
+              (case (nth i types)
+                (:int
+                 (case (nth i auto-list)
+                   (:int32
+                    :int32)
+                   (:int64
+                    :int64)
+                   (t
+                    t)))
+                (:double
+                 (case (nth i auto-list)
+                   (:double
+                    :double)
+                   (t
+                    t)))
+                (:int32
+                 (if (eq :int32 (nth i auto-list))
+                     :int32
+                   t))
+                (:int64
+                 (if (eq :int64 (nth i auto-list))
+                     :int64
+                   t))
+                (t
+                 t))
+              new-types)))
+    (nreverse new-types)))
+
+(uffi:def-function "atoi"
+    ((str (* :unsigned-char)))
+  :returning :int)
+
+(uffi:def-function "atol"
+    ((str (* :unsigned-char)))
+  :returning :long)
+
+(uffi:def-function "atof"
+    ((str (* :unsigned-char)))
+  :returning :double)
+
+(uffi:def-function "atol64"
+    ((str (* :unsigned-char))
+     (high32 (* :int)))
+  :returning :unsigned-int)
+
+(uffi:def-constant +2^32+ 4294967296)
+(uffi:def-constant +2^32-1+ (1- +2^32+))
+
+(defmacro make-64-bit-integer (high32 low32)
+  `(+ ,low32 (* ,high32 +2^32+)))
+
+(defmacro split-64-bit-integer (int64)
+  `(values (ash ,int64 -32) (logand ,int64 +2^32-1+)))
+
+(defun convert-raw-field (char-ptr types index)
+  (let ((type (if (listp types)
+                 (nth index types)
+                 types)))
+    (case type
+      (:double
+       (atof char-ptr))
+      ((or :int32 :int)
+       (atoi char-ptr))
+      (:int64
+       (uffi:with-foreign-object (high32-ptr :int)
+        (let ((low32 (atol64 char-ptr high32-ptr))
+              (high32 (uffi:deref-pointer high32-ptr :int)))
+          (if (zerop high32)
+              low32
+              (make-64-bit-integer high32 low32)))))
+      (t
+       (uffi:convert-from-foreign-string char-ptr)))))
diff --git a/uffi/clsql-uffi.dll b/uffi/clsql-uffi.dll
new file mode 100644 (file)
index 0000000..f0bf74e
Binary files /dev/null and b/uffi/clsql-uffi.dll differ
diff --git a/uffi/clsql-uffi.lib b/uffi/clsql-uffi.lib
new file mode 100644 (file)
index 0000000..0a1bd6c
Binary files /dev/null and b/uffi/clsql-uffi.lib differ