Permalink
Browse files

push :zlib-deflate on *features* if deflate.fasl is loaded

In order for code needing compression to check if the deflate.fasl file was
loaded successfully deflate.fasl puts :zlib-deflate on the *features* list.
We use zlib rather than libz since the authors refer to this code
as zlib and I suppose they didn't want to name the library on
Linux libzlib so it was shortened to libz.  It may have other names
on other operating system.

Are there user visible changes in this commit?  yes

Is bootstrapping needed?   no

Are tests included for new features?  no (a trival change)

Tests run:  none

<release-note>
add :zlib-deflate to *features*

If deflate.fasl was sucessfully loaded, which means that the zlib
foreign library (called libz.so on Linux) was found and loaded as well,
then :zlib-deflate will be found on *features*

</release-note>

Change-Id: Iee9be53bb07b7581ca579fdc84ece26e73683725
  • Loading branch information...
1 parent fbac6d2 commit 9c69a7393e1171d21356f14d8af09c5ef69d0e72 John Foderaro committed Feb 17, 2011
Showing with 7 additions and 13 deletions.
  1. +7 −13 deflate.cl
View
@@ -12,22 +12,13 @@
(in-package :util.zip)
-(provide :deflate)
(eval-when (compile load eval)
(defconstant *zlib-in-buffer-size* (* 16 1024))
(defconstant *zlib-out-buffer-size* (* 17 1024))
)
-;; constants needed for resourcing for static buffers
-
-(defconstant *deflate-buffer-z-stream* 0)
-(defconstant *deflate-buffer-in* 1)
-(defconstant *deflate-buffer-out* 2)
-
-
-
;; deflate-stream
@@ -67,20 +58,23 @@
;; (deflate-stream-vector-combined str)
;;
-(defvar *libz-dll-loaded* nil)
+(defvar *zlib-dll-loaded* nil)
-(if* (not *libz-dll-loaded*)
+(if* (not *zlib-dll-loaded*)
then (handler-case
(load (util.string:string+ "libz." sys::*dll-type*) :foreign t)
(error (c)
(error "~
-This module require the compression library named libz be present ~
+This module require the compression library named libz (on Linix) be present ~
on the machine for the deflate module to load. ~
See http://zlib.net/ for versions for various platforms.~% failure ~
condition: ~a~%" c)))
- (setq *libz-dll-loaded* t))
+ (setq *zlib-dll-loaded* t))
+
+(pushnew :zlib-deflate *features*)
+(provide :deflate)
(ff:def-foreign-type z-stream
(:struct (next-in (* :void)) ; next input byte

0 comments on commit 9c69a73

Please sign in to comment.