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