[master] f85567f Try to solve Linux compile issue. There is a special place reserved in my section of hell for the dimwits who decided that switching off_t from 32 to 64 bits was too scary to contemplate.

Poul-Henning Kamp phk at varnish-cache.org
Mon Jan 24 23:05:45 CET 2011


commit f85567f5d7d402d644193d8a2d339c6778f78736
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jan 24 22:03:43 2011 +0000

    Try to solve Linux compile issue.  There is a special place reserved in
    my section of hell for the dimwits who decided that switching off_t from
    32 to 64 bits was too scary to contemplate.

diff --git a/lib/libvgz/Makefile.am b/lib/libvgz/Makefile.am
index 446dc64..573e033 100644
--- a/lib/libvgz/Makefile.am
+++ b/lib/libvgz/Makefile.am
@@ -3,6 +3,7 @@
 lib_LTLIBRARIES = libvgz.la
 
 libvgz_la_LDFLAGS = -version-info 1:0:0
+libvgz_la_CFLAGS = -D_LARGEFILE64_SOURCE=1
 
 libvgz_la_SOURCES = \
 	adler32.c \
diff --git a/lib/libvgz/vgz.h b/lib/libvgz/vgz.h
index d6855be..3f6e8cb 100644
--- a/lib/libvgz/vgz.h
+++ b/lib/libvgz/vgz.h
@@ -1573,7 +1573,9 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
    ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
    ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
    ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
-#elif !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
+#endif
+
+#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
 #  define gzopen gzopen64
 #  define gzseek gzseek64
 #  define gztell gztell64



More information about the varnish-commit mailing list