X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-mysql%2Fmysql-api.lisp;h=7170fda066b72a29f480c80e0dc04422eecb5c1f;hb=fa32c4233b4a02ae631602dbb0a234ab10df8aaf;hp=b334ad0b9470227a88ee5c1a7c2910d29bf000d0;hpb=8d2b56a0133193db4675e172a344052c54dadcd2;p=clsql.git diff --git a/db-mysql/mysql-api.lisp b/db-mysql/mysql-api.lisp index b334ad0..7170fda 100644 --- a/db-mysql/mysql-api.lisp +++ b/db-mysql/mysql-api.lisp @@ -2,13 +2,13 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: mysql.cl +;;;; Name: mysql-api.lisp ;;;; Purpose: Low-level MySQL interface using UFFI ;;;; Programmers: Kevin M. Rosenberg based on ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: mysql-api.lisp,v 1.4 2003/06/24 01:12:57 kevin Exp $ +;;;; $Id$ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -105,8 +105,8 @@ (:blob 252) (:var-string 253) (:string 254))) - -#-(or win32 mswindows) + +#+mysql-client-v3 (uffi:def-struct mysql-field (name (* :char)) (table (* :char)) @@ -117,8 +117,8 @@ (flags :unsigned-int) (decimals :unsigned-int)) -;; structure changed in mysql 4.0.12, win32 -#+(or win32 mswindows) +;; structure changed in mysql 4 client +#+mysql-client-v4 (uffi:def-struct mysql-field (name (* :char)) (table (* :char)) @@ -247,7 +247,9 @@ :module "mysql" :returning (* mysql-mysql)) +#-mysql-client-v4 (declaim (inline mysql-connect)) +#-mysql-client-v4 (uffi:def-function "mysql_connect" ((mysql (* mysql-mysql)) (host :cstring) @@ -258,7 +260,7 @@ ;; Need to comment this out for LW 4.2.6 ;; ? bug in LW version -;;(declaim (inline mysql-real-connect)) +#-lispworks (declaim (inline mysql-real-connect)) (uffi:def-function "mysql_real_connect" ((mysql (* mysql-mysql)) (host :cstring) @@ -302,14 +304,18 @@ :module "mysql" :returning :int) +#-mysql-client-v4 (declaim (inline mysql-create-db)) +#-mysql-client-v4 (uffi:def-function "mysql_create_db" ((mysql (* mysql-mysql)) (db :cstring)) :module "mysql" :returning :int) +#-mysql-client-v4 (declaim (inline mysql-drop-db)) +#-mysql-client-v4 (uffi:def-function "mysql_drop_db" ((mysql (* mysql-mysql)) (db :cstring)) @@ -360,12 +366,6 @@ :module "mysql" :returning :cstring) -(declaim (inline mysql-get-client-info)) -(uffi:def-function "mysql_get_client_info" - () - :module "mysql" - :returning :cstring) - (declaim (inline mysql-get-host-info)) (uffi:def-function "mysql_get_host_info" ((mysql (* mysql-mysql)))