diff options
| -rw-r--r-- | meta/packages/zlib/files/1.2.3.3.dfsg.patch.gz | bin | 51163 -> 0 bytes | |||
| -rw-r--r-- | meta/packages/zlib/files/Makefile.am | 9 | ||||
| -rw-r--r-- | meta/packages/zlib/files/autotools.patch | 849 | ||||
| -rw-r--r-- | meta/packages/zlib/files/configure.ac | 48 | ||||
| -rw-r--r-- | meta/packages/zlib/files/visibility.patch | 985 | ||||
| -rw-r--r-- | meta/packages/zlib/zlib_1.2.3.bb | 19 | ||||
| -rw-r--r-- | meta/packages/zlib/zlib_1.2.5.bb | 22 |
7 files changed, 79 insertions, 1853 deletions
diff --git a/meta/packages/zlib/files/1.2.3.3.dfsg.patch.gz b/meta/packages/zlib/files/1.2.3.3.dfsg.patch.gz deleted file mode 100644 index 2afb60de8c..0000000000 --- a/meta/packages/zlib/files/1.2.3.3.dfsg.patch.gz +++ /dev/null | |||
| Binary files differ | |||
diff --git a/meta/packages/zlib/files/Makefile.am b/meta/packages/zlib/files/Makefile.am new file mode 100644 index 0000000000..b66d299d8f --- /dev/null +++ b/meta/packages/zlib/files/Makefile.am | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | lib_LTLIBRARIES = libz.la | ||
| 2 | |||
| 3 | libz_la_SOURCES = adler32.c compress.c crc32.c gzlib.c gzclose.c gzread.c \ | ||
| 4 | gzwrite.c uncompr.c deflate.c trees.c zutil.c inflate.c \ | ||
| 5 | infback.c inftrees.c inffast.c | ||
| 6 | |||
| 7 | libz_la_LDFLAGS = -version-number 1:2:5 --version-script zlib.map | ||
| 8 | |||
| 9 | include_HEADERS = zconf.h zlib.h zlibdefs.h | ||
diff --git a/meta/packages/zlib/files/autotools.patch b/meta/packages/zlib/files/autotools.patch deleted file mode 100644 index c2db0848f2..0000000000 --- a/meta/packages/zlib/files/autotools.patch +++ /dev/null | |||
| @@ -1,849 +0,0 @@ | |||
| 1 | Index: zlib-1.2.3/configure | ||
| 2 | =================================================================== | ||
| 3 | --- zlib-1.2.3.orig/configure 2008-08-23 11:23:47.000000000 +0100 | ||
| 4 | +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
| 5 | @@ -1,558 +0,0 @@ | ||
| 6 | -#!/bin/sh | ||
| 7 | -# configure script for zlib. This script is needed only if | ||
| 8 | -# you wish to build a shared library and your system supports them, | ||
| 9 | -# of if you need special compiler, flags or install directory. | ||
| 10 | -# Otherwise, you can just use directly "make test; make install" | ||
| 11 | -# | ||
| 12 | -# To create a shared library, use "configure --shared"; by default a static | ||
| 13 | -# library is created. If the primitive shared library support provided here | ||
| 14 | -# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz | ||
| 15 | -# | ||
| 16 | -# To impose specific compiler or flags or install directory, use for example: | ||
| 17 | -# prefix=$HOME CC=cc CFLAGS="-O4" ./configure | ||
| 18 | -# or for csh/tcsh users: | ||
| 19 | -# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure) | ||
| 20 | -# LDSHARED is the command to be used to create a shared library | ||
| 21 | - | ||
| 22 | -# Incorrect settings of CC or CFLAGS may prevent creating a shared library. | ||
| 23 | -# If you have problems, try without defining CC and CFLAGS before reporting | ||
| 24 | -# an error. | ||
| 25 | - | ||
| 26 | -LIBS=libz.a | ||
| 27 | -LDFLAGS="-L. ${LIBS}" | ||
| 28 | -VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` | ||
| 29 | -VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` | ||
| 30 | -VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` | ||
| 31 | -AR=${AR-"ar"} | ||
| 32 | -AR_RC="${AR} rc" | ||
| 33 | -RANLIB=${RANLIB-"ranlib"} | ||
| 34 | -prefix=${prefix-/usr/local} | ||
| 35 | -exec_prefix=${exec_prefix-'${prefix}'} | ||
| 36 | -libdir=${libdir-'${exec_prefix}/lib'} | ||
| 37 | -includedir=${includedir-'${prefix}/include'} | ||
| 38 | -mandir=${mandir-'${prefix}/share/man'} | ||
| 39 | -shared_ext='.so' | ||
| 40 | -shared=1 | ||
| 41 | -zprefix=0 | ||
| 42 | -gcc=0 | ||
| 43 | -old_cc="$CC" | ||
| 44 | -old_cflags="$CFLAGS" | ||
| 45 | - | ||
| 46 | -while test $# -ge 1 | ||
| 47 | -do | ||
| 48 | -case "$1" in | ||
| 49 | - -h* | --help) | ||
| 50 | - echo 'usage:' | ||
| 51 | - echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]' | ||
| 52 | - echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR] [--zprefix]' | ||
| 53 | - exit 0;; | ||
| 54 | - -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; | ||
| 55 | - -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; | ||
| 56 | - -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; | ||
| 57 | - -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;; | ||
| 58 | - -u*=* | --uname=*) uname=`echo $1 | sed 's/[-a-z_]*=//'`;shift;; | ||
| 59 | - -p* | --prefix) prefix="$2"; shift; shift;; | ||
| 60 | - -e* | --eprefix) exec_prefix="$2"; shift; shift;; | ||
| 61 | - -l* | --libdir) libdir="$2"; shift; shift;; | ||
| 62 | - -i* | --includedir) includedir="$2"; shift; shift;; | ||
| 63 | - -s* | --shared | --enable-shared) shared=1; shift;; | ||
| 64 | - -t | --static) shared=0; shift;; | ||
| 65 | - -z* | --zprefix) zprefix=1; shift;; | ||
| 66 | - --sysconfdir=*) echo "ignored option: --sysconfdir"; shift;; | ||
| 67 | - --localstatedir=*) echo "ignored option: --localstatedir"; shift;; | ||
| 68 | - *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;; | ||
| 69 | - esac | ||
| 70 | -done | ||
| 71 | - | ||
| 72 | -test=ztest$$ | ||
| 73 | -cat > $test.c <<EOF | ||
| 74 | -extern int getchar(); | ||
| 75 | -int hello() {return getchar();} | ||
| 76 | -EOF | ||
| 77 | - | ||
| 78 | -test -z "$CC" && echo Checking for gcc... | ||
| 79 | -cc=${CC-gcc} | ||
| 80 | -cflags=${CFLAGS-"-O3"} | ||
| 81 | -# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure | ||
| 82 | -case "$cc" in | ||
| 83 | - *gcc*) gcc=1;; | ||
| 84 | -esac | ||
| 85 | - | ||
| 86 | -if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then | ||
| 87 | - CC="$cc" | ||
| 88 | - SFLAGS="${CFLAGS-"-O3"} -fPIC" | ||
| 89 | - CFLAGS="${CFLAGS-"-O3"}" | ||
| 90 | - if test -z $uname; then | ||
| 91 | - uname=`(uname -s || echo unknown) 2>/dev/null` | ||
| 92 | - fi | ||
| 93 | - case "$uname" in | ||
| 94 | - Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"};; | ||
| 95 | - CYGWIN* | Cygwin* | cygwin* | OS/2* ) | ||
| 96 | - EXE='.exe';; | ||
| 97 | - QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 | ||
| 98 | - # (alain.bonnefoy@icbt.com) | ||
| 99 | - LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};; | ||
| 100 | - HP-UX*) | ||
| 101 | - LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"} | ||
| 102 | - case `(uname -m || echo unknown) 2>/dev/null` in | ||
| 103 | - ia64) | ||
| 104 | - shared_ext='.so' | ||
| 105 | - SHAREDLIB='libz.so';; | ||
| 106 | - *) | ||
| 107 | - shared_ext='.sl' | ||
| 108 | - SHAREDLIB='libz.sl';; | ||
| 109 | - esac;; | ||
| 110 | - Darwin*) shared_ext='.dylib' | ||
| 111 | - SHAREDLIB=libz$shared_ext | ||
| 112 | - SHAREDLIBV=libz.$VER$shared_ext | ||
| 113 | - SHAREDLIBM=libz.$VER1$shared_ext | ||
| 114 | - LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};; | ||
| 115 | - *) LDSHARED=${LDSHARED-"$cc -shared"};; | ||
| 116 | - esac | ||
| 117 | -else | ||
| 118 | - # find system name and corresponding cc options | ||
| 119 | - CC=${CC-cc} | ||
| 120 | - if test -z $uname; then | ||
| 121 | - uname=`(uname -sr || echo unknown) 2>/dev/null` | ||
| 122 | - fi | ||
| 123 | - case "$uname" in | ||
| 124 | - HP-UX*) SFLAGS=${CFLAGS-"-O +z"} | ||
| 125 | - CFLAGS=${CFLAGS-"-O"} | ||
| 126 | -# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"} | ||
| 127 | - LDSHARED=${LDSHARED-"ld -b"} | ||
| 128 | - case `(uname -m || echo unknown) 2>/dev/null` in | ||
| 129 | - ia64) | ||
| 130 | - shared_ext='.so' | ||
| 131 | - SHAREDLIB='libz.so';; | ||
| 132 | - *) | ||
| 133 | - shared_ext='.sl' | ||
| 134 | - SHAREDLIB='libz.sl';; | ||
| 135 | - esac;; | ||
| 136 | - IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} | ||
| 137 | - CFLAGS=${CFLAGS-"-ansi -O2"} | ||
| 138 | - LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"};; | ||
| 139 | - OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} | ||
| 140 | - CFLAGS=${CFLAGS-"-O -std1"} | ||
| 141 | - LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};; | ||
| 142 | - OSF1*) SFLAGS=${CFLAGS-"-O -std1"} | ||
| 143 | - CFLAGS=${CFLAGS-"-O -std1"} | ||
| 144 | - LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"};; | ||
| 145 | - QNX*) SFLAGS=${CFLAGS-"-4 -O"} | ||
| 146 | - CFLAGS=${CFLAGS-"-4 -O"} | ||
| 147 | - LDSHARED=${LDSHARED-"cc"} | ||
| 148 | - RANLIB=${RANLIB-"true"} | ||
| 149 | - AR_RC="cc -A";; | ||
| 150 | - SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} | ||
| 151 | - CFLAGS=${CFLAGS-"-O3"} | ||
| 152 | - LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; | ||
| 153 | - SunOS\ 5*) LDSHARED=${LDSHARED-"cc -G"} | ||
| 154 | - case `(uname -m || echo unknown) 2>/dev/null` in | ||
| 155 | - i86*) | ||
| 156 | - SFLAGS=${CFLAGS-"-xpentium -fast -KPIC -R."} | ||
| 157 | - CFLAGS=${CFLAGS-"-xpentium -fast"};; | ||
| 158 | - *) | ||
| 159 | - SFLAGS=${CFLAGS-"-fast -xcg92 -KPIC -R."} | ||
| 160 | - CFLAGS=${CFLAGS-"-fast -xcg92"};; | ||
| 161 | - esac;; | ||
| 162 | - SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} | ||
| 163 | - CFLAGS=${CFLAGS-"-O2"} | ||
| 164 | - LDSHARED=${LDSHARED-"ld"};; | ||
| 165 | - SunStudio\ 9*) SFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"} | ||
| 166 | - CFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xtarget=ultra3 -xarch=v9b"} | ||
| 167 | - LDSHARED=${LDSHARED-"cc -xarch=v9b"};; | ||
| 168 | - UNIX_System_V\ 4.2.0) | ||
| 169 | - SFLAGS=${CFLAGS-"-KPIC -O"} | ||
| 170 | - CFLAGS=${CFLAGS-"-O"} | ||
| 171 | - LDSHARED=${LDSHARED-"cc -G"};; | ||
| 172 | - UNIX_SV\ 4.2MP) | ||
| 173 | - SFLAGS=${CFLAGS-"-Kconform_pic -O"} | ||
| 174 | - CFLAGS=${CFLAGS-"-O"} | ||
| 175 | - LDSHARED=${LDSHARED-"cc -G"};; | ||
| 176 | - OpenUNIX\ 5) | ||
| 177 | - SFLAGS=${CFLAGS-"-KPIC -O"} | ||
| 178 | - CFLAGS=${CFLAGS-"-O"} | ||
| 179 | - LDSHARED=${LDSHARED-"cc -G"};; | ||
| 180 | - AIX*) # Courtesy of dbakker@arrayasolutions.com | ||
| 181 | - SFLAGS=${CFLAGS-"-O -qmaxmem=8192"} | ||
| 182 | - CFLAGS=${CFLAGS-"-O -qmaxmem=8192"} | ||
| 183 | - LDSHARED=${LDSHARED-"xlc -G"};; | ||
| 184 | - # send working options for other systems to support@gzip.org | ||
| 185 | - *) SFLAGS=${CFLAGS-"-O"} | ||
| 186 | - CFLAGS=${CFLAGS-"-O"} | ||
| 187 | - LDSHARED=${LDSHARED-"cc -shared"};; | ||
| 188 | - esac | ||
| 189 | -fi | ||
| 190 | - | ||
| 191 | -SHAREDLIB=${SHAREDLIB-"libz$shared_ext"} | ||
| 192 | -SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"} | ||
| 193 | -SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"} | ||
| 194 | - | ||
| 195 | -if test $shared -eq 1; then | ||
| 196 | - echo Checking for shared library support... | ||
| 197 | - # we must test in two steps (cc then ld), required at least on SunOS 4.x | ||
| 198 | - if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" && | ||
| 199 | - test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then | ||
| 200 | - LIBS="$LIBS $SHAREDLIBV" | ||
| 201 | - echo Building shared library $SHAREDLIBV with $CC. | ||
| 202 | - elif test -z "$old_cc" -a -z "$old_cflags"; then | ||
| 203 | - echo No shared library support. | ||
| 204 | - shared=0; | ||
| 205 | - else | ||
| 206 | - echo Tested $CC -c $SFLAGS $test.c | ||
| 207 | - $CC -c $SFLAGS $test.c | ||
| 208 | - echo Tested $LDSHARED -o $test$shared_ext $test.o | ||
| 209 | - $LDSHARED -o $test$shared_ext $test.o | ||
| 210 | - echo 'No shared library support; try without defining CC and CFLAGS' | ||
| 211 | - shared=0; | ||
| 212 | - fi | ||
| 213 | -fi | ||
| 214 | -if test $shared -eq 0; then | ||
| 215 | - LDSHARED="$CC" | ||
| 216 | - ALL="allstatic" | ||
| 217 | - TEST="teststatic" | ||
| 218 | - echo Building static library $LIBS version $VER with $CC. | ||
| 219 | -else | ||
| 220 | - ALL="allstatic allshared" | ||
| 221 | - TEST="teststatic testshared" | ||
| 222 | -fi | ||
| 223 | - | ||
| 224 | -cat > zlibdefs.h << EOF | ||
| 225 | -/* zlibdefs.h -- compile-time definitions for the zlib compression library | ||
| 226 | - * Copyright (C) 1995-2006 Jean-loup Gailly. | ||
| 227 | - * For conditions of distribution and use, see copyright notice in zlib.h | ||
| 228 | - */ | ||
| 229 | - | ||
| 230 | -EOF | ||
| 231 | - | ||
| 232 | -cat > $test.c <<EOF | ||
| 233 | -#include <sys/types.h> | ||
| 234 | -off64_t dummy = 0; | ||
| 235 | -EOF | ||
| 236 | -if test "`($CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c) 2>&1`" = ""; then | ||
| 237 | - CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1" | ||
| 238 | - SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1" | ||
| 239 | - echo "Checking for off64_t... Yes." | ||
| 240 | - echo "Checking for fseeko... Yes." | ||
| 241 | -else | ||
| 242 | - echo "Checking for off64_t... No." | ||
| 243 | - cat > $test.c <<EOF | ||
| 244 | -#include <stdio.h> | ||
| 245 | -int main(void) { | ||
| 246 | - fseeko(NULL, 0, 0); | ||
| 247 | - return 0; | ||
| 248 | -} | ||
| 249 | -EOF | ||
| 250 | - if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then | ||
| 251 | - echo "Checking for fseeko... Yes." | ||
| 252 | - else | ||
| 253 | - CFLAGS="${CFLAGS} -DNO_FSEEKO" | ||
| 254 | - SFLAGS="${SFLAGS} -DNO_FSEEKO" | ||
| 255 | - echo "Checking for fseeko... No." | ||
| 256 | - fi | ||
| 257 | -fi | ||
| 258 | - | ||
| 259 | -cat > $test.c <<EOF | ||
| 260 | -#include <unistd.h> | ||
| 261 | -int main() { return 0; } | ||
| 262 | -EOF | ||
| 263 | -if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | ||
| 264 | - cat >> zlibdefs.h <<EOF | ||
| 265 | -#include <sys/types.h> /* for off_t */ | ||
| 266 | -#include <unistd.h> /* for SEEK_* and off_t */ | ||
| 267 | -#ifdef VMS | ||
| 268 | -# include <unixio.h> /* for off_t */ | ||
| 269 | -#endif | ||
| 270 | -#ifndef z_off_t | ||
| 271 | -# define z_off_t off_t | ||
| 272 | -#endif | ||
| 273 | -EOF | ||
| 274 | - echo "Checking for unistd.h... Yes." | ||
| 275 | -else | ||
| 276 | - echo "Checking for unistd.h... No." | ||
| 277 | -fi | ||
| 278 | - | ||
| 279 | -if test $zprefix -eq 1; then | ||
| 280 | - sed < zconf.h "/#ifdef Z_PREFIX/s/def Z_PREFIX/ 1/" > zconf.temp.h | ||
| 281 | - mv zconf.temp.h zconf.h | ||
| 282 | - echo "Using z_ prefix on all symbols." | ||
| 283 | -fi | ||
| 284 | - | ||
| 285 | -cat > $test.c <<EOF | ||
| 286 | -#include <stdio.h> | ||
| 287 | -#include <stdarg.h> | ||
| 288 | -#include "zconf.h" | ||
| 289 | - | ||
| 290 | -int main() | ||
| 291 | -{ | ||
| 292 | -#ifndef STDC | ||
| 293 | - choke me | ||
| 294 | -#endif | ||
| 295 | - | ||
| 296 | - return 0; | ||
| 297 | -} | ||
| 298 | -EOF | ||
| 299 | - | ||
| 300 | -if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | ||
| 301 | - echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()." | ||
| 302 | - | ||
| 303 | - cat > $test.c <<EOF | ||
| 304 | -#include <stdio.h> | ||
| 305 | -#include <stdarg.h> | ||
| 306 | - | ||
| 307 | -int mytest(char *fmt, ...) | ||
| 308 | -{ | ||
| 309 | - char buf[20]; | ||
| 310 | - va_list ap; | ||
| 311 | - | ||
| 312 | - va_start(ap, fmt); | ||
| 313 | - vsnprintf(buf, sizeof(buf), fmt, ap); | ||
| 314 | - va_end(ap); | ||
| 315 | - return 0; | ||
| 316 | -} | ||
| 317 | - | ||
| 318 | -int main() | ||
| 319 | -{ | ||
| 320 | - return (mytest("Hello%d\n", 1)); | ||
| 321 | -} | ||
| 322 | -EOF | ||
| 323 | - | ||
| 324 | - if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then | ||
| 325 | - echo "Checking for vsnprintf() in stdio.h... Yes." | ||
| 326 | - | ||
| 327 | - cat >$test.c <<EOF | ||
| 328 | -#include <stdio.h> | ||
| 329 | -#include <stdarg.h> | ||
| 330 | - | ||
| 331 | -int mytest(char *fmt, ...) | ||
| 332 | -{ | ||
| 333 | - int n; | ||
| 334 | - char buf[20]; | ||
| 335 | - va_list ap; | ||
| 336 | - | ||
| 337 | - va_start(ap, fmt); | ||
| 338 | - n = vsnprintf(buf, sizeof(buf), fmt, ap); | ||
| 339 | - va_end(ap); | ||
| 340 | - return n; | ||
| 341 | -} | ||
| 342 | - | ||
| 343 | -int main() | ||
| 344 | -{ | ||
| 345 | - return (mytest("Hello%d\n", 1)); | ||
| 346 | -} | ||
| 347 | -EOF | ||
| 348 | - | ||
| 349 | - if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | ||
| 350 | - echo "Checking for return value of vsnprintf()... Yes." | ||
| 351 | - else | ||
| 352 | - CFLAGS="$CFLAGS -DHAS_vsnprintf_void" | ||
| 353 | - echo "Checking for return value of vsnprintf()... No." | ||
| 354 | - echo " WARNING: apparently vsnprintf() does not return a value. zlib" | ||
| 355 | - echo " can build but will be open to possible string-format security" | ||
| 356 | - echo " vulnerabilities." | ||
| 357 | - fi | ||
| 358 | - else | ||
| 359 | - CFLAGS="$CFLAGS -DNO_vsnprintf" | ||
| 360 | - echo "Checking for vsnprintf() in stdio.h... No." | ||
| 361 | - echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib" | ||
| 362 | - echo " can build but will be open to possible buffer-overflow security" | ||
| 363 | - echo " vulnerabilities." | ||
| 364 | - | ||
| 365 | - cat >$test.c <<EOF | ||
| 366 | -#include <stdio.h> | ||
| 367 | -#include <stdarg.h> | ||
| 368 | - | ||
| 369 | -int mytest(char *fmt, ...) | ||
| 370 | -{ | ||
| 371 | - int n; | ||
| 372 | - char buf[20]; | ||
| 373 | - va_list ap; | ||
| 374 | - | ||
| 375 | - va_start(ap, fmt); | ||
| 376 | - n = vsprintf(buf, fmt, ap); | ||
| 377 | - va_end(ap); | ||
| 378 | - return n; | ||
| 379 | -} | ||
| 380 | - | ||
| 381 | -int main() | ||
| 382 | -{ | ||
| 383 | - return (mytest("Hello%d\n", 1)); | ||
| 384 | -} | ||
| 385 | -EOF | ||
| 386 | - | ||
| 387 | - if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | ||
| 388 | - echo "Checking for return value of vsprintf()... Yes." | ||
| 389 | - else | ||
| 390 | - CFLAGS="$CFLAGS -DHAS_vsprintf_void" | ||
| 391 | - echo "Checking for return value of vsprintf()... No." | ||
| 392 | - echo " WARNING: apparently vsprintf() does not return a value. zlib" | ||
| 393 | - echo " can build but will be open to possible string-format security" | ||
| 394 | - echo " vulnerabilities." | ||
| 395 | - fi | ||
| 396 | - fi | ||
| 397 | -else | ||
| 398 | - echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()." | ||
| 399 | - | ||
| 400 | - cat >$test.c <<EOF | ||
| 401 | -#include <stdio.h> | ||
| 402 | - | ||
| 403 | -int mytest() | ||
| 404 | -{ | ||
| 405 | - char buf[20]; | ||
| 406 | - | ||
| 407 | - snprintf(buf, sizeof(buf), "%s", "foo"); | ||
| 408 | - return 0; | ||
| 409 | -} | ||
| 410 | - | ||
| 411 | -int main() | ||
| 412 | -{ | ||
| 413 | - return (mytest()); | ||
| 414 | -} | ||
| 415 | -EOF | ||
| 416 | - | ||
| 417 | - if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then | ||
| 418 | - echo "Checking for snprintf() in stdio.h... Yes." | ||
| 419 | - | ||
| 420 | - cat >$test.c <<EOF | ||
| 421 | -#include <stdio.h> | ||
| 422 | - | ||
| 423 | -int mytest() | ||
| 424 | -{ | ||
| 425 | - char buf[20]; | ||
| 426 | - | ||
| 427 | - return snprintf(buf, sizeof(buf), "%s", "foo"); | ||
| 428 | -} | ||
| 429 | - | ||
| 430 | -int main() | ||
| 431 | -{ | ||
| 432 | - return (mytest()); | ||
| 433 | -} | ||
| 434 | -EOF | ||
| 435 | - | ||
| 436 | - if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | ||
| 437 | - echo "Checking for return value of snprintf()... Yes." | ||
| 438 | - else | ||
| 439 | - CFLAGS="$CFLAGS -DHAS_snprintf_void" | ||
| 440 | - echo "Checking for return value of snprintf()... No." | ||
| 441 | - echo " WARNING: apparently snprintf() does not return a value. zlib" | ||
| 442 | - echo " can build but will be open to possible string-format security" | ||
| 443 | - echo " vulnerabilities." | ||
| 444 | - fi | ||
| 445 | - else | ||
| 446 | - CFLAGS="$CFLAGS -DNO_snprintf" | ||
| 447 | - echo "Checking for snprintf() in stdio.h... No." | ||
| 448 | - echo " WARNING: snprintf() not found, falling back to sprintf(). zlib" | ||
| 449 | - echo " can build but will be open to possible buffer-overflow security" | ||
| 450 | - echo " vulnerabilities." | ||
| 451 | - | ||
| 452 | - cat >$test.c <<EOF | ||
| 453 | -#include <stdio.h> | ||
| 454 | - | ||
| 455 | -int mytest() | ||
| 456 | -{ | ||
| 457 | - char buf[20]; | ||
| 458 | - | ||
| 459 | - return sprintf(buf, "%s", "foo"); | ||
| 460 | -} | ||
| 461 | - | ||
| 462 | -int main() | ||
| 463 | -{ | ||
| 464 | - return (mytest()); | ||
| 465 | -} | ||
| 466 | -EOF | ||
| 467 | - | ||
| 468 | - if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | ||
| 469 | - echo "Checking for return value of sprintf()... Yes." | ||
| 470 | - else | ||
| 471 | - CFLAGS="$CFLAGS -DHAS_sprintf_void" | ||
| 472 | - echo "Checking for return value of sprintf()... No." | ||
| 473 | - echo " WARNING: apparently sprintf() does not return a value. zlib" | ||
| 474 | - echo " can build but will be open to possible string-format security" | ||
| 475 | - echo " vulnerabilities." | ||
| 476 | - fi | ||
| 477 | - fi | ||
| 478 | -fi | ||
| 479 | - | ||
| 480 | -cat >$test.c <<EOF | ||
| 481 | -#include <errno.h> | ||
| 482 | -int main() { return 0; } | ||
| 483 | -EOF | ||
| 484 | -if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | ||
| 485 | - echo "Checking for errno.h... Yes." | ||
| 486 | -else | ||
| 487 | - echo "Checking for errno.h... No." | ||
| 488 | - CFLAGS="$CFLAGS -DNO_ERRNO_H" | ||
| 489 | -fi | ||
| 490 | - | ||
| 491 | -cat > $test.c <<EOF | ||
| 492 | -#include <sys/types.h> | ||
| 493 | -#include <sys/mman.h> | ||
| 494 | -#include <sys/stat.h> | ||
| 495 | -caddr_t hello() { | ||
| 496 | - return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0); | ||
| 497 | -} | ||
| 498 | -EOF | ||
| 499 | -if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | ||
| 500 | - CFLAGS="$CFLAGS -DUSE_MMAP" | ||
| 501 | - echo Checking for mmap support... Yes. | ||
| 502 | -else | ||
| 503 | - echo Checking for mmap support... No. | ||
| 504 | -fi | ||
| 505 | - | ||
| 506 | -CPP=${CPP-"$CC -E"} | ||
| 507 | -case $CFLAGS in | ||
| 508 | - *ASMV*) | ||
| 509 | - if test "`nm $test.o | grep _hello`" = ""; then | ||
| 510 | - CPP="$CPP -DNO_UNDERLINE" | ||
| 511 | - echo Checking for underline in external names... No. | ||
| 512 | - else | ||
| 513 | - echo Checking for underline in external names... Yes. | ||
| 514 | - fi;; | ||
| 515 | -esac | ||
| 516 | - | ||
| 517 | -rm -f $test.[co] $test $test$shared_ext | ||
| 518 | - | ||
| 519 | -# udpate Makefile | ||
| 520 | -sed < Makefile.in " | ||
| 521 | -/^CC *=/s#=.*#=$CC# | ||
| 522 | -/^CFLAGS *=/s#=.*#=$CFLAGS# | ||
| 523 | -/^SFLAGS *=/s#=.*#=$SFLAGS# | ||
| 524 | -/^LDFLAGS *=/s#=.*#=$LDFLAGS# | ||
| 525 | -/^LDSHARED *=/s#=.*#=$LDSHARED# | ||
| 526 | -/^CPP *=/s#=.*#=$CPP# | ||
| 527 | -/^LIBS *=/s#=.*#=$LIBS# | ||
| 528 | -/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# | ||
| 529 | -/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# | ||
| 530 | -/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# | ||
| 531 | -/^AR *=/s#=.*#=$AR_RC# | ||
| 532 | -/^RANLIB *=/s#=.*#=$RANLIB# | ||
| 533 | -/^EXE *=/s#=.*#=$EXE# | ||
| 534 | -/^prefix *=/s#=.*#=$prefix# | ||
| 535 | -/^exec_prefix *=/s#=.*#=$exec_prefix# | ||
| 536 | -/^libdir *=/s#=.*#=$libdir# | ||
| 537 | -/^includedir *=/s#=.*#=$includedir# | ||
| 538 | -/^mandir *=/s#=.*#=$mandir# | ||
| 539 | -/^all: */s#:.*#: $ALL# | ||
| 540 | -/^test: */s#:.*#: $TEST# | ||
| 541 | -" > Makefile | ||
| 542 | - | ||
| 543 | -sed < zlib.pc.in " | ||
| 544 | -/^CC *=/s#=.*#=$CC# | ||
| 545 | -/^CFLAGS *=/s#=.*#=$CFLAGS# | ||
| 546 | -/^CPP *=/s#=.*#=$CPP# | ||
| 547 | -/^LDSHARED *=/s#=.*#=$LDSHARED# | ||
| 548 | -/^LIBS *=/s#=.*#=$LIBS# | ||
| 549 | -/^SHAREDLIB *=/s#=.*#=$SHAREDLIB# | ||
| 550 | -/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# | ||
| 551 | -/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# | ||
| 552 | -/^AR *=/s#=.*#=$AR_RC# | ||
| 553 | -/^RANLIB *=/s#=.*#=$RANLIB# | ||
| 554 | -/^EXE *=/s#=.*#=$EXE# | ||
| 555 | -/^prefix *=/s#=.*#=$prefix# | ||
| 556 | -/^exec_prefix *=/s#=.*#=$exec_prefix# | ||
| 557 | -/^libdir *=/s#=.*#=$libdir# | ||
| 558 | -/^includedir *=/s#=.*#=$includedir# | ||
| 559 | -/^mandir *=/s#=.*#=$mandir# | ||
| 560 | -/^LDFLAGS *=/s#=.*#=$LDFLAGS# | ||
| 561 | -" | sed -e " | ||
| 562 | -s/\@VERSION\@/$VER/g; | ||
| 563 | -" > zlib.pc | ||
| 564 | Index: zlib-1.2.3/configure.ac | ||
| 565 | =================================================================== | ||
| 566 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
| 567 | +++ zlib-1.2.3/configure.ac 2008-08-23 12:01:15.000000000 +0100 | ||
| 568 | @@ -0,0 +1,48 @@ | ||
| 569 | +AC_INIT(zlib,1.2.3) | ||
| 570 | +AC_CONFIG_SRCDIR(adler32.c) | ||
| 571 | +AM_INIT_AUTOMAKE(zlibs,1.2.3) | ||
| 572 | + | ||
| 573 | +AC_PREREQ([2.59]) | ||
| 574 | + | ||
| 575 | +AC_PROG_CC([gcc]) | ||
| 576 | +AC_PROG_LIBTOOL | ||
| 577 | + | ||
| 578 | +AC_HEADER_STDC | ||
| 579 | + | ||
| 580 | +zlib_save_CPPFLAGS=$CPPFLAGS | ||
| 581 | +CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" | ||
| 582 | +AC_CHECK_TYPES(off64_t) | ||
| 583 | +CPPFLAGS=$zlib_save_CPPFLAGS | ||
| 584 | + | ||
| 585 | +AC_CACHE_CHECK([whether to enable -D_LARGEFILE64_SOURCE], [zlib_cv_use_lfs64], [ | ||
| 586 | + zlib_cv_use_lfs64=no | ||
| 587 | + if test "$ac_cv_type_off64_t" = "yes"; then | ||
| 588 | + zlib_cv_use_lfs64=yes | ||
| 589 | + fi | ||
| 590 | +]) | ||
| 591 | + | ||
| 592 | +if test "$zlib_cv_use_lfs64" = "yes"; then | ||
| 593 | + CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" | ||
| 594 | + | ||
| 595 | + #APR_ADDTO(CPPFLAGS, [-D_LARGEFILE64_SOURCE]) | ||
| 596 | +fi | ||
| 597 | + | ||
| 598 | +cat > zlibdefs.h << EOF | ||
| 599 | +/* zlibdefs.h -- compile-time definitions for the zlib compression library | ||
| 600 | + * Copyright (C) 1995-2006 Jean-loup Gailly. | ||
| 601 | + * For conditions of distribution and use, see copyright notice in zlib.h | ||
| 602 | + */ | ||
| 603 | + | ||
| 604 | +#include <sys/types.h> /* for off_t */ | ||
| 605 | +#include <unistd.h> /* for SEEK_* and off_t */ | ||
| 606 | +#ifdef VMS | ||
| 607 | +# include <unixio.h> /* for off_t */ | ||
| 608 | +#endif | ||
| 609 | +#ifndef z_off_t | ||
| 610 | +# define z_off_t off_t | ||
| 611 | +#endif | ||
| 612 | +EOF | ||
| 613 | + | ||
| 614 | +AC_CONFIG_FILES([Makefile]) | ||
| 615 | + | ||
| 616 | +AC_OUTPUT | ||
| 617 | Index: zlib-1.2.3/Makefile.am | ||
| 618 | =================================================================== | ||
| 619 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
| 620 | +++ zlib-1.2.3/Makefile.am 2008-08-23 11:23:47.000000000 +0100 | ||
| 621 | @@ -0,0 +1,8 @@ | ||
| 622 | +lib_LTLIBRARIES = libz.la | ||
| 623 | + | ||
| 624 | +libz_la_SOURCES = adler32.c compress.c crc32.c gzio.c uncompr.c deflate.c \ | ||
| 625 | + trees.c zutil.c inflate.c infback.c inftrees.c inffast.c | ||
| 626 | + | ||
| 627 | +libz_la_LDFLAGS = -version-number 1:2:3 --version-script zlib.map | ||
| 628 | + | ||
| 629 | +include_HEADERS = zconf.h zlib.h zlibdefs.h | ||
| 630 | Index: zlib-1.2.3/Makefile.in | ||
| 631 | =================================================================== | ||
| 632 | --- zlib-1.2.3.orig/Makefile.in 2008-08-23 11:23:47.000000000 +0100 | ||
| 633 | +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
| 634 | @@ -1,215 +0,0 @@ | ||
| 635 | -# Makefile for zlib | ||
| 636 | -# Copyright (C) 1995-2006 Jean-loup Gailly. | ||
| 637 | -# For conditions of distribution and use, see copyright notice in zlib.h | ||
| 638 | - | ||
| 639 | -# To compile and test, type: | ||
| 640 | -# ./configure; make test | ||
| 641 | -# The call of configure is optional if you don't have special requirements | ||
| 642 | -# If you wish to build zlib as a shared library, use: ./configure -s | ||
| 643 | - | ||
| 644 | -# To use the asm code, type: | ||
| 645 | -# cp contrib/asm?86/match.S ./match.S | ||
| 646 | -# make LOC=-DASMV OBJA=match.o | ||
| 647 | - | ||
| 648 | -# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: | ||
| 649 | -# make install | ||
| 650 | -# To install in $HOME instead of /usr/local, use: | ||
| 651 | -# make install prefix=$HOME | ||
| 652 | - | ||
| 653 | -CC=cc | ||
| 654 | - | ||
| 655 | -CFLAGS=-O | ||
| 656 | -#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | ||
| 657 | -#CFLAGS=-g -DDEBUG | ||
| 658 | -#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | ||
| 659 | -# -Wstrict-prototypes -Wmissing-prototypes | ||
| 660 | - | ||
| 661 | -SFLAGS=-O | ||
| 662 | - | ||
| 663 | -LDFLAGS=libz.a | ||
| 664 | -LDSHARED=$(CC) | ||
| 665 | -CPP=$(CC) -E | ||
| 666 | - | ||
| 667 | -LIBS=libz.a | ||
| 668 | -SHAREDLIB=libz.so | ||
| 669 | -SHAREDLIBV=libz.so.1.2.3.3 | ||
| 670 | -SHAREDLIBM=libz.so.1 | ||
| 671 | - | ||
| 672 | -AR=ar | ||
| 673 | -RANLIB=ranlib | ||
| 674 | -TAR=tar | ||
| 675 | -SHELL=/bin/sh | ||
| 676 | -EXE= | ||
| 677 | - | ||
| 678 | -prefix = /usr/local | ||
| 679 | -exec_prefix = ${prefix} | ||
| 680 | -libdir = ${exec_prefix}/lib | ||
| 681 | -includedir = ${prefix}/include | ||
| 682 | -mandir = ${prefix}/share/man | ||
| 683 | -man3dir = ${mandir}/man3 | ||
| 684 | -pkgconfigdir = ${libdir}/pkgconfig | ||
| 685 | - | ||
| 686 | -OBJC = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | ||
| 687 | - zutil.o inflate.o infback.o inftrees.o inffast.o | ||
| 688 | - | ||
| 689 | -OBJA = | ||
| 690 | -# to use the asm code: make OBJA=match.o | ||
| 691 | - | ||
| 692 | -OBJS = $(OBJC) $(OBJA) | ||
| 693 | - | ||
| 694 | -PIC_OBJS = $(OBJS:%.o=%.lo) | ||
| 695 | - | ||
| 696 | -TEST_OBJS = example.o minigzip.o | ||
| 697 | - | ||
| 698 | -allstatic: example$(EXE) minigzip$(EXE) | ||
| 699 | - | ||
| 700 | -allshared: examplesh$(EXE) minigzipsh$(EXE) | ||
| 701 | - | ||
| 702 | -all: allstatic allshared | ||
| 703 | - | ||
| 704 | -teststatic: allstatic | ||
| 705 | - @echo hello world | ./minigzip | ./minigzip -d || \ | ||
| 706 | - echo ' *** minigzip test FAILED ***' ; \ | ||
| 707 | - if ./example; then \ | ||
| 708 | - echo ' *** zlib test OK ***'; \ | ||
| 709 | - else \ | ||
| 710 | - echo ' *** zlib test FAILED ***'; \ | ||
| 711 | - fi | ||
| 712 | - | ||
| 713 | -testshared: allshared | ||
| 714 | - @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ | ||
| 715 | - DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \ | ||
| 716 | - SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \ | ||
| 717 | - echo hello world | ./minigzipsh | ./minigzipsh -d || \ | ||
| 718 | - echo ' *** minigzip shared test FAILED ***' ; \ | ||
| 719 | - if ./examplesh; then \ | ||
| 720 | - echo ' *** zlib shared test OK ***'; \ | ||
| 721 | - else \ | ||
| 722 | - echo ' *** zlib shared test FAILED ***'; \ | ||
| 723 | - fi | ||
| 724 | - | ||
| 725 | -test: teststatic testshared | ||
| 726 | - | ||
| 727 | -check: test | ||
| 728 | - | ||
| 729 | -libz.a: $(OBJS) | ||
| 730 | - $(AR) $@ $(OBJS) | ||
| 731 | - -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 | ||
| 732 | - | ||
| 733 | -match.o: match.S | ||
| 734 | - $(CPP) match.S > _match.s | ||
| 735 | - $(CC) -c _match.s | ||
| 736 | - mv _match.o match.o | ||
| 737 | - rm -f _match.s | ||
| 738 | - | ||
| 739 | -match.lo: match.S | ||
| 740 | - $(CPP) match.S > _match.s | ||
| 741 | - $(CC) -c -fPIC _match.s | ||
| 742 | - mv _match.o match.lo | ||
| 743 | - rm -f _match.s | ||
| 744 | - | ||
| 745 | -%.lo: %.c | ||
| 746 | - $(CC) $(SFLAGS) -DPIC -c $< -o $@ | ||
| 747 | - | ||
| 748 | -$(SHAREDLIBV): $(PIC_OBJS) | ||
| 749 | - $(LDSHARED) -o $@ $(PIC_OBJS) -lc | ||
| 750 | - rm -f $(SHAREDLIB) $(SHAREDLIBM) | ||
| 751 | - ln -s $@ $(SHAREDLIB) | ||
| 752 | - ln -s $@ $(SHAREDLIBM) | ||
| 753 | - | ||
| 754 | -example$(EXE): example.o $(LIBS) | ||
| 755 | - $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | ||
| 756 | - | ||
| 757 | -minigzip$(EXE): minigzip.o $(LIBS) | ||
| 758 | - $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | ||
| 759 | - | ||
| 760 | -examplesh$(EXE): example.o $(LIBS) | ||
| 761 | - $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIB) | ||
| 762 | - | ||
| 763 | -minigzipsh$(EXE): minigzip.o $(LIBS) | ||
| 764 | - $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIB) | ||
| 765 | - | ||
| 766 | -install-libs: $(LIBS) | ||
| 767 | - -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi | ||
| 768 | - -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi | ||
| 769 | - -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi | ||
| 770 | - -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi | ||
| 771 | - cp $(LIBS) $(DESTDIR)$(libdir) | ||
| 772 | - cd $(DESTDIR)$(libdir); chmod 755 $(LIBS) | ||
| 773 | - -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 | ||
| 774 | - cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \ | ||
| 775 | - rm -f $(SHAREDLIB) $(SHAREDLIBM); \ | ||
| 776 | - ln -s $(SHAREDLIBV) $(SHAREDLIB); \ | ||
| 777 | - ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ | ||
| 778 | - (ldconfig || true) >/dev/null 2>&1; \ | ||
| 779 | - fi | ||
| 780 | - cp zlib.3 $(DESTDIR)$(man3dir) | ||
| 781 | - chmod 644 $(DESTDIR)$(man3dir)/zlib.3 | ||
| 782 | - cp zlib.pc $(DESTDIR)$(pkgconfigdir) | ||
| 783 | - chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc | ||
| 784 | -# The ranlib in install is needed on NeXTSTEP which checks file times | ||
| 785 | -# ldconfig is for Linux | ||
| 786 | - | ||
| 787 | -install: install-libs | ||
| 788 | - -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi | ||
| 789 | - cp zlib.h zconf.h zlibdefs.h $(DESTDIR)$(includedir) | ||
| 790 | - chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h $(DESTDIR)$(includedir)/zlibdefs.h | ||
| 791 | - | ||
| 792 | -uninstall: | ||
| 793 | - cd $(DESTDIR)$(includedir); rm -f zlib.h zconf.h zlibdefs.h | ||
| 794 | - cd $(DESTDIR)$(libdir); rm -f libz.a; \ | ||
| 795 | - if test -f $(SHAREDLIBV); then \ | ||
| 796 | - rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ | ||
| 797 | - fi | ||
| 798 | - cd $(DESTDIR)$(man3dir); rm -f zlib.3 | ||
| 799 | - cd $(DESTDIR)$(pkgconfigdir); rm -f zlib.pc | ||
| 800 | - | ||
| 801 | -mostlyclean: clean | ||
| 802 | -clean: | ||
| 803 | - rm -f *.o *.lo *~ \ | ||
| 804 | - example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \ | ||
| 805 | - libz.* foo.gz so_locations \ | ||
| 806 | - _match.s maketree contrib/infback9/*.o | ||
| 807 | - | ||
| 808 | -maintainer-clean: distclean | ||
| 809 | -distclean: clean | ||
| 810 | - cp -p Makefile.in Makefile | ||
| 811 | - rm zlibdefs.h | ||
| 812 | - touch -r configure zlibdefs.h | ||
| 813 | - rm -f zlib.pc .DS_Store | ||
| 814 | - | ||
| 815 | -tags: | ||
| 816 | - etags *.[ch] | ||
| 817 | - | ||
| 818 | -depend: | ||
| 819 | - makedepend -- $(CFLAGS) -- *.[ch] | ||
| 820 | - | ||
| 821 | -# DO NOT DELETE THIS LINE -- make depend depends on it. | ||
| 822 | - | ||
| 823 | -adler32.o: zlib.h zconf.h zlibdefs.h | ||
| 824 | -compress.o: zlib.h zconf.h zlibdefs.h | ||
| 825 | -crc32.o: crc32.h zlib.h zconf.h zlibdefs.h | ||
| 826 | -deflate.o: deflate.h zutil.h zlib.h zconf.h zlibdefs.h | ||
| 827 | -example.o: zlib.h zconf.h zlibdefs.h | ||
| 828 | -gzio.o: zutil.h zlib.h zconf.h zlibdefs.h | ||
| 829 | -inffast.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h | ||
| 830 | -inflate.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h | ||
| 831 | -infback.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h | ||
| 832 | -inftrees.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h | ||
| 833 | -minigzip.o: zlib.h zconf.h zlibdefs.h | ||
| 834 | -trees.o: deflate.h zutil.h zlib.h zconf.h zlibdefs.h trees.h | ||
| 835 | -uncompr.o: zlib.h zconf.h zlibdefs.h | ||
| 836 | -zutil.o: zutil.h zlib.h zconf.h zlibdefs.h | ||
| 837 | - | ||
| 838 | -adler32.lo: zlib.h zconf.h zlibdefs.h | ||
| 839 | -compress.lo: zlib.h zconf.h zlibdefs.h | ||
| 840 | -crc32.lo: crc32.h zlib.h zconf.h zlibdefs.h | ||
| 841 | -deflate.lo: deflate.h zutil.h zlib.h zconf.h zlibdefs.h | ||
| 842 | -gzio.lo: zutil.h zlib.h zconf.h zlibdefs.h | ||
| 843 | -inffast.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h | ||
| 844 | -inflate.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h | ||
| 845 | -infback.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h | ||
| 846 | -inftrees.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h | ||
| 847 | -trees.lo: deflate.h zutil.h zlib.h zconf.h zlibdefs.h trees.h | ||
| 848 | -uncompr.lo: zlib.h zconf.h zlibdefs.h | ||
| 849 | -zutil.lo: zutil.h zlib.h zconf.h zlibdefs.h | ||
diff --git a/meta/packages/zlib/files/configure.ac b/meta/packages/zlib/files/configure.ac new file mode 100644 index 0000000000..4761b7ef28 --- /dev/null +++ b/meta/packages/zlib/files/configure.ac | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | AC_INIT(zlib,1.2.5) | ||
| 2 | AC_CONFIG_SRCDIR(adler32.c) | ||
| 3 | AM_INIT_AUTOMAKE(zlibs,1.2.5) | ||
| 4 | |||
| 5 | AC_PREREQ([2.59]) | ||
| 6 | |||
| 7 | AC_PROG_CC([gcc]) | ||
| 8 | AC_PROG_LIBTOOL | ||
| 9 | |||
| 10 | AC_HEADER_STDC | ||
| 11 | |||
| 12 | zlib_save_CPPFLAGS=$CPPFLAGS | ||
| 13 | CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" | ||
| 14 | AC_CHECK_TYPES(off64_t) | ||
| 15 | CPPFLAGS=$zlib_save_CPPFLAGS | ||
| 16 | |||
| 17 | AC_CACHE_CHECK([whether to enable -D_LARGEFILE64_SOURCE], [zlib_cv_use_lfs64], [ | ||
| 18 | zlib_cv_use_lfs64=no | ||
| 19 | if test "$ac_cv_type_off64_t" = "yes"; then | ||
| 20 | zlib_cv_use_lfs64=yes | ||
| 21 | fi | ||
| 22 | ]) | ||
| 23 | |||
| 24 | if test "$zlib_cv_use_lfs64" = "yes"; then | ||
| 25 | CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" | ||
| 26 | |||
| 27 | #APR_ADDTO(CPPFLAGS, [-D_LARGEFILE64_SOURCE]) | ||
| 28 | fi | ||
| 29 | |||
| 30 | cat > zlibdefs.h << EOF | ||
| 31 | /* zlibdefs.h -- compile-time definitions for the zlib compression library | ||
| 32 | * Copyright (C) 1995-2006 Jean-loup Gailly. | ||
| 33 | * For conditions of distribution and use, see copyright notice in zlib.h | ||
| 34 | */ | ||
| 35 | |||
| 36 | #include <sys/types.h> /* for off_t */ | ||
| 37 | #include <unistd.h> /* for SEEK_* and off_t */ | ||
| 38 | #ifdef VMS | ||
| 39 | # include <unixio.h> /* for off_t */ | ||
| 40 | #endif | ||
| 41 | #ifndef z_off_t | ||
| 42 | # define z_off_t off_t | ||
| 43 | #endif | ||
| 44 | EOF | ||
| 45 | |||
| 46 | AC_CONFIG_FILES([Makefile]) | ||
| 47 | |||
| 48 | AC_OUTPUT | ||
diff --git a/meta/packages/zlib/files/visibility.patch b/meta/packages/zlib/files/visibility.patch deleted file mode 100644 index 2dee8e0fe2..0000000000 --- a/meta/packages/zlib/files/visibility.patch +++ /dev/null | |||
| @@ -1,985 +0,0 @@ | |||
| 1 | |||
| 2 | # | ||
| 3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
| 4 | # | ||
| 5 | |||
| 6 | Index: zlib-1.2.3/adler32.c | ||
| 7 | =================================================================== | ||
| 8 | --- zlib-1.2.3.orig/adler32.c 2008-08-23 11:17:43.000000000 +0100 | ||
| 9 | +++ zlib-1.2.3/adler32.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 10 | @@ -63,7 +63,7 @@ | ||
| 11 | #endif | ||
| 12 | |||
| 13 | /* ========================================================================= */ | ||
| 14 | -uLong ZEXPORT adler32(adler, buf, len) | ||
| 15 | +ZEXPORT uLong adler32(adler, buf, len) | ||
| 16 | uLong adler; | ||
| 17 | const Bytef *buf; | ||
| 18 | uInt len; | ||
| 19 | Index: zlib-1.2.3/compress.c | ||
| 20 | =================================================================== | ||
| 21 | --- zlib-1.2.3.orig/compress.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 22 | +++ zlib-1.2.3/compress.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 23 | @@ -19,7 +19,7 @@ | ||
| 24 | memory, Z_BUF_ERROR if there was not enough room in the output buffer, | ||
| 25 | Z_STREAM_ERROR if the level parameter is invalid. | ||
| 26 | */ | ||
| 27 | -int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) | ||
| 28 | +ZEXPORT int compress2 (dest, destLen, source, sourceLen, level) | ||
| 29 | Bytef *dest; | ||
| 30 | uLongf *destLen; | ||
| 31 | const Bytef *source; | ||
| 32 | @@ -59,7 +59,7 @@ | ||
| 33 | |||
| 34 | /* =========================================================================== | ||
| 35 | */ | ||
| 36 | -int ZEXPORT compress (dest, destLen, source, sourceLen) | ||
| 37 | +ZEXPORT int compress (dest, destLen, source, sourceLen) | ||
| 38 | Bytef *dest; | ||
| 39 | uLongf *destLen; | ||
| 40 | const Bytef *source; | ||
| 41 | @@ -72,7 +72,7 @@ | ||
| 42 | If the default memLevel or windowBits for deflateInit() is changed, then | ||
| 43 | this function needs to be updated. | ||
| 44 | */ | ||
| 45 | -uLong ZEXPORT compressBound (sourceLen) | ||
| 46 | +ZEXPORT uLong compressBound (sourceLen) | ||
| 47 | uLong sourceLen; | ||
| 48 | { | ||
| 49 | return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + | ||
| 50 | Index: zlib-1.2.3/crc32.c | ||
| 51 | =================================================================== | ||
| 52 | --- zlib-1.2.3.orig/crc32.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 53 | +++ zlib-1.2.3/crc32.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 54 | @@ -208,7 +208,7 @@ | ||
| 55 | /* ========================================================================= | ||
| 56 | * This function can be used by asm versions of crc32() | ||
| 57 | */ | ||
| 58 | -const unsigned long FAR * ZEXPORT get_crc_table() | ||
| 59 | +ZEXPORT const unsigned long FAR * get_crc_table() | ||
| 60 | { | ||
| 61 | #ifdef DYNAMIC_CRC_TABLE | ||
| 62 | if (crc_table_empty) | ||
| 63 | @@ -222,7 +222,7 @@ | ||
| 64 | #define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 | ||
| 65 | |||
| 66 | /* ========================================================================= */ | ||
| 67 | -unsigned long ZEXPORT crc32(crc, buf, len) | ||
| 68 | +ZEXPORT unsigned long crc32(crc, buf, len) | ||
| 69 | unsigned long crc; | ||
| 70 | const unsigned char FAR *buf; | ||
| 71 | unsigned len; | ||
| 72 | Index: zlib-1.2.3/deflate.c | ||
| 73 | =================================================================== | ||
| 74 | --- zlib-1.2.3.orig/deflate.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 75 | +++ zlib-1.2.3/deflate.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 76 | @@ -201,7 +201,7 @@ | ||
| 77 | zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); | ||
| 78 | |||
| 79 | /* ========================================================================= */ | ||
| 80 | -int ZEXPORT deflateInit_(strm, level, version, stream_size) | ||
| 81 | +ZEXPORT int deflateInit_(strm, level, version, stream_size) | ||
| 82 | z_streamp strm; | ||
| 83 | int level; | ||
| 84 | const char *version; | ||
| 85 | @@ -213,7 +213,7 @@ | ||
| 86 | } | ||
| 87 | |||
| 88 | /* ========================================================================= */ | ||
| 89 | -int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, | ||
| 90 | +ZEXPORT int deflateInit2_(strm, level, method, windowBits, memLevel, strategy, | ||
| 91 | version, stream_size) | ||
| 92 | z_streamp strm; | ||
| 93 | int level; | ||
| 94 | @@ -312,7 +312,7 @@ | ||
| 95 | } | ||
| 96 | |||
| 97 | /* ========================================================================= */ | ||
| 98 | -int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) | ||
| 99 | +ZEXPORT int deflateSetDictionary (strm, dictionary, dictLength) | ||
| 100 | z_streamp strm; | ||
| 101 | const Bytef *dictionary; | ||
| 102 | uInt dictLength; | ||
| 103 | @@ -354,7 +354,7 @@ | ||
| 104 | } | ||
| 105 | |||
| 106 | /* ========================================================================= */ | ||
| 107 | -int ZEXPORT deflateReset (strm) | ||
| 108 | +ZEXPORT int deflateReset (strm) | ||
| 109 | z_streamp strm; | ||
| 110 | { | ||
| 111 | deflate_state *s; | ||
| 112 | @@ -401,7 +401,7 @@ | ||
| 113 | } | ||
| 114 | |||
| 115 | /* ========================================================================= */ | ||
| 116 | -int ZEXPORT deflatePrime (strm, bits, value) | ||
| 117 | +ZEXPORT int deflatePrime (strm, bits, value) | ||
| 118 | z_streamp strm; | ||
| 119 | int bits; | ||
| 120 | int value; | ||
| 121 | @@ -413,7 +413,7 @@ | ||
| 122 | } | ||
| 123 | |||
| 124 | /* ========================================================================= */ | ||
| 125 | -int ZEXPORT deflateParams(strm, level, strategy) | ||
| 126 | +ZEXPORT int deflateParams(strm, level, strategy) | ||
| 127 | z_streamp strm; | ||
| 128 | int level; | ||
| 129 | int strategy; | ||
| 130 | @@ -486,7 +486,7 @@ | ||
| 131 | * upper bound of about 14% expansion does not seem onerous for output buffer | ||
| 132 | * allocation. | ||
| 133 | */ | ||
| 134 | -uLong ZEXPORT deflateBound(strm, sourceLen) | ||
| 135 | +ZEXPORT uLong deflateBound(strm, sourceLen) | ||
| 136 | z_streamp strm; | ||
| 137 | uLong sourceLen; | ||
| 138 | { | ||
| 139 | @@ -581,7 +581,7 @@ | ||
| 140 | } | ||
| 141 | |||
| 142 | /* ========================================================================= */ | ||
| 143 | -int ZEXPORT deflate (strm, flush) | ||
| 144 | +ZEXPORT int deflate (strm, flush) | ||
| 145 | z_streamp strm; | ||
| 146 | int flush; | ||
| 147 | { | ||
| 148 | @@ -888,7 +888,7 @@ | ||
| 149 | } | ||
| 150 | |||
| 151 | /* ========================================================================= */ | ||
| 152 | -int ZEXPORT deflateEnd (strm) | ||
| 153 | +ZEXPORT int deflateEnd (strm) | ||
| 154 | z_streamp strm; | ||
| 155 | { | ||
| 156 | int status; | ||
| 157 | @@ -923,7 +923,7 @@ | ||
| 158 | * To simplify the source, this is not supported for 16-bit MSDOS (which | ||
| 159 | * doesn't have enough memory anyway to duplicate compression states). | ||
| 160 | */ | ||
| 161 | -int ZEXPORT deflateCopy (dest, source) | ||
| 162 | +ZEXPORT int deflateCopy (dest, source) | ||
| 163 | z_streamp dest; | ||
| 164 | z_streamp source; | ||
| 165 | { | ||
| 166 | Index: zlib-1.2.3/gzio.c | ||
| 167 | =================================================================== | ||
| 168 | --- zlib-1.2.3.orig/gzio.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 169 | +++ zlib-1.2.3/gzio.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 170 | @@ -233,7 +233,7 @@ | ||
| 171 | /* =========================================================================== | ||
| 172 | Opens a gzip (.gz) file for reading or writing. | ||
| 173 | */ | ||
| 174 | -gzFile ZEXPORT gzopen (path, mode) | ||
| 175 | +ZEXPORT gzFile gzopen (path, mode) | ||
| 176 | const char *path; | ||
| 177 | const char *mode; | ||
| 178 | { | ||
| 179 | @@ -254,7 +254,7 @@ | ||
| 180 | Associate a gzFile with the file descriptor fd. fd is not dup'ed here | ||
| 181 | to mimic the behavio(u)r of fdopen. | ||
| 182 | */ | ||
| 183 | -gzFile ZEXPORT gzdopen (fd, mode) | ||
| 184 | +ZEXPORT gzFile gzdopen (fd, mode) | ||
| 185 | int fd; | ||
| 186 | const char *mode; | ||
| 187 | { | ||
| 188 | @@ -269,7 +269,7 @@ | ||
| 189 | /* =========================================================================== | ||
| 190 | * Update the compression level and strategy | ||
| 191 | */ | ||
| 192 | -int ZEXPORT gzsetparams (file, level, strategy) | ||
| 193 | +ZEXPORT int gzsetparams (file, level, strategy) | ||
| 194 | gzFile file; | ||
| 195 | int level; | ||
| 196 | int strategy; | ||
| 197 | @@ -430,7 +430,7 @@ | ||
| 198 | Reads the given number of uncompressed bytes from the compressed file. | ||
| 199 | gzread returns the number of bytes actually read (0 for end of file). | ||
| 200 | */ | ||
| 201 | -int ZEXPORT gzread (file, buf, len) | ||
| 202 | +ZEXPORT int gzread (file, buf, len) | ||
| 203 | gzFile file; | ||
| 204 | voidp buf; | ||
| 205 | unsigned len; | ||
| 206 | @@ -539,7 +539,7 @@ | ||
| 207 | Reads one byte from the compressed file. gzgetc returns this byte | ||
| 208 | or -1 in case of end of file or error. | ||
| 209 | */ | ||
| 210 | -int ZEXPORT gzgetc(file) | ||
| 211 | +ZEXPORT int gzgetc(file) | ||
| 212 | gzFile file; | ||
| 213 | { | ||
| 214 | unsigned char c; | ||
| 215 | @@ -551,7 +551,7 @@ | ||
| 216 | /* =========================================================================== | ||
| 217 | Push one byte back onto the stream. | ||
| 218 | */ | ||
| 219 | -int ZEXPORT gzungetc(c, file) | ||
| 220 | +ZEXPORT int gzungetc(c, file) | ||
| 221 | int c; | ||
| 222 | gzFile file; | ||
| 223 | { | ||
| 224 | @@ -576,7 +576,7 @@ | ||
| 225 | |||
| 226 | The current implementation is not optimized at all. | ||
| 227 | */ | ||
| 228 | -char * ZEXPORT gzgets(file, buf, len) | ||
| 229 | +ZEXPORT char * gzgets(file, buf, len) | ||
| 230 | gzFile file; | ||
| 231 | char *buf; | ||
| 232 | int len; | ||
| 233 | @@ -595,7 +595,7 @@ | ||
| 234 | Writes the given number of uncompressed bytes into the compressed file. | ||
| 235 | gzwrite returns the number of bytes actually written (0 in case of error). | ||
| 236 | */ | ||
| 237 | -int ZEXPORT gzwrite (file, buf, len) | ||
| 238 | +ZEXPORT int gzwrite (file, buf, len) | ||
| 239 | gzFile file; | ||
| 240 | voidpc buf; | ||
| 241 | unsigned len; | ||
| 242 | @@ -639,7 +639,7 @@ | ||
| 243 | #ifdef STDC | ||
| 244 | #include <stdarg.h> | ||
| 245 | |||
| 246 | -int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...) | ||
| 247 | +ZEXPORTVA int gzprintf (gzFile file, const char *format, /* args */ ...) | ||
| 248 | { | ||
| 249 | char buf[Z_PRINTF_BUFSIZE]; | ||
| 250 | va_list va; | ||
| 251 | @@ -673,7 +673,7 @@ | ||
| 252 | } | ||
| 253 | #else /* not ANSI C */ | ||
| 254 | |||
| 255 | -int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, | ||
| 256 | +ZEXPORT intVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, | ||
| 257 | a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) | ||
| 258 | gzFile file; | ||
| 259 | const char *format; | ||
| 260 | @@ -714,7 +714,7 @@ | ||
| 261 | Writes c, converted to an unsigned char, into the compressed file. | ||
| 262 | gzputc returns the value that was written, or -1 in case of error. | ||
| 263 | */ | ||
| 264 | -int ZEXPORT gzputc(file, c) | ||
| 265 | +ZEXPORT int gzputc(file, c) | ||
| 266 | gzFile file; | ||
| 267 | int c; | ||
| 268 | { | ||
| 269 | @@ -729,7 +729,7 @@ | ||
| 270 | the terminating null character. | ||
| 271 | gzputs returns the number of characters written, or -1 in case of error. | ||
| 272 | */ | ||
| 273 | -int ZEXPORT gzputs(file, s) | ||
| 274 | +ZEXPORT int gzputs(file, s) | ||
| 275 | gzFile file; | ||
| 276 | const char *s; | ||
| 277 | { | ||
| 278 | @@ -782,7 +782,7 @@ | ||
| 279 | return s->z_err == Z_STREAM_END ? Z_OK : s->z_err; | ||
| 280 | } | ||
| 281 | |||
| 282 | -int ZEXPORT gzflush (file, flush) | ||
| 283 | +ZEXPORT int gzflush (file, flush) | ||
| 284 | gzFile file; | ||
| 285 | int flush; | ||
| 286 | { | ||
| 287 | @@ -906,7 +906,7 @@ | ||
| 288 | /* =========================================================================== | ||
| 289 | Define external functions gzseek() and gzseek64() using local gz_seek(). | ||
| 290 | */ | ||
| 291 | -z_off_t ZEXPORT gzseek (file, offset, whence) | ||
| 292 | +ZEXPORT z_off_t gzseek (file, offset, whence) | ||
| 293 | gzFile file; | ||
| 294 | z_off_t offset; | ||
| 295 | int whence; | ||
| 296 | @@ -935,7 +935,7 @@ | ||
| 297 | /* =========================================================================== | ||
| 298 | Rewinds input file. | ||
| 299 | */ | ||
| 300 | -int ZEXPORT gzrewind (file) | ||
| 301 | +ZEXPORT int gzrewind (file) | ||
| 302 | gzFile file; | ||
| 303 | { | ||
| 304 | gz_stream *s = (gz_stream*)file; | ||
| 305 | @@ -959,7 +959,7 @@ | ||
| 306 | given compressed file. This position represents a number of bytes in the | ||
| 307 | uncompressed data stream. | ||
| 308 | */ | ||
| 309 | -z_off_t ZEXPORT gztell (file) | ||
| 310 | +ZEXPORT z_off_t gztell (file) | ||
| 311 | gzFile file; | ||
| 312 | { | ||
| 313 | return gzseek(file, 0L, SEEK_CUR); | ||
| 314 | @@ -982,7 +982,7 @@ | ||
| 315 | Returns 1 when EOF has previously been detected reading the given | ||
| 316 | input stream, otherwise zero. | ||
| 317 | */ | ||
| 318 | -int ZEXPORT gzeof (file) | ||
| 319 | +ZEXPORT int gzeof (file) | ||
| 320 | gzFile file; | ||
| 321 | { | ||
| 322 | gz_stream *s = (gz_stream*)file; | ||
| 323 | @@ -1044,7 +1044,7 @@ | ||
| 324 | Flushes all pending output if necessary, closes the compressed file | ||
| 325 | and deallocates all the (de)compression state. | ||
| 326 | */ | ||
| 327 | -int ZEXPORT gzclose (file) | ||
| 328 | +ZEXPORT int gzclose (file) | ||
| 329 | gzFile file; | ||
| 330 | { | ||
| 331 | gz_stream *s = (gz_stream*)file; | ||
| 332 | @@ -1078,7 +1078,7 @@ | ||
| 333 | errnum is set to Z_ERRNO and the application may consult errno | ||
| 334 | to get the exact error code. | ||
| 335 | */ | ||
| 336 | -const char * ZEXPORT gzerror (file, errnum) | ||
| 337 | +ZEXPORT const char * gzerror (file, errnum) | ||
| 338 | gzFile file; | ||
| 339 | int *errnum; | ||
| 340 | { | ||
| 341 | @@ -1108,7 +1108,7 @@ | ||
| 342 | /* =========================================================================== | ||
| 343 | Clear the error and end-of-file flags, and do the same for the real file. | ||
| 344 | */ | ||
| 345 | -void ZEXPORT gzclearerr (file) | ||
| 346 | +ZEXPORT void gzclearerr (file) | ||
| 347 | gzFile file; | ||
| 348 | { | ||
| 349 | gz_stream *s = (gz_stream*)file; | ||
| 350 | Index: zlib-1.2.3/infback.c | ||
| 351 | =================================================================== | ||
| 352 | --- zlib-1.2.3.orig/infback.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 353 | +++ zlib-1.2.3/infback.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 354 | @@ -25,7 +25,7 @@ | ||
| 355 | windowBits is in the range 8..15, and window is a user-supplied | ||
| 356 | window and output buffer that is 2**windowBits bytes. | ||
| 357 | */ | ||
| 358 | -int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size) | ||
| 359 | +ZEXPORT int inflateBackInit_(strm, windowBits, window, version, stream_size) | ||
| 360 | z_streamp strm; | ||
| 361 | int windowBits; | ||
| 362 | unsigned char FAR *window; | ||
| 363 | @@ -238,7 +238,7 @@ | ||
| 364 | inflateBack() can also return Z_STREAM_ERROR if the input parameters | ||
| 365 | are not correct, i.e. strm is Z_NULL or the state was not initialized. | ||
| 366 | */ | ||
| 367 | -int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc) | ||
| 368 | +ZEXPORT int inflateBack(strm, in, in_desc, out, out_desc) | ||
| 369 | z_streamp strm; | ||
| 370 | in_func in; | ||
| 371 | void FAR *in_desc; | ||
| 372 | @@ -611,7 +611,7 @@ | ||
| 373 | return ret; | ||
| 374 | } | ||
| 375 | |||
| 376 | -int ZEXPORT inflateBackEnd(strm) | ||
| 377 | +ZEXPORT int inflateBackEnd(strm) | ||
| 378 | z_streamp strm; | ||
| 379 | { | ||
| 380 | if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) | ||
| 381 | Index: zlib-1.2.3/inflate.c | ||
| 382 | =================================================================== | ||
| 383 | --- zlib-1.2.3.orig/inflate.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 384 | +++ zlib-1.2.3/inflate.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 385 | @@ -100,7 +100,7 @@ | ||
| 386 | local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf, | ||
| 387 | unsigned len)); | ||
| 388 | |||
| 389 | -int ZEXPORT inflateReset(strm) | ||
| 390 | +ZEXPORT int inflateReset(strm) | ||
| 391 | z_streamp strm; | ||
| 392 | { | ||
| 393 | struct inflate_state FAR *state; | ||
| 394 | @@ -142,7 +142,7 @@ | ||
| 395 | return Z_OK; | ||
| 396 | } | ||
| 397 | |||
| 398 | -int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size) | ||
| 399 | +ZEXPORT int inflateInit2_(strm, windowBits, version, stream_size) | ||
| 400 | z_streamp strm; | ||
| 401 | int windowBits; | ||
| 402 | const char *version; | ||
| 403 | @@ -185,7 +185,7 @@ | ||
| 404 | return inflateReset(strm); | ||
| 405 | } | ||
| 406 | |||
| 407 | -int ZEXPORT inflateInit_(strm, version, stream_size) | ||
| 408 | +ZEXPORT int inflateInit_(strm, version, stream_size) | ||
| 409 | z_streamp strm; | ||
| 410 | const char *version; | ||
| 411 | int stream_size; | ||
| 412 | @@ -552,7 +552,7 @@ | ||
| 413 | will return Z_BUF_ERROR if it has not reached the end of the stream. | ||
| 414 | */ | ||
| 415 | |||
| 416 | -int ZEXPORT inflate(strm, flush) | ||
| 417 | +ZEXPORT int inflate(strm, flush) | ||
| 418 | z_streamp strm; | ||
| 419 | int flush; | ||
| 420 | { | ||
| 421 | @@ -1168,7 +1168,7 @@ | ||
| 422 | return ret; | ||
| 423 | } | ||
| 424 | |||
| 425 | -int ZEXPORT inflateEnd(strm) | ||
| 426 | +ZEXPORT int inflateEnd(strm) | ||
| 427 | z_streamp strm; | ||
| 428 | { | ||
| 429 | struct inflate_state FAR *state; | ||
| 430 | @@ -1182,7 +1182,7 @@ | ||
| 431 | return Z_OK; | ||
| 432 | } | ||
| 433 | |||
| 434 | -int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) | ||
| 435 | +ZEXPORT int inflateSetDictionary(strm, dictionary, dictLength) | ||
| 436 | z_streamp strm; | ||
| 437 | const Bytef *dictionary; | ||
| 438 | uInt dictLength; | ||
| 439 | @@ -1275,7 +1275,7 @@ | ||
| 440 | return next; | ||
| 441 | } | ||
| 442 | |||
| 443 | -int ZEXPORT inflateSync(strm) | ||
| 444 | +ZEXPORT int inflateSync(strm) | ||
| 445 | z_streamp strm; | ||
| 446 | { | ||
| 447 | unsigned len; /* number of bytes to look at or looked at */ | ||
| 448 | @@ -1326,7 +1326,7 @@ | ||
| 449 | block. When decompressing, PPP checks that at the end of input packet, | ||
| 450 | inflate is waiting for these length bytes. | ||
| 451 | */ | ||
| 452 | -int ZEXPORT inflateSyncPoint(strm) | ||
| 453 | +ZEXPORT int inflateSyncPoint(strm) | ||
| 454 | z_streamp strm; | ||
| 455 | { | ||
| 456 | struct inflate_state FAR *state; | ||
| 457 | @@ -1336,7 +1336,7 @@ | ||
| 458 | return state->mode == STORED && state->bits == 0; | ||
| 459 | } | ||
| 460 | |||
| 461 | -int ZEXPORT inflateCopy(dest, source) | ||
| 462 | +ZEXPORT int inflateCopy(dest, source) | ||
| 463 | z_streamp dest; | ||
| 464 | z_streamp source; | ||
| 465 | { | ||
| 466 | Index: zlib-1.2.3/uncompr.c | ||
| 467 | =================================================================== | ||
| 468 | --- zlib-1.2.3.orig/uncompr.c 2003-07-07 06:36:56.000000000 +0100 | ||
| 469 | +++ zlib-1.2.3/uncompr.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 470 | @@ -23,7 +23,7 @@ | ||
| 471 | enough memory, Z_BUF_ERROR if there was not enough room in the output | ||
| 472 | buffer, or Z_DATA_ERROR if the input data was corrupted. | ||
| 473 | */ | ||
| 474 | -int ZEXPORT uncompress (dest, destLen, source, sourceLen) | ||
| 475 | +ZEXPORT int uncompress (dest, destLen, source, sourceLen) | ||
| 476 | Bytef *dest; | ||
| 477 | uLongf *destLen; | ||
| 478 | const Bytef *source; | ||
| 479 | Index: zlib-1.2.3/zlib.h | ||
| 480 | =================================================================== | ||
| 481 | --- zlib-1.2.3.orig/zlib.h 2008-08-23 11:17:44.000000000 +0100 | ||
| 482 | +++ zlib-1.2.3/zlib.h 2008-08-23 11:23:26.000000000 +0100 | ||
| 483 | @@ -212,7 +212,7 @@ | ||
| 484 | |||
| 485 | /* basic functions */ | ||
| 486 | |||
| 487 | -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); | ||
| 488 | +ZEXTERN ZEXPORT const char * zlibVersion OF((void)); | ||
| 489 | /* The application can compare zlibVersion and ZLIB_VERSION for consistency. | ||
| 490 | If the first character differs, the library code actually used is | ||
| 491 | not compatible with the zlib.h header file used by the application. | ||
| 492 | @@ -220,7 +220,7 @@ | ||
| 493 | */ | ||
| 494 | |||
| 495 | /* | ||
| 496 | -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); | ||
| 497 | +ZEXTERN ZEXPORT int deflateInit OF((z_streamp strm, int level)); | ||
| 498 | |||
| 499 | Initializes the internal stream state for compression. The fields | ||
| 500 | zalloc, zfree and opaque must be initialized before by the caller. | ||
| 501 | @@ -242,7 +242,7 @@ | ||
| 502 | */ | ||
| 503 | |||
| 504 | |||
| 505 | -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); | ||
| 506 | +ZEXTERN ZEXPORT int deflate OF((z_streamp strm, int flush)); | ||
| 507 | /* | ||
| 508 | deflate compresses as much data as possible, and stops when the input | ||
| 509 | buffer becomes empty or the output buffer becomes full. It may introduce some | ||
| 510 | @@ -328,7 +328,7 @@ | ||
| 511 | */ | ||
| 512 | |||
| 513 | |||
| 514 | -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); | ||
| 515 | +ZEXTERN ZEXPORT int deflateEnd OF((z_streamp strm)); | ||
| 516 | /* | ||
| 517 | All dynamically allocated data structures for this stream are freed. | ||
| 518 | This function discards any unprocessed input and does not flush any | ||
| 519 | @@ -343,7 +343,7 @@ | ||
| 520 | |||
| 521 | |||
| 522 | /* | ||
| 523 | -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); | ||
| 524 | +ZEXTERN ZEXPORT int inflateInit OF((z_streamp strm)); | ||
| 525 | |||
| 526 | Initializes the internal stream state for decompression. The fields | ||
| 527 | next_in, avail_in, zalloc, zfree and opaque must be initialized before by | ||
| 528 | @@ -367,7 +367,7 @@ | ||
| 529 | */ | ||
| 530 | |||
| 531 | |||
| 532 | -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); | ||
| 533 | +ZEXTERN ZEXPORT int inflate OF((z_streamp strm, int flush)); | ||
| 534 | /* | ||
| 535 | inflate decompresses as much data as possible, and stops when the input | ||
| 536 | buffer becomes empty or the output buffer becomes full. It may introduce | ||
| 537 | @@ -466,7 +466,7 @@ | ||
| 538 | */ | ||
| 539 | |||
| 540 | |||
| 541 | -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); | ||
| 542 | +ZEXTERN ZEXPORT int inflateEnd OF((z_streamp strm)); | ||
| 543 | /* | ||
| 544 | All dynamically allocated data structures for this stream are freed. | ||
| 545 | This function discards any unprocessed input and does not flush any | ||
| 546 | @@ -484,7 +484,7 @@ | ||
| 547 | */ | ||
| 548 | |||
| 549 | /* | ||
| 550 | -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, | ||
| 551 | +ZEXTERN ZEXPORT int deflateInit2 OF((z_streamp strm, | ||
| 552 | int level, | ||
| 553 | int method, | ||
| 554 | int windowBits, | ||
| 555 | @@ -542,7 +542,7 @@ | ||
| 556 | not perform any compression: this will be done by deflate(). | ||
| 557 | */ | ||
| 558 | |||
| 559 | -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, | ||
| 560 | +ZEXTERN ZEXPORT int deflateSetDictionary OF((z_streamp strm, | ||
| 561 | const Bytef *dictionary, | ||
| 562 | uInt dictLength)); | ||
| 563 | /* | ||
| 564 | @@ -581,7 +581,7 @@ | ||
| 565 | perform any compression: this will be done by deflate(). | ||
| 566 | */ | ||
| 567 | |||
| 568 | -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, | ||
| 569 | +ZEXTERN ZEXPORT int deflateCopy OF((z_streamp dest, | ||
| 570 | z_streamp source)); | ||
| 571 | /* | ||
| 572 | Sets the destination stream as a complete copy of the source stream. | ||
| 573 | @@ -599,7 +599,7 @@ | ||
| 574 | destination. | ||
| 575 | */ | ||
| 576 | |||
| 577 | -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); | ||
| 578 | +ZEXTERN ZEXPORT int deflateReset OF((z_streamp strm)); | ||
| 579 | /* | ||
| 580 | This function is equivalent to deflateEnd followed by deflateInit, | ||
| 581 | but does not free and reallocate all the internal compression state. | ||
| 582 | @@ -610,7 +610,7 @@ | ||
| 583 | stream state was inconsistent (such as zalloc or state being NULL). | ||
| 584 | */ | ||
| 585 | |||
| 586 | -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, | ||
| 587 | +ZEXTERN ZEXPORT int deflateParams OF((z_streamp strm, | ||
| 588 | int level, | ||
| 589 | int strategy)); | ||
| 590 | /* | ||
| 591 | @@ -648,7 +648,7 @@ | ||
| 592 | returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. | ||
| 593 | */ | ||
| 594 | |||
| 595 | -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, | ||
| 596 | +ZEXTERN ZEXPORT uLong deflateBound OF((z_streamp strm, | ||
| 597 | uLong sourceLen)); | ||
| 598 | /* | ||
| 599 | deflateBound() returns an upper bound on the compressed size after | ||
| 600 | @@ -658,7 +658,7 @@ | ||
| 601 | called before deflate(). | ||
| 602 | */ | ||
| 603 | |||
| 604 | -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, | ||
| 605 | +ZEXTERN ZEXPORT int deflatePrime OF((z_streamp strm, | ||
| 606 | int bits, | ||
| 607 | int value)); | ||
| 608 | /* | ||
| 609 | @@ -699,7 +699,7 @@ | ||
| 610 | */ | ||
| 611 | |||
| 612 | /* | ||
| 613 | -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, | ||
| 614 | +ZEXTERN ZEXPORT int inflateInit2 OF((z_streamp strm, | ||
| 615 | int windowBits)); | ||
| 616 | |||
| 617 | This is another version of inflateInit with an extra parameter. The | ||
| 618 | @@ -745,7 +745,7 @@ | ||
| 619 | that is deferred until inflate() is called. | ||
| 620 | */ | ||
| 621 | |||
| 622 | -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, | ||
| 623 | +ZEXTERN ZEXPORT int inflateSetDictionary OF((z_streamp strm, | ||
| 624 | const Bytef *dictionary, | ||
| 625 | uInt dictLength)); | ||
| 626 | /* | ||
| 627 | @@ -767,7 +767,7 @@ | ||
| 628 | inflate(). | ||
| 629 | */ | ||
| 630 | |||
| 631 | -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); | ||
| 632 | +ZEXTERN ZEXPORT int inflateSync OF((z_streamp strm)); | ||
| 633 | /* | ||
| 634 | Skips invalid compressed data until a full flush point (see above the | ||
| 635 | description of deflate with Z_FULL_FLUSH) can be found, or until all | ||
| 636 | @@ -782,7 +782,7 @@ | ||
| 637 | until success or end of the input data. | ||
| 638 | */ | ||
| 639 | |||
| 640 | -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, | ||
| 641 | +ZEXTERN ZEXPORT int inflateCopy OF((z_streamp dest, | ||
| 642 | z_streamp source)); | ||
| 643 | /* | ||
| 644 | Sets the destination stream as a complete copy of the source stream. | ||
| 645 | @@ -798,7 +798,7 @@ | ||
| 646 | destination. | ||
| 647 | */ | ||
| 648 | |||
| 649 | -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); | ||
| 650 | +ZEXTERN ZEXPORT int inflateReset OF((z_streamp strm)); | ||
| 651 | /* | ||
| 652 | This function is equivalent to inflateEnd followed by inflateInit, | ||
| 653 | but does not free and reallocate all the internal decompression state. | ||
| 654 | @@ -865,7 +865,7 @@ | ||
| 655 | */ | ||
| 656 | |||
| 657 | /* | ||
| 658 | -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, | ||
| 659 | +ZEXTERN ZEXPORT int inflateBackInit OF((z_streamp strm, int windowBits, | ||
| 660 | unsigned char FAR *window)); | ||
| 661 | |||
| 662 | Initialize the internal stream state for decompression using inflateBack() | ||
| 663 | @@ -889,7 +889,7 @@ | ||
| 664 | typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); | ||
| 665 | typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); | ||
| 666 | |||
| 667 | -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, | ||
| 668 | +ZEXTERN ZEXPORT int inflateBack OF((z_streamp strm, | ||
| 669 | in_func in, void FAR *in_desc, | ||
| 670 | out_func out, void FAR *out_desc)); | ||
| 671 | /* | ||
| 672 | @@ -958,7 +958,7 @@ | ||
| 673 | that inflateBack() cannot return Z_OK. | ||
| 674 | */ | ||
| 675 | |||
| 676 | -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); | ||
| 677 | +ZEXTERN ZEXPORT int inflateBackEnd OF((z_streamp strm)); | ||
| 678 | /* | ||
| 679 | All memory allocated by inflateBackInit() is freed. | ||
| 680 | |||
| 681 | @@ -966,7 +966,7 @@ | ||
| 682 | state was inconsistent. | ||
| 683 | */ | ||
| 684 | |||
| 685 | -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); | ||
| 686 | +ZEXTERN ZEXPORT uLong zlibCompileFlags OF((void)); | ||
| 687 | /* Return flags indicating compile-time options. | ||
| 688 | |||
| 689 | Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: | ||
| 690 | @@ -1018,7 +1018,7 @@ | ||
| 691 | utility functions can easily be modified if you need special options. | ||
| 692 | */ | ||
| 693 | |||
| 694 | -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, | ||
| 695 | +ZEXTERN ZEXPORT int compress OF((Bytef *dest, uLongf *destLen, | ||
| 696 | const Bytef *source, uLong sourceLen)); | ||
| 697 | /* | ||
| 698 | Compresses the source buffer into the destination buffer. sourceLen is | ||
| 699 | @@ -1033,7 +1033,7 @@ | ||
| 700 | buffer. | ||
| 701 | */ | ||
| 702 | |||
| 703 | -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, | ||
| 704 | +ZEXTERN ZEXPORT int compress2 OF((Bytef *dest, uLongf *destLen, | ||
| 705 | const Bytef *source, uLong sourceLen, | ||
| 706 | int level)); | ||
| 707 | /* | ||
| 708 | @@ -1049,14 +1049,14 @@ | ||
| 709 | Z_STREAM_ERROR if the level parameter is invalid. | ||
| 710 | */ | ||
| 711 | |||
| 712 | -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); | ||
| 713 | +ZEXTERN ZEXPORT uLong compressBound OF((uLong sourceLen)); | ||
| 714 | /* | ||
| 715 | compressBound() returns an upper bound on the compressed size after | ||
| 716 | compress() or compress2() on sourceLen bytes. It would be used before | ||
| 717 | a compress() or compress2() call to allocate the destination buffer. | ||
| 718 | */ | ||
| 719 | |||
| 720 | -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, | ||
| 721 | +ZEXTERN ZEXPORT int uncompress OF((Bytef *dest, uLongf *destLen, | ||
| 722 | const Bytef *source, uLong sourceLen)); | ||
| 723 | /* | ||
| 724 | Decompresses the source buffer into the destination buffer. sourceLen is | ||
| 725 | @@ -1095,7 +1095,7 @@ | ||
| 726 | can be checked to distinguish the two cases (if errno is zero, the | ||
| 727 | zlib error is Z_MEM_ERROR). */ | ||
| 728 | |||
| 729 | -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); | ||
| 730 | +ZEXTERN ZEXPORT gzFile gzdopen OF((int fd, const char *mode)); | ||
| 731 | /* | ||
| 732 | gzdopen() associates a gzFile with the file descriptor fd. File | ||
| 733 | descriptors are obtained from calls like open, dup, creat, pipe or | ||
| 734 | @@ -1108,7 +1108,7 @@ | ||
| 735 | the (de)compression state. | ||
| 736 | */ | ||
| 737 | |||
| 738 | -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); | ||
| 739 | +ZEXTERN ZEXPORT int gzsetparams OF((gzFile file, int level, int strategy)); | ||
| 740 | /* | ||
| 741 | Dynamically update the compression level or strategy. See the description | ||
| 742 | of deflateInit2 for the meaning of these parameters. | ||
| 743 | @@ -1116,7 +1116,7 @@ | ||
| 744 | opened for writing. | ||
| 745 | */ | ||
| 746 | |||
| 747 | -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); | ||
| 748 | +ZEXTERN ZEXPORT int gzread OF((gzFile file, voidp buf, unsigned len)); | ||
| 749 | /* | ||
| 750 | Reads the given number of uncompressed bytes from the compressed file. | ||
| 751 | If the input file was not in gzip format, gzread copies the given number | ||
| 752 | @@ -1124,7 +1124,7 @@ | ||
| 753 | gzread returns the number of uncompressed bytes actually read (0 for | ||
| 754 | end of file, -1 for error). */ | ||
| 755 | |||
| 756 | -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, | ||
| 757 | +ZEXTERN ZEXPORT int gzwrite OF((gzFile file, | ||
| 758 | voidpc buf, unsigned len)); | ||
| 759 | /* | ||
| 760 | Writes the given number of uncompressed bytes into the compressed file. | ||
| 761 | @@ -1132,7 +1132,7 @@ | ||
| 762 | (0 in case of error). | ||
| 763 | */ | ||
| 764 | |||
| 765 | -ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); | ||
| 766 | +ZEXTERN ZEXPORTVA int gzprintf OF((gzFile file, const char *format, ...)); | ||
| 767 | /* | ||
| 768 | Converts, formats, and writes the args to the compressed file under | ||
| 769 | control of the format string, as in fprintf. gzprintf returns the number of | ||
| 770 | @@ -1145,14 +1145,14 @@ | ||
| 771 | because the secure snprintf() or vsnprintf() functions were not available. | ||
| 772 | */ | ||
| 773 | |||
| 774 | -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); | ||
| 775 | +ZEXTERN ZEXPORT int gzputs OF((gzFile file, const char *s)); | ||
| 776 | /* | ||
| 777 | Writes the given null-terminated string to the compressed file, excluding | ||
| 778 | the terminating null character. | ||
| 779 | gzputs returns the number of characters written, or -1 in case of error. | ||
| 780 | */ | ||
| 781 | |||
| 782 | -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); | ||
| 783 | +ZEXTERN ZEXPORT char * gzgets OF((gzFile file, char *buf, int len)); | ||
| 784 | /* | ||
| 785 | Reads bytes from the compressed file until len-1 characters are read, or | ||
| 786 | a newline character is read and transferred to buf, or an end-of-file | ||
| 787 | @@ -1161,19 +1161,19 @@ | ||
| 788 | gzgets returns buf, or Z_NULL in case of error. | ||
| 789 | */ | ||
| 790 | |||
| 791 | -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); | ||
| 792 | +ZEXTERN ZEXPORT int gzputc OF((gzFile file, int c)); | ||
| 793 | /* | ||
| 794 | Writes c, converted to an unsigned char, into the compressed file. | ||
| 795 | gzputc returns the value that was written, or -1 in case of error. | ||
| 796 | */ | ||
| 797 | |||
| 798 | -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); | ||
| 799 | +ZEXTERN ZEXPORT int gzgetc OF((gzFile file)); | ||
| 800 | /* | ||
| 801 | Reads one byte from the compressed file. gzgetc returns this byte | ||
| 802 | or -1 in case of end of file or error. | ||
| 803 | */ | ||
| 804 | |||
| 805 | -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); | ||
| 806 | +ZEXTERN ZEXPORT int gzungetc OF((int c, gzFile file)); | ||
| 807 | /* | ||
| 808 | Push one character back onto the stream to be read again later. | ||
| 809 | Only one character of push-back is allowed. gzungetc() returns the | ||
| 810 | @@ -1183,7 +1183,7 @@ | ||
| 811 | or gzrewind(). | ||
| 812 | */ | ||
| 813 | |||
| 814 | -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); | ||
| 815 | +ZEXTERN ZEXPORT int gzflush OF((gzFile file, int flush)); | ||
| 816 | /* | ||
| 817 | Flushes all pending output into the compressed file. The parameter | ||
| 818 | flush is as in the deflate() function. The return value is the zlib | ||
| 819 | @@ -1212,7 +1212,7 @@ | ||
| 820 | would be before the current position. | ||
| 821 | */ | ||
| 822 | |||
| 823 | -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); | ||
| 824 | +ZEXTERN ZEXPORT int gzrewind OF((gzFile file)); | ||
| 825 | /* | ||
| 826 | Rewinds the given file. This function is supported only for reading. | ||
| 827 | |||
| 828 | @@ -1229,19 +1229,19 @@ | ||
| 829 | gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) | ||
| 830 | */ | ||
| 831 | |||
| 832 | -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); | ||
| 833 | +ZEXTERN ZEXPORT int gzeof OF((gzFile file)); | ||
| 834 | /* | ||
| 835 | Returns 1 when EOF has previously been detected reading the given | ||
| 836 | input stream, otherwise zero. | ||
| 837 | */ | ||
| 838 | |||
| 839 | -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); | ||
| 840 | +ZEXTERN ZEXPORT int gzdirect OF((gzFile file)); | ||
| 841 | /* | ||
| 842 | Returns 1 if file is being read directly without decompression, otherwise | ||
| 843 | zero. | ||
| 844 | */ | ||
| 845 | |||
| 846 | -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); | ||
| 847 | +ZEXTERN ZEXPORT int gzclose OF((gzFile file)); | ||
| 848 | /* | ||
| 849 | Flushes all pending output if necessary, closes the compressed file | ||
| 850 | and deallocates all the (de)compression state. The return value is the zlib | ||
| 851 | @@ -1249,7 +1249,7 @@ | ||
| 852 | file, since its structures have been deallocated. | ||
| 853 | */ | ||
| 854 | |||
| 855 | -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); | ||
| 856 | +ZEXTERN ZEXPORT const char * gzerror OF((gzFile file, int *errnum)); | ||
| 857 | /* | ||
| 858 | Returns the error message for the last error which occurred on the | ||
| 859 | given compressed file. errnum is set to zlib error number. If an | ||
| 860 | @@ -1261,7 +1261,7 @@ | ||
| 861 | this function may invalidate the returned string. | ||
| 862 | */ | ||
| 863 | |||
| 864 | -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); | ||
| 865 | +ZEXTERN ZEXPORT void gzclearerr OF((gzFile file)); | ||
| 866 | /* | ||
| 867 | Clears the error and end-of-file flags for file. This is analogous to the | ||
| 868 | clearerr() function in stdio. This is useful for continuing to read a gzip | ||
| 869 | @@ -1276,7 +1276,7 @@ | ||
| 870 | compression library. | ||
| 871 | */ | ||
| 872 | |||
| 873 | -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); | ||
| 874 | +ZEXTERN ZEXPORT uLong adler32 OF((uLong adler, const Bytef *buf, uInt len)); | ||
| 875 | /* | ||
| 876 | Update a running Adler-32 checksum with the bytes buf[0..len-1] and | ||
| 877 | return the updated checksum. If buf is NULL, this function returns | ||
| 878 | @@ -1302,7 +1302,7 @@ | ||
| 879 | seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. | ||
| 880 | */ | ||
| 881 | |||
| 882 | -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); | ||
| 883 | +ZEXTERN ZEXPORT uLong crc32 OF((uLong crc, const Bytef *buf, uInt len)); | ||
| 884 | /* | ||
| 885 | Update a running CRC-32 with the bytes buf[0..len-1] and return the | ||
| 886 | updated CRC-32. If buf is NULL, this function returns the required initial | ||
| 887 | @@ -1334,17 +1334,17 @@ | ||
| 888 | /* deflateInit and inflateInit are macros to allow checking the zlib version | ||
| 889 | * and the compiler's view of z_stream: | ||
| 890 | */ | ||
| 891 | -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, | ||
| 892 | +ZEXTERN ZEXPORT int deflateInit_ OF((z_streamp strm, int level, | ||
| 893 | const char *version, int stream_size)); | ||
| 894 | -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, | ||
| 895 | +ZEXTERN ZEXPORT int inflateInit_ OF((z_streamp strm, | ||
| 896 | const char *version, int stream_size)); | ||
| 897 | -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, | ||
| 898 | +ZEXTERN ZEXPORT int deflateInit2_ OF((z_streamp strm, int level, int method, | ||
| 899 | int windowBits, int memLevel, | ||
| 900 | int strategy, const char *version, | ||
| 901 | int stream_size)); | ||
| 902 | -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, | ||
| 903 | +ZEXTERN ZEXPORT int inflateInit2_ OF((z_streamp strm, int windowBits, | ||
| 904 | const char *version, int stream_size)); | ||
| 905 | -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, | ||
| 906 | +ZEXTERN ZEXPORT int inflateBackInit_ OF((z_streamp strm, int windowBits, | ||
| 907 | unsigned char FAR *window, | ||
| 908 | const char *version, | ||
| 909 | int stream_size)); | ||
| 910 | @@ -1362,11 +1362,11 @@ | ||
| 911 | ZLIB_VERSION, sizeof(z_stream)) | ||
| 912 | |||
| 913 | #ifdef _LARGEFILE64_SOURCE | ||
| 914 | - ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); | ||
| 915 | - ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); | ||
| 916 | - ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); | ||
| 917 | - ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t)); | ||
| 918 | - ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); | ||
| 919 | + ZEXTERN ZEXPORT gzFile gzopen64 OF((const char *, const char *)); | ||
| 920 | + ZEXTERN ZEXPORT off64_t gzseek64 OF((gzFile, off64_t, int)); | ||
| 921 | + ZEXTERN ZEXPORT off64_t gztell64 OF((gzFile)); | ||
| 922 | + ZEXTERN ZEXPORT uLong adler32_combine64 OF((uLong, uLong, off64_t)); | ||
| 923 | + ZEXTERN ZEXPORT uLong crc32_combine64 OF((uLong, uLong, off64_t)); | ||
| 924 | #endif | ||
| 925 | |||
| 926 | #if _FILE_OFFSET_BITS == 64 | ||
| 927 | @@ -1376,21 +1376,21 @@ | ||
| 928 | # define adler32_combine adler32_combine64 | ||
| 929 | # define crc32_combine crc32_combine64 | ||
| 930 | #else | ||
| 931 | - ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); | ||
| 932 | - ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); | ||
| 933 | - ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); | ||
| 934 | - ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); | ||
| 935 | - ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); | ||
| 936 | + ZEXTERN ZEXPORT gzFile gzopen OF((const char *, const char *)); | ||
| 937 | + ZEXTERN ZEXPORT z_off_t gzseek OF((gzFile, z_off_t, int)); | ||
| 938 | + ZEXTERN ZEXPORT z_off_t gztell OF((gzFile)); | ||
| 939 | + ZEXTERN ZEXPORT uLong adler32_combine OF((uLong, uLong, z_off_t)); | ||
| 940 | + ZEXTERN ZEXPORT uLong crc32_combine OF((uLong, uLong, z_off_t)); | ||
| 941 | #endif | ||
| 942 | |||
| 943 | #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) | ||
| 944 | struct internal_state {int dummy;}; /* hack for buggy compilers */ | ||
| 945 | #endif | ||
| 946 | |||
| 947 | -ZEXTERN const char * ZEXPORT zError OF((int)); | ||
| 948 | -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); | ||
| 949 | -ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); | ||
| 950 | -ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); | ||
| 951 | +ZEXTERN ZEXPORT const char * zError OF((int)); | ||
| 952 | +ZEXTERN ZEXPORT int inflateSyncPoint OF((z_streamp)); | ||
| 953 | +ZEXTERN ZEXPORT const uLongf * get_crc_table OF((void)); | ||
| 954 | +ZEXTERN ZEXPORT int inflateUndermine OF((z_streamp, int)); | ||
| 955 | |||
| 956 | #ifdef __cplusplus | ||
| 957 | } | ||
| 958 | Index: zlib-1.2.3/zutil.c | ||
| 959 | =================================================================== | ||
| 960 | --- zlib-1.2.3.orig/zutil.c 2005-06-13 01:37:49.000000000 +0100 | ||
| 961 | +++ zlib-1.2.3/zutil.c 2008-08-23 11:17:44.000000000 +0100 | ||
| 962 | @@ -24,12 +24,12 @@ | ||
| 963 | ""}; | ||
| 964 | |||
| 965 | |||
| 966 | -const char * ZEXPORT zlibVersion() | ||
| 967 | +ZEXPORT const char * zlibVersion() | ||
| 968 | { | ||
| 969 | return ZLIB_VERSION; | ||
| 970 | } | ||
| 971 | |||
| 972 | -uLong ZEXPORT zlibCompileFlags() | ||
| 973 | +ZEXPORT uLong zlibCompileFlags() | ||
| 974 | { | ||
| 975 | uLong flags; | ||
| 976 | |||
| 977 | @@ -130,7 +130,7 @@ | ||
| 978 | /* exported to allow conversion of error code to string for compress() and | ||
| 979 | * uncompress() | ||
| 980 | */ | ||
| 981 | -const char * ZEXPORT zError(err) | ||
| 982 | +ZEXPORT const char * zError(err) | ||
| 983 | int err; | ||
| 984 | { | ||
| 985 | return ERR_MSG(err); | ||
diff --git a/meta/packages/zlib/zlib_1.2.3.bb b/meta/packages/zlib/zlib_1.2.3.bb deleted file mode 100644 index c58d5f2d25..0000000000 --- a/meta/packages/zlib/zlib_1.2.3.bb +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | DESCRIPTION = "Zlib Compression Library" | ||
| 2 | SECTION = "libs" | ||
| 3 | PRIORITY = "required" | ||
| 4 | HOMEPAGE = "http://www.gzip.org/zlib/" | ||
| 5 | LICENSE = "zlib" | ||
| 6 | LIC_FILES_CHKSUM = "file://README;md5=ae764cfda68da96df20af9fbf9fe49bd \ | ||
| 7 | file://zlib.h;beginline=1;endline=30;md5=6ab03f03a5ee92d06b809797d4d5586d " | ||
| 8 | PR = "r7" | ||
| 9 | |||
| 10 | SRC_URI = "http://www.zlib.net/zlib-1.2.3.tar.bz2 \ | ||
| 11 | file://1.2.3.3.dfsg.patch.gz;patch=1 \ | ||
| 12 | file://visibility.patch;patch=1 \ | ||
| 13 | file://autotools.patch;patch=1 " | ||
| 14 | |||
| 15 | DEPENDS = "libtool-cross" | ||
| 16 | |||
| 17 | inherit autotools | ||
| 18 | |||
| 19 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/packages/zlib/zlib_1.2.5.bb b/meta/packages/zlib/zlib_1.2.5.bb new file mode 100644 index 0000000000..e6db69e3a6 --- /dev/null +++ b/meta/packages/zlib/zlib_1.2.5.bb | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | DESCRIPTION = "Zlib Compression Library" | ||
| 2 | HOMEPAGE = "http://zlib.net/" | ||
| 3 | SECTION = "libs" | ||
| 4 | PRIORITY = "required" | ||
| 5 | LICENSE = "zlib" | ||
| 6 | LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=084e9c30e4e6272c3b057b13c6467f3d" | ||
| 7 | |||
| 8 | DEPENDS = "libtool-cross" | ||
| 9 | PR = "r0" | ||
| 10 | |||
| 11 | SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.bz2 \ | ||
| 12 | file://configure.ac \ | ||
| 13 | file://Makefile.am" | ||
| 14 | |||
| 15 | inherit autotools | ||
| 16 | |||
| 17 | do_configure_prepend () { | ||
| 18 | cp ${WORKDIR}/configure.ac ${S}/ | ||
| 19 | cp ${WORKDIR}/Makefile.am ${S}/ | ||
| 20 | } | ||
| 21 | |||
| 22 | BBCLASSEXTEND = "native nativesdk" | ||
