From: Kevin M. Rosenberg Date: Mon, 1 Apr 2002 00:52:07 +0000 (+0000) Subject: r1710: *** empty log message *** X-Git-Tag: v1.6.1~534 X-Git-Url: http://git.kpe.io/?p=uffi.git;a=commitdiff_plain;h=8d16d732a80b76c913f4b62b9fe043af39e5bce2 r1710: *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index ef62a14..305280f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ * examples/Makefile: Create a .a library file for FreeBSD + + * src/libraries.cl: + Added default type and find-foreign-library functions 2002-03-29 Kevin Rosenberg (kevin@rosenberg.net) diff --git a/VERSION b/VERSION index d22f29b..2b6f9ad 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,3 @@ -0.3.1 +0.3.2-pre + diff --git a/src/libraries.cl b/src/libraries.cl index 38e2f22..f88a207 100644 --- a/src/libraries.cl +++ b/src/libraries.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: libraries.cl,v 1.6 2002/03/31 23:45:34 kevin Exp $ +;;;; $Id: libraries.cl,v 1.7 2002/04/01 00:52:07 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -28,7 +28,21 @@ #+freebsd "a" #+linux "so") - +(defun find-foreign-library (name &key directories type) + "Looks for a foreign library. directories can be a single +string or a list of strings of candidate directories. Use default +library type if type is not specified." + (unless type + (setq type (default-foreign-library-type))) + (unless (listp directories) + (setq directories (list directories))) + (dolist (dir directories) + (let ((path (make-pathname :name :type type :directory directory))) + (when (probe-file path) + (return path)))) + nil) + + (defun load-foreign-library (filename &key module supporting-libraries force-load) #+allegro (declare (ignore module supporting-libraries))