| Piers Daniell | 886be47 | 2015-02-23 16:23:13 -0700 | [diff] [blame] | 1 | diff -ipuwr -x config.log -x config.status -x config.cache -x '*.Po' -x '*.pot' -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' -x '*.o' -x '*.exe' -x patches -x '*.dll' -x'*.la' -x res -x debian -x '*.log' -x '*.lib' -x'*.a' -x .libs -x'*.def' -x'*.uu' -x'*.rc' zlib-1.2.2-orig/Makefile zlib-1.2.2/Makefile |
| 2 | --- zlib-1.2.2-orig/Makefile 2004-09-15 16:27:20.000000000 +0200 |
| 3 | +++ zlib-1.2.2/Makefile 2005-01-02 13:29:11.187500000 +0100 |
| 4 | @@ -16,45 +16,83 @@ |
| 5 | # To install in $HOME instead of /usr/local, use: |
| 6 | # make install prefix=$HOME |
| 7 | |
| 8 | -CC=cc |
| 9 | +CC=gcc |
| 10 | |
| 11 | CFLAGS=-O |
| 12 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 |
| 13 | #CFLAGS=-g -DDEBUG |
| 14 | #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ |
| 15 | # -Wstrict-prototypes -Wmissing-prototypes |
| 16 | +CFLAGS = -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ |
| 17 | + -Wstrict-prototypes -Wmissing-prototypes \ |
| 18 | + -D__GW32__ -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 \ |
| 19 | + -mms-bitfields -fno-exceptions -fomit-frame-pointer -march=i386 -mcpu=i686 \ |
| 20 | + -idirafter e:/progra~1/gnuwin32/include -idirafter h:/glibc/include |
| 21 | |
| 22 | -LDFLAGS=libz.a |
| 23 | -LDSHARED=$(CC) |
| 24 | +LDFLAGS=-Wl,-s $(VERSADD) |
| 25 | +LDSHARED=o2dll |
| 26 | CPP=$(CC) -E |
| 27 | |
| 28 | +MAJOR=1 |
| 29 | +MINOR=2 |
| 30 | +BUILD=2 |
| 31 | +VERSION = $(MAJOR).$(MINOR).$(BUILD) |
| 32 | +CURRENT = 3 |
| 33 | +# MAJOR + BUILD |
| 34 | +REVISION = $(MINOR) |
| 35 | +AGE = $(BUILD) |
| 36 | +LTVERSION = $(CURRENT):$(REVISION):$(AGE) |
| 37 | +VERSADD = -Wl,--major-image-version=$(MAJOR) -Wl,--minor-image-version=$(MINOR) |
| 38 | + |
| 39 | LIBS=libz.a |
| 40 | SHAREDLIB=libz.so |
| 41 | SHAREDLIBV=libz.so.1.2.2 |
| 42 | SHAREDLIBM=libz.so.1 |
| 43 | +STATLIB=libz.a |
| 44 | +IMPLIB=libz.dll.a |
| 45 | +LIBS=$(STATLIB) $(IMPLIB) libz.lib libz-bcc.lib |
| 46 | +SHAREDLIB=zlib.dll |
| 47 | +SHAREDLIBV=zlib1.dll |
| 48 | +SHAREDLIBM=zlib121.dll |
| 49 | +EXTRALIBS=-lgw32c |
| 50 | |
| 51 | AR=ar rc |
| 52 | RANLIB=ranlib |
| 53 | TAR=tar |
| 54 | SHELL=/bin/sh |
| 55 | -EXE= |
| 56 | +EXE=.exe |
| 57 | + |
| 58 | +.SUFFIXES: |
| 59 | +.SUFFIXES: .c .rc .o .exe |
| 60 | |
| 61 | -prefix = /usr/local |
| 62 | +%.E : %.c |
| 63 | + $(CPP) $(CFLAGS) -o $@ $< |
| 64 | +%.pic.o : CFLAGS += -DZLIB_DLL |
| 65 | +%.pic.o : %.c |
| 66 | + $(CC) -c $(CFLAGS) -o $@ $< |
| 67 | +# Rule to make compiled resource (Windows) |
| 68 | +.rc.o: |
| 69 | + windres -i $< -o $@ |
| 70 | + |
| 71 | +prefix = c:/progra~1/Zlib |
| 72 | exec_prefix = ${prefix} |
| 73 | +bindir = ${exec_prefix}/lib |
| 74 | libdir = ${exec_prefix}/lib |
| 75 | includedir = ${prefix}/include |
| 76 | -mandir = ${prefix}/share/man |
| 77 | +mandir = ${prefix}/man |
| 78 | man3dir = ${mandir}/man3 |
| 79 | |
| 80 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ |
| 81 | zutil.o inflate.o infback.o inftrees.o inffast.o |
| 82 | +DLLOBJS = $(OBJS:.o=.pic.o) zlib-dll-res.o zlib-dllversion.o |
| 83 | |
| 84 | OBJA = |
| 85 | # to use the asm code: make OBJA=match.o |
| 86 | |
| 87 | TEST_OBJS = example.o minigzip.o |
| 88 | |
| 89 | -all: example$(EXE) minigzip$(EXE) |
| 90 | +all: example minigzip example-static minigzip-static |
| 91 | + |
| 92 | |
| 93 | check: test |
| 94 | test: all |
| 95 | @@ -67,7 +105,9 @@ test: all |
| 96 | echo ' *** zlib test FAILED ***'; \ |
| 97 | fi |
| 98 | |
| 99 | -libz.a: $(OBJS) $(OBJA) |
| 100 | +$(IMPLIB): $(STATLIB) $(SHAREDLIBV) |
| 101 | + |
| 102 | +$(STATLIB): $(OBJS) $(OBJA) |
| 103 | $(AR) $@ $(OBJS) $(OBJA) |
| 104 | -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 |
| 105 | |
| 106 | @@ -77,35 +117,44 @@ match.o: match.S |
| 107 | mv _match.o match.o |
| 108 | rm -f _match.s |
| 109 | |
| 110 | -$(SHAREDLIBV): $(OBJS) |
| 111 | - $(LDSHARED) -o $@ $(OBJS) |
| 112 | +$(SHAREDLIBV): $(DLLOBJS) |
| 113 | + $(LDSHARED) -o $(SHAREDLIB) -l $(IMPLIB) $(DLLOBJS) $(LDFLAGS) -version-info $(LTVERSION) $(EXTRALIBS) |
| 114 | rm -f $(SHAREDLIB) $(SHAREDLIBM) |
| 115 | - ln -s $@ $(SHAREDLIB) |
| 116 | - ln -s $@ $(SHAREDLIBM) |
| 117 | +# ln -s $@ $(SHAREDLIB) |
| 118 | +# ln -s $@ $(SHAREDLIBM) |
| 119 | + |
| 120 | +example-static: example.o example-res.o $(STATLIB) |
| 121 | + $(CC) $(CFLAGS) -o $@ example.o example-res.o $(LDFLAGS) libz.a $(EXTRALIBS) |
| 122 | + |
| 123 | +example: example.pic.o example-res.o $(IMPLIB) |
| 124 | + $(CC) $(CFLAGS) -o $@ example.pic.o example-res.o $(LDFLAGS) libz.dll.a $(EXTRALIBS) |
| 125 | |
| 126 | -example$(EXE): example.o $(LIBS) |
| 127 | - $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) |
| 128 | +minigzip-static: minigzip.o minigzip-res.o $(STATLIB) |
| 129 | + $(CC) $(CFLAGS) -o $@ minigzip.o minigzip-res.o $(LDFLAGS) libz.a $(EXTRALIBS) |
| 130 | |
| 131 | -minigzip$(EXE): minigzip.o $(LIBS) |
| 132 | - $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) |
| 133 | +minigzip: minigzip.pic.o minigzip-res.o $(IMPLIB) |
| 134 | + $(CC) $(CFLAGS) -o $@ minigzip.pic.o minigzip-res.o $(LDFLAGS) libz.dll.a $(EXTRALIBS) |
| 135 | |
| 136 | install: $(LIBS) |
| 137 | -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi |
| 138 | -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi |
| 139 | -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi |
| 140 | + -@if [ ! -d $(bindir) ]; then mkdir -p $(bindir); fi |
| 141 | -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi |
| 142 | - cp zlib.h zconf.h $(includedir) |
| 143 | + cp -fp zlib.h zconf.h $(includedir) |
| 144 | chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h |
| 145 | - cp $(LIBS) $(libdir) |
| 146 | + cp -fp $(LIBS) $(libdir) |
| 147 | cd $(libdir); chmod 755 $(LIBS) |
| 148 | -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 |
| 149 | - cd $(libdir); if test -f $(SHAREDLIBV); then \ |
| 150 | + cp -fp $(SHAREDLIBV) $(bindir) |
| 151 | + cd $(bindir); chmod 755 $(SHAREDLIBV); \ |
| 152 | +# if test -f $(SHAREDLIBV); then \ |
| 153 | rm -f $(SHAREDLIB) $(SHAREDLIBM); \ |
| 154 | ln -s $(SHAREDLIBV) $(SHAREDLIB); \ |
| 155 | ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ |
| 156 | (ldconfig || true) >/dev/null 2>&1; \ |
| 157 | fi |
| 158 | - cp zlib.3 $(man3dir) |
| 159 | + cp -fp zlib.3 $(man3dir) |
| 160 | chmod 644 $(man3dir)/zlib.3 |
| 161 | # The ranlib in install is needed on NeXTSTEP which checks file times |
| 162 | # ldconfig is for Linux |
| 163 | @@ -120,8 +169,8 @@ uninstall: |
| 164 | |
| 165 | mostlyclean: clean |
| 166 | clean: |
| 167 | - rm -f *.o *~ example$(EXE) minigzip$(EXE) \ |
| 168 | - libz.* foo.gz so_locations \ |
| 169 | + rm -f *.o *.pic.o *~ example$(EXE) minigzip$(EXE) \ |
| 170 | + libz.* $(LIBS) $(SHAREDLIBV) foo.gz so_locations \ |
| 171 | _match.s maketree contrib/infback9/*.o |
| 172 | |
| 173 | maintainer-clean: distclean |
| 174 | diff -ipuwr -x config.log -x config.status -x config.cache -x '*.Po' -x '*.pot' -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' -x '*.o' -x '*.exe' -x patches -x '*.dll' -x'*.la' -x res -x debian -x '*.log' -x '*.lib' -x'*.a' -x .libs -x'*.def' -x'*.uu' -x'*.rc' zlib-1.2.2-orig/contrib/blast/Makefile zlib-1.2.2/contrib/blast/Makefile |
| 175 | --- zlib-1.2.2-orig/contrib/blast/Makefile 2003-03-03 06:45:22.000000000 +0100 |
| 176 | +++ zlib-1.2.2/contrib/blast/Makefile 2004-12-25 11:00:15.343750000 +0100 |
| 177 | @@ -1,5 +1,5 @@ |
| 178 | blast: blast.c blast.h |
| 179 | - cc -DTEST -o blast blast.c |
| 180 | + gcc -DTEST -o blast blast.c |
| 181 | |
| 182 | test: blast |
| 183 | blast < test.pk | cmp - test.txt |
| 184 | diff -ipuwr -x config.log -x config.status -x config.cache -x '*.Po' -x '*.pot' -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' -x '*.o' -x '*.exe' -x patches -x '*.dll' -x'*.la' -x res -x debian -x '*.log' -x '*.lib' -x'*.a' -x .libs -x'*.def' -x'*.uu' -x'*.rc' zlib-1.2.2-orig/contrib/minizip/Makefile zlib-1.2.2/contrib/minizip/Makefile |
| 185 | --- zlib-1.2.2-orig/contrib/minizip/Makefile 2003-09-10 20:00:16.000000000 +0200 |
| 186 | +++ zlib-1.2.2/contrib/minizip/Makefile 2004-12-25 11:00:15.343750000 +0100 |
| 187 | @@ -1,8 +1,8 @@ |
| 188 | -CC=cc |
| 189 | +CC=gcc |
| 190 | CFLAGS=-O -I../.. |
| 191 | |
| 192 | -UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a |
| 193 | -ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a |
| 194 | +UNZ_OBJS = miniunz.o unzip.o iowin32.o ioapi.o ../../libz.a |
| 195 | +ZIP_OBJS = minizip.o zip.o iowin32.o ioapi.o ../../libz.a |
| 196 | |
| 197 | .c.o: |
| 198 | $(CC) -c $(CFLAGS) $*.c |
| 199 | diff -ipuwr -x config.log -x config.status -x config.cache -x '*.Po' -x '*.pot' -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' -x '*.o' -x '*.exe' -x patches -x '*.dll' -x'*.la' -x res -x debian -x '*.log' -x '*.lib' -x'*.a' -x .libs -x'*.def' -x'*.uu' -x'*.rc' zlib-1.2.2-orig/contrib/minizip/miniunz.c zlib-1.2.2/contrib/minizip/miniunz.c |
| 200 | --- zlib-1.2.2-orig/contrib/minizip/miniunz.c 2004-10-04 04:45:05.000000000 +0200 |
| 201 | +++ zlib-1.2.2/contrib/minizip/miniunz.c 2004-12-25 11:00:15.359375000 +0100 |
| 202 | @@ -9,7 +9,6 @@ |
| 203 | #include <stdio.h> |
| 204 | #include <stdlib.h> |
| 205 | #include <string.h> |
| 206 | -#include <time.h> |
| 207 | #include <errno.h> |
| 208 | #include <fcntl.h> |
| 209 | |
| 210 | @@ -20,6 +19,10 @@ |
| 211 | # include <direct.h> |
| 212 | # include <io.h> |
| 213 | #endif |
| 214 | +#ifdef __WIN32__ |
| 215 | +#include <windows.h> |
| 216 | +#endif |
| 217 | +#include <time.h> |
| 218 | |
| 219 | #include "unzip.h" |
| 220 | |
| 221 | diff -ipuwr -x config.log -x config.status -x config.cache -x '*.Po' -x '*.pot' -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' -x '*.o' -x '*.exe' -x patches -x '*.dll' -x'*.la' -x res -x debian -x '*.log' -x '*.lib' -x'*.a' -x .libs -x'*.def' -x'*.uu' -x'*.rc' zlib-1.2.2-orig/contrib/minizip/minizip.c zlib-1.2.2/contrib/minizip/minizip.c |
| 222 | --- zlib-1.2.2-orig/contrib/minizip/minizip.c 2004-05-31 01:24:32.000000000 +0200 |
| 223 | +++ zlib-1.2.2/contrib/minizip/minizip.c 2004-12-25 11:00:15.359375000 +0100 |
| 224 | @@ -8,7 +8,6 @@ |
| 225 | #include <stdio.h> |
| 226 | #include <stdlib.h> |
| 227 | #include <string.h> |
| 228 | -#include <time.h> |
| 229 | #include <errno.h> |
| 230 | #include <fcntl.h> |
| 231 | |
| 232 | @@ -21,6 +20,10 @@ |
| 233 | # include <direct.h> |
| 234 | # include <io.h> |
| 235 | #endif |
| 236 | +#ifdef __WIN32__ |
| 237 | +#include <windows.h> |
| 238 | +#endif |
| 239 | +#include <time.h> |
| 240 | |
| 241 | #include "zip.h" |
| 242 | |
| 243 | diff -ipuwr -x config.log -x config.status -x config.cache -x '*.Po' -x '*.pot' -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' -x '*.o' -x '*.exe' -x patches -x '*.dll' -x'*.la' -x res -x debian -x '*.log' -x '*.lib' -x'*.a' -x .libs -x'*.def' -x'*.uu' -x'*.rc' zlib-1.2.2-orig/contrib/minizip/zip.c zlib-1.2.2/contrib/minizip/zip.c |
| 244 | --- zlib-1.2.2-orig/contrib/minizip/zip.c 2004-09-22 16:36:50.000000000 +0200 |
| 245 | +++ zlib-1.2.2/contrib/minizip/zip.c 2004-12-25 11:00:15.375000000 +0100 |
| 246 | @@ -13,6 +13,7 @@ |
| 247 | #include <time.h> |
| 248 | #include "zlib.h" |
| 249 | #include "zip.h" |
| 250 | +#include "zutil.h" |
| 251 | |
| 252 | #ifdef STDC |
| 253 | # include <stddef.h> |
| 254 | diff -ipuwr -x config.log -x config.status -x config.cache -x '*.Po' -x '*.pot' -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' -x '*.o' -x '*.exe' -x patches -x '*.dll' -x'*.la' -x res -x debian -x '*.log' -x '*.lib' -x'*.a' -x .libs -x'*.def' -x'*.uu' -x'*.rc' zlib-1.2.2-orig/contrib/untgz/untgz.c zlib-1.2.2/contrib/untgz/untgz.c |
| 255 | --- zlib-1.2.2-orig/contrib/untgz/untgz.c 2004-03-07 07:00:00.000000000 +0100 |
| 256 | +++ zlib-1.2.2/contrib/untgz/untgz.c 2004-12-25 11:00:15.375000000 +0100 |
| 257 | @@ -9,7 +9,6 @@ |
| 258 | #include <stdio.h> |
| 259 | #include <stdlib.h> |
| 260 | #include <string.h> |
| 261 | -#include <time.h> |
| 262 | #include <errno.h> |
| 263 | |
| 264 | #include "zlib.h" |
| 265 | @@ -32,9 +31,11 @@ |
| 266 | # define chmod(path,mode) _chmod(path,mode) |
| 267 | # define strdup(str) _strdup(str) |
| 268 | # endif |
| 269 | +#include <windows.h> |
| 270 | #else |
| 271 | # include <utime.h> |
| 272 | #endif |
| 273 | +#include <time.h> |
| 274 | |
| 275 | |
| 276 | /* values used in typeflag field */ |
| 277 | diff -ipuwr -x config.log -x config.status -x config.cache -x '*.Po' -x '*.pot' -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' -x '*.o' -x '*.exe' -x patches -x '*.dll' -x'*.la' -x res -x debian -x '*.log' -x '*.lib' -x'*.a' -x .libs -x'*.def' -x'*.uu' -x'*.rc' zlib-1.2.2-orig/gzio.c zlib-1.2.2/gzio.c |
| 278 | --- zlib-1.2.2-orig/gzio.c 2004-10-04 04:30:37.000000000 +0200 |
| 279 | +++ zlib-1.2.2/gzio.c 2004-12-25 11:00:15.390625000 +0100 |
| 280 | @@ -881,7 +881,7 @@ int ZEXPORT gzrewind (file) |
| 281 | z_off_t ZEXPORT gztell (file) |
| 282 | gzFile file; |
| 283 | { |
| 284 | - return gzseek(file, 0L, SEEK_CUR); |
| 285 | + return gzseek(file, 0LL, SEEK_CUR); |
| 286 | } |
| 287 | |
| 288 | /* =========================================================================== |
| 289 | diff -ipuwr -x config.log -x config.status -x config.cache -x '*.Po' -x '*.pot' -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' -x '*~' -x '*.o' -x '*.exe' -x patches -x '*.dll' -x'*.la' -x res -x debian -x '*.log' -x '*.lib' -x'*.a' -x .libs -x'*.def' -x'*.uu' -x'*.rc' zlib-1.2.2-orig/zconf.h zlib-1.2.2/zconf.h |
| 290 | --- zlib-1.2.2-orig/zconf.h 2004-05-30 22:38:00.000000000 +0200 |
| 291 | +++ zlib-1.2.2/zconf.h 2004-12-25 11:00:15.390625000 +0100 |
| 292 | @@ -278,7 +278,7 @@ typedef uLong FAR uLongf; |
| 293 | typedef Byte *voidp; |
| 294 | #endif |
| 295 | |
| 296 | -#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ |
| 297 | +#if 1 /* HAVE_UNISTD_H -- this line is updated by ./configure */ |
| 298 | # include <sys/types.h> /* for off_t */ |
| 299 | # include <unistd.h> /* for SEEK_* and off_t */ |
| 300 | # ifdef VMS |