Skip to content

Commit

Permalink
Bump version check for gzoffset
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed May 9, 2015
1 parent 2dcb99a commit 36a7819
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/GZip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ skip(s::GZipStream, n::Integer) =
s.gz_file, n, SEEK_CUR)!=-1 ||
error("skip (gzseek) failed")) # Mimick behavior of skip(s::IOStream, n)

if GZLIB_VERSION > "1.2.2.4"
if GZLIB_VERSION > "1.2.3.9"
position(s::GZipStream, raw::Bool=false) = raw ?
ccall((_gzoffset, _zlib), ZFileOffset, (Ptr{Void},), s.gz_file) :
ccall((_gztell, _zlib), ZFileOffset, (Ptr{Void},), s.gz_file)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ gzfile = gzopen(test_compressed, "wb")
write(gzfile, data) == length(data.data)
@test flush(gzfile) == Z_OK

NEW = GZip.GZLIB_VERSION > "1.2.2.4"
NEW = GZip.GZLIB_VERSION > "1.2.3.9"
pos = position(gzfile)
NEW && (pos2 = position(gzfile,true))
@test_throws ErrorException seek(gzfile, 100) # can't seek backwards on write
Expand Down

0 comments on commit 36a7819

Please sign in to comment.