From 29c29f6f8a907369b3bad4789098c2252dc8c66b Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Fri, 2 May 2003 02:54:55 +0000 Subject: [PATCH] r4732: *** empty log message *** --- debian/changelog | 1 + tests/foreign-loader.lisp | 44 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 tests/foreign-loader.lisp diff --git a/debian/changelog b/debian/changelog index 631764b..7db4a52 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ cl-uffi (1.2.13-1) unstable; urgency=low * Fix getenv test + * Work-around load-object-file bug in CMUCL in testing script -- Kevin M. Rosenberg Thu, 1 May 2003 17:31:21 -0600 diff --git a/tests/foreign-loader.lisp b/tests/foreign-loader.lisp new file mode 100644 index 0000000..07977ea --- /dev/null +++ b/tests/foreign-loader.lisp @@ -0,0 +1,44 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: foreign-loader.lisp +;;;; Purpose: Loads foreign libraries +;;;; Author: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id: foreign-loader.lisp,v 1.1 2003/05/02 02:54:55 kevin Exp $ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg +;;;; +;;;; UFFI 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. +;;;; ************************************************************************* + +;;; For CMUCL, it's necessary to load foreign files separate from their +;;; usage + +(in-package :uffi-tests) + +(eval-when (:compile-toplevel :load-toplevel :execute) +(unless (uffi:load-foreign-library + #-(or macosx darwin) + (uffi:find-foreign-library + "libz" + '("/usr/local/lib/" "/usr/lib/" "/zlib/") + :types '("so" "a")) + #+(or macosx darwin) + (uffi:find-foreign-library "z" + `(,(pathname-directory *load-pathname*))) + :module "zlib" + :supporting-libraries '("c")) + (warn "Unable to load zlib"))) + +(unless (uffi:load-foreign-library + (uffi:find-foreign-library "uffi-c-test-lib" + (list *load-truename* + "/usr/lib/")) + :supporting-libraries '("c")) + (warn "Unable to load uffi-c-test-lib library")) + -- 2.34.1