blob: 1c59beca0aada19a6403b82249b9e8fc8f6ac296 [file] [log] [blame]
hbono@chromium.orge344b232012-01-10 10:15:42 +00001diff -ru zlib-1.2.5/mozzconf.h zlib/mozzconf.h
2--- zlib-1.2.5/mozzconf.h 2011-12-15 18:10:49.000000000 +0800
3+++ zlib/mozzconf.h 2011-12-16 16:08:00.000000000 +0800
4@@ -0,0 +1,168 @@
5+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
6+/* ***** BEGIN LICENSE BLOCK *****
7+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
8+ *
9+ * The contents of this file are subject to the Mozilla Public License Version
10+ * 1.1 (the "License"); you may not use this file except in compliance with
11+ * the License. You may obtain a copy of the License at
12+ * http://www.mozilla.org/MPL/
13+ *
14+ * Software distributed under the License is distributed on an "AS IS" basis,
15+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
16+ * for the specific language governing rights and limitations under the
17+ * License.
18+ *
19+ * The Original Code is the mozilla zlib configuration.
20+ *
21+ * The Initial Developer of the Original Code is IBM Corporation.
22+ * Portions created by the Initial Developer are Copyright (C) 2004
23+ * the Initial Developer. All Rights Reserved.
24+ *
25+ * Contributor(s):
26+ *
27+ * Alternatively, the contents of this file may be used under the terms of
28+ * either of the GNU General Public License Version 2 or later (the "GPL"),
29+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30+ * in which case the provisions of the GPL or the LGPL are applicable instead
31+ * of those above. If you wish to allow use of your version of this file only
32+ * under the terms of either the GPL or the LGPL, and not to allow others to
33+ * use your version of this file under the terms of the MPL, indicate your
34+ * decision by deleting the provisions above and replace them with the notice
35+ * and other provisions required by the GPL or the LGPL. If you do not delete
36+ * the provisions above, a recipient may use your version of this file under
37+ * the terms of any one of the MPL, the GPL or the LGPL.
38+ *
39+ * ***** END LICENSE BLOCK ***** */
40+
41+#ifndef MOZZCONF_H
42+#define MOZZCONF_H
43+
44+#if defined(XP_WIN) && defined(ZLIB_DLL) && !defined(MOZ_ENABLE_LIBXUL)
45+#undef ZLIB_DLL
46+#endif
47+
48+#ifdef HAVE_VISIBILITY_ATTRIBUTE
49+#define ZEXTERN __attribute__((visibility ("default"))) extern
50+#endif
51+
52+/* Exported Symbols */
53+#define zlibVersion MOZ_Z_zlibVersion
54+#define deflate MOZ_Z_deflate
55+#define deflateEnd MOZ_Z_deflateEnd
56+#define inflate MOZ_Z_inflate
57+#define inflateEnd MOZ_Z_inflateEnd
58+#define deflateSetDictionary MOZ_Z_deflateSetDictionary
59+#define deflateCopy MOZ_Z_deflateCopy
60+#define deflateReset MOZ_Z_deflateReset
61+#define deflateParams MOZ_Z_deflateParams
62+#define deflateBound MOZ_Z_deflateBound
63+#define deflatePrime MOZ_Z_deflatePrime
64+#define inflateSetDictionary MOZ_Z_inflateSetDictionary
65+#define inflateSync MOZ_Z_inflateSync
66+#define inflateCopy MOZ_Z_inflateCopy
67+#define inflateReset MOZ_Z_inflateReset
68+#define inflateBack MOZ_Z_inflateBack
69+#define inflateBackEnd MOZ_Z_inflateBackEnd
70+#define zlibCompileFlags MOZ_Z_zlibCompileFlags
71+#define compress MOZ_Z_compress
72+#define compress2 MOZ_Z_compress2
73+#define compressBound MOZ_Z_compressBound
74+#define uncompress MOZ_Z_uncompress
75+#define gzopen MOZ_Z_gzopen
76+#define gzdopen MOZ_Z_gzdopen
77+#define gzsetparams MOZ_Z_gzsetparams
78+#define gzread MOZ_Z_gzread
79+#define gzwrite MOZ_Z_gzwrite
80+#define gzprintf MOZ_Z_gzprintf
81+#define gzputs MOZ_Z_gzputs
82+#define gzgets MOZ_Z_gzgets
83+#define gzputc MOZ_Z_gzputc
84+#define gzgetc MOZ_Z_gzgetc
85+#define gzungetc MOZ_Z_gzungetc
86+#define gzflush MOZ_Z_gzflush
87+#define gzseek MOZ_Z_gzseek
88+#define gzrewind MOZ_Z_gzrewind
89+#define gztell MOZ_Z_gztell
90+#define gzeof MOZ_Z_gzeof
91+#define gzclose MOZ_Z_gzclose
92+#define gzerror MOZ_Z_gzerror
93+#define gzclearerr MOZ_Z_gzclearerr
94+#define adler32 MOZ_Z_adler32
95+#define crc32 MOZ_Z_crc32
96+#define deflateInit_ MOZ_Z_deflateInit_
97+#define deflateInit2_ MOZ_Z_deflateInit2_
98+#define inflateInit_ MOZ_Z_inflateInit_
99+#define inflateInit2_ MOZ_Z_inflateInit2_
100+#define inflateBackInit_ MOZ_Z_inflateBackInit_
101+#define inflateSyncPoint MOZ_Z_inflateSyncPoint
102+#define get_crc_table MOZ_Z_get_crc_table
103+#define zError MOZ_Z_zError
104+
105+/* Extra global symbols */
106+#define _dist_code MOZ_Z__dist_code
107+#define _length_code MOZ_Z__length_code
108+#define _tr_align MOZ_Z__tr_align
109+#define _tr_flush_block MOZ_Z__tr_flush_block
110+#define _tr_init MOZ_Z__tr_init
111+#define _tr_stored_block MOZ_Z__tr_stored_block
112+#define _tr_tally MOZ_Z__tr_tally
113+#define deflate_copyright MOZ_Z_deflate_copyright
114+#define inflate_copyright MOZ_Z_inflate_copyright
115+#define inflate_fast MOZ_Z_inflate_fast
116+#define inflate_table MOZ_Z_inflate_table
117+#define z_errmsg MOZ_Z_z_errmsg
118+#define zcalloc MOZ_Z_zcalloc
119+#define zcfree MOZ_Z_zcfree
120+#define alloc_func MOZ_Z_alloc_func
121+#define free_func MOZ_Z_free_func
122+#define in_func MOZ_Z_in_func
123+#define out_func MOZ_Z_out_func
124+
125+/* New as of libpng-1.2.3 */
126+#define adler32_combine MOZ_Z_adler32_combine
127+#define crc32_combine MOZ_Z_crc32_combine
128+#define deflateSetHeader MOZ_Z_deflateSetHeader
129+#define deflateTune MOZ_Z_deflateTune
130+#define gzdirect MOZ_Z_gzdirect
131+#define inflatePrime MOZ_Z_inflatePrime
132+#define inflateGetHeader MOZ_Z_inflateGetHeader
133+
134+/* New as of zlib 1.2.5 */
135+#define gzoffset MOZ_Z_gzoffset
136+#define gzopen64 MOZ_Z_gzopen64
137+#define gzseek64 MOZ_Z_gzseek64
138+#define gztell64 MOZ_Z_gztell64
139+#define gzoffset64 MOZ_Z_gzoffset64
140+#define adler32_combine64 MOZ_Z_adler32_combine64
141+#define crc32_combine64 MOZ_Z_crc32_combine64
142+#define gz_error MOZ_Z_gz_error
143+#define gz_intmax MOZ_Z_gz_intmax
144+#define gz_strwinerror MOZ_Z_gz_strwinerror
145+#define gzbuffer MOZ_Z_gzbuffer
146+#define gzclose_r MOZ_Z_gzclose_r
147+#define gzclose_w MOZ_Z_gzclose_w
148+#define inflateMark MOZ_Z_inflateMark
149+#define inflateReset2 MOZ_Z_inflateReset2
150+#define inflateUndermine MOZ_Z_inflateUndermine
151+#define charf MOZ_Z_charf
152+#define gzFile MOZ_Z_gzFile
153+#define gz_header MOZ_Z_gz_header
154+#define gz_headerp MOZ_Z_gz_headerp
155+#define intf MOZ_Z_intf
156+#define uInt MOZ_Z_uInt
157+#define uIntf MOZ_Z_uIntf
158+#define uLong MOZ_Z_uLong
159+#define uLongf MOZ_Z_uLongf
160+#define voidp MOZ_Z_voidp
161+#define voidpc MOZ_Z_voidpc
162+#define voidpf MOZ_Z_voidpf
163+#define gz_header_s MOZ_Z_gz_header_s
164+#define internal_state MOZ_Z_internal_state
165+
166+/* Mangle Byte types except on Mac. */
167+#if !defined(__MACTYPES__)
168+#define Byte MOZ_Z_Byte
169+#define Bytef MOZ_Z_Bytef
170+#endif
171+
172+#endif
173diff -ru zlib-1.2.5/zconf.h zlib/zconf.h
174--- zlib-1.2.5/zconf.h 2010-04-19 01:58:06.000000000 +0800
175+++ zlib/zconf.h 2011-12-14 08:06:37.000000000 +0800
176@@ -8,6 +8,9 @@
177 #ifndef ZCONF_H
178 #define ZCONF_H
179
180+/* This include does prefixing as below, but with an updated set of names */
181+#include "mozzconf.h"
182+
183 /*
184 * If you *really* need a unique prefix for all types and library functions,
185 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
186diff -ru zlib-1.2.5/zlib.h zlib/zlib.h
187--- zlib-1.2.5/zlib.h 2010-04-20 12:12:48.000000000 +0800
188+++ zlib/zlib.h 2011-12-16 16:08:48.000000000 +0800
189@@ -1572,12 +1572,14 @@
190 #endif
191
192 #if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
193-# define gzopen gzopen64
194-# define gzseek gzseek64
195-# define gztell gztell64
196-# define gzoffset gzoffset64
197-# define adler32_combine adler32_combine64
198-# define crc32_combine crc32_combine64
199+# if !defined(MOZZCONF_H)
200+# define gzopen gzopen64
201+# define gzseek gzseek64
202+# define gztell gztell64
203+# define gzoffset gzoffset64
204+# define adler32_combine adler32_combine64
205+# define crc32_combine crc32_combine64
206+# endif
207 # ifdef _LARGEFILE64_SOURCE
208 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
209 ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));