OLD | NEW |
1 diff --git a/third_party/zlib/contrib/minizip/ioapi.h b/third_party/zlib/contrib
/minizip/ioapi.h | 1 diff --git a/contrib/minizip/ioapi.h b/contrib/minizip/ioapi.h |
2 index 8dcbdb0..c1b7a54 100644 | 2 index 8dcbdb06e35a..c1b7a54847f5 100644 |
3 --- a/third_party/zlib/contrib/minizip/ioapi.h | 3 --- a/contrib/minizip/ioapi.h |
4 +++ b/third_party/zlib/contrib/minizip/ioapi.h | 4 +++ b/contrib/minizip/ioapi.h |
5 @@ -43,7 +43,7 @@ | 5 @@ -43,7 +43,7 @@ |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 -#include "zlib.h" | 9 -#include "zlib.h" |
10 +#include "third_party/zlib/zlib.h" | 10 +#include "third_party/zlib/zlib.h" |
11 | 11 |
12 #if defined(USE_FILE32API) | 12 #if defined(USE_FILE32API) |
13 #define fopen64 fopen | 13 #define fopen64 fopen |
14 diff --git a/third_party/zlib/contrib/minizip/mztools.c b/third_party/zlib/contr
ib/minizip/mztools.c | 14 diff --git a/contrib/minizip/iowin32.c b/contrib/minizip/iowin32.c |
15 index 96891c2..8bf9cca 100644 | 15 index 274f39eb1dd2..246ceb91a139 100644 |
16 --- a/third_party/zlib/contrib/minizip/mztools.c | 16 --- a/contrib/minizip/iowin32.c |
17 +++ b/third_party/zlib/contrib/minizip/mztools.c | 17 +++ b/contrib/minizip/iowin32.c |
| 18 @@ -26,12 +26,19 @@ |
| 19 #endif |
| 20 |
| 21 |
| 22 +#ifdef _WIN32_WINNT |
| 23 +#undef _WIN32_WINNT |
| 24 +#define _WIN32_WINNT 0x601 |
| 25 +#endif |
| 26 + |
| 27 +#if _WIN32_WINNT >= _WIN32_WINNT_WIN8 |
| 28 // see Include/shared/winapifamily.h in the Windows Kit |
| 29 #if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API))) |
| 30 #if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP) |
| 31 #define IOWIN32_USING_WINRT_API 1 |
| 32 #endif |
| 33 #endif |
| 34 +#endif |
| 35 |
| 36 voidpf ZCALLBACK win32_open_file_func OF((voidpf opaque, const char* filename
, int mode)); |
| 37 uLong ZCALLBACK win32_read_file_func OF((voidpf opaque, voidpf stream, void*
buf, uLong size)); |
| 38 diff --git a/contrib/minizip/mztools.c b/contrib/minizip/mztools.c |
| 39 index 96891c2e0b71..8bf9cca32633 100644 |
| 40 --- a/contrib/minizip/mztools.c |
| 41 +++ b/contrib/minizip/mztools.c |
18 @@ -8,7 +8,7 @@ | 42 @@ -8,7 +8,7 @@ |
19 #include <stdio.h> | 43 #include <stdio.h> |
20 #include <stdlib.h> | 44 #include <stdlib.h> |
21 #include <string.h> | 45 #include <string.h> |
22 -#include "zlib.h" | 46 -#include "zlib.h" |
23 +#include "third_party/zlib/zlib.h" | 47 +#include "third_party/zlib/zlib.h" |
24 #include "unzip.h" | 48 #include "unzip.h" |
25 | 49 |
26 #define READ_8(adr) ((unsigned char)*(adr)) | 50 #define READ_8(adr) ((unsigned char)*(adr)) |
27 diff --git a/third_party/zlib/contrib/minizip/mztools.h b/third_party/zlib/contr
ib/minizip/mztools.h | 51 diff --git a/contrib/minizip/mztools.h b/contrib/minizip/mztools.h |
28 index a49a426..f295ffe 100644 | 52 index a49a426ec2fc..f295ffeda6af 100644 |
29 --- a/third_party/zlib/contrib/minizip/mztools.h | 53 --- a/contrib/minizip/mztools.h |
30 +++ b/third_party/zlib/contrib/minizip/mztools.h | 54 +++ b/contrib/minizip/mztools.h |
31 @@ -12,7 +12,7 @@ extern "C" { | 55 @@ -12,7 +12,7 @@ extern "C" { |
32 #endif | 56 #endif |
33 | 57 |
34 #ifndef _ZLIB_H | 58 #ifndef _ZLIB_H |
35 -#include "zlib.h" | 59 -#include "zlib.h" |
36 +#include "third_party/zlib/zlib.h" | 60 +#include "third_party/zlib/zlib.h" |
37 #endif | 61 #endif |
38 | 62 |
39 #include "unzip.h" | 63 #include "unzip.h" |
40 diff --git a/third_party/zlib/contrib/minizip/unzip.c b/third_party/zlib/contrib
/minizip/unzip.c | 64 diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c |
41 index 9093504..2d5f0b1 100644 | 65 index bcfb9416ec35..199b4723fcfc 100644 |
42 --- a/third_party/zlib/contrib/minizip/unzip.c | 66 --- a/contrib/minizip/unzip.c |
43 +++ b/third_party/zlib/contrib/minizip/unzip.c | 67 +++ b/contrib/minizip/unzip.c |
44 @@ -72,7 +72,7 @@ | 68 @@ -72,7 +72,7 @@ |
45 #define NOUNCRYPT | 69 #define NOUNCRYPT |
46 #endif | 70 #endif |
47 | 71 |
48 -#include "zlib.h" | 72 -#include "zlib.h" |
49 +#include "third_party/zlib/zlib.h" | 73 +#include "third_party/zlib/zlib.h" |
50 #include "unzip.h" | 74 #include "unzip.h" |
51 | 75 |
52 #ifdef STDC | 76 #ifdef STDC |
53 @@ -1705,11 +1705,6 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voi
dp buf, unsigned len) | 77 @@ -1705,11 +1705,6 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voi
dp buf, unsigned len) |
54 | 78 |
55 pfile_in_zip_read_info->stream.avail_out = (uInt)len; | 79 pfile_in_zip_read_info->stream.avail_out = (uInt)len; |
56 | 80 |
57 - if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && | 81 - if ((len>pfile_in_zip_read_info->rest_read_uncompressed) && |
58 - (!(pfile_in_zip_read_info->raw))) | 82 - (!(pfile_in_zip_read_info->raw))) |
59 - pfile_in_zip_read_info->stream.avail_out = | 83 - pfile_in_zip_read_info->stream.avail_out = |
60 - (uInt)pfile_in_zip_read_info->rest_read_uncompressed; | 84 - (uInt)pfile_in_zip_read_info->rest_read_uncompressed; |
61 - | 85 - |
62 if ((len>pfile_in_zip_read_info->rest_read_compressed+ | 86 if ((len>pfile_in_zip_read_info->rest_read_compressed+ |
63 pfile_in_zip_read_info->stream.avail_in) && | 87 pfile_in_zip_read_info->stream.avail_in) && |
64 (pfile_in_zip_read_info->raw)) | 88 (pfile_in_zip_read_info->raw)) |
65 diff --git a/third_party/zlib/contrib/minizip/unzip.h b/third_party/zlib/contrib
/minizip/unzip.h | 89 diff --git a/contrib/minizip/unzip.h b/contrib/minizip/unzip.h |
66 index 2104e39..3c01435 100644 | 90 index 2104e3915074..3c0143529b91 100644 |
67 --- a/third_party/zlib/contrib/minizip/unzip.h | 91 --- a/contrib/minizip/unzip.h |
68 +++ b/third_party/zlib/contrib/minizip/unzip.h | 92 +++ b/contrib/minizip/unzip.h |
69 @@ -48,7 +48,7 @@ extern "C" { | 93 @@ -48,7 +48,7 @@ extern "C" { |
70 #endif | 94 #endif |
71 | 95 |
72 #ifndef _ZLIB_H | 96 #ifndef _ZLIB_H |
73 -#include "zlib.h" | 97 -#include "zlib.h" |
74 +#include "third_party/zlib/zlib.h" | 98 +#include "third_party/zlib/zlib.h" |
75 #endif | 99 #endif |
76 | 100 |
77 #ifndef _ZLIBIOAPI_H | 101 #ifndef _ZLIBIOAPI_H |
78 diff --git a/third_party/zlib/contrib/minizip/zip.c b/third_party/zlib/contrib/m
inizip/zip.c | 102 diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c |
79 index ea54853..aaf6961 100644 | 103 index 44e88a9cb989..65c0c7251843 100644 |
80 --- a/third_party/zlib/contrib/minizip/zip.c | 104 --- a/contrib/minizip/zip.c |
81 +++ b/third_party/zlib/contrib/minizip/zip.c | 105 +++ b/contrib/minizip/zip.c |
82 @@ -26,7 +26,7 @@ | 106 @@ -26,7 +26,7 @@ |
83 #include <stdlib.h> | 107 #include <stdlib.h> |
84 #include <string.h> | 108 #include <string.h> |
85 #include <time.h> | 109 #include <time.h> |
86 -#include "zlib.h" | 110 -#include "zlib.h" |
87 +#include "third_party/zlib/zlib.h" | 111 +#include "third_party/zlib/zlib.h" |
88 #include "zip.h" | 112 #include "zip.h" |
89 | 113 |
90 #ifdef STDC | 114 #ifdef STDC |
91 diff --git a/third_party/zlib/contrib/minizip/zip.h b/third_party/zlib/contrib/m
inizip/zip.h | 115 diff --git a/contrib/minizip/zip.h b/contrib/minizip/zip.h |
92 index 8aaebb6..8c06c0a 100644 | 116 index 8aaebb623430..8c06c0aa7bb0 100644 |
93 --- a/third_party/zlib/contrib/minizip/zip.h | 117 --- a/contrib/minizip/zip.h |
94 +++ b/third_party/zlib/contrib/minizip/zip.h | 118 +++ b/contrib/minizip/zip.h |
95 @@ -47,7 +47,7 @@ extern "C" { | 119 @@ -47,7 +47,7 @@ extern "C" { |
96 //#define HAVE_BZIP2 | 120 //#define HAVE_BZIP2 |
97 | 121 |
98 #ifndef _ZLIB_H | 122 #ifndef _ZLIB_H |
99 -#include "zlib.h" | 123 -#include "zlib.h" |
100 +#include "third_party/zlib/zlib.h" | 124 +#include "third_party/zlib/zlib.h" |
101 #endif | 125 #endif |
102 | 126 |
103 #ifndef _ZLIBIOAPI_H | 127 #ifndef _ZLIBIOAPI_H |
104 diff --git a/third_party/zlib/gzread.c b/third_party/zlib/gzread.c | 128 diff --git a/gzread.c b/gzread.c |
105 index bf4538e..4e11246 100644 | 129 index 956b91ea7d9e..832d3ef98c59 100644 |
106 --- a/third_party/zlib/gzread.c | 130 --- a/gzread.c |
107 +++ b/third_party/zlib/gzread.c | 131 +++ b/gzread.c |
108 @@ -383,7 +383,11 @@ int ZEXPORT gzread(file, buf, len) | 132 @@ -443,7 +443,11 @@ z_size_t ZEXPORT gzfread(buf, size, nitems, file) |
109 # undef z_gzgetc | 133 # undef z_gzgetc |
110 #else | 134 #else |
111 # undef gzgetc | 135 # undef gzgetc |
112 +# ifdef MOZZCONF_H | 136 +# ifdef Z_CR_PREFIX_SET |
113 +# define gzgetc MOZ_Z_gzgetc | 137 +# define gzgetc Cr_z_gzgetc |
114 +# endif | 138 +# endif |
115 #endif | 139 #endif |
116 + | 140 + |
117 int ZEXPORT gzgetc(file) | 141 int ZEXPORT gzgetc(file) |
118 gzFile file; | 142 gzFile file; |
119 { | 143 { |
120 diff --git a/third_party/zlib/mozzconf.h b/third_party/zlib/mozzconf.h | 144 diff --git a/names.h b/names.h |
121 new file mode 100644 | 145 new file mode 100644 |
122 index 0000000..80994c9 | 146 index 000000000000..f18df5684dc5 |
123 --- /dev/null | 147 --- /dev/null |
124 +++ b/third_party/zlib/mozzconf.h | 148 +++ b/names.h |
125 @@ -0,0 +1,178 @@ | 149 @@ -0,0 +1,155 @@ |
126 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 150 +/* Copyright 2017 The Chromium Authors. All rights reserved. |
127 +/* ***** BEGIN LICENSE BLOCK ***** | 151 + * Use of this source code is governed by a BSD-style license that can be |
128 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 152 + * found in the LICENSE file. */ |
| 153 + |
| 154 +#ifndef THIRD_PARTY_ZLIB_NAMES_H_ |
| 155 +#define THIRD_PARTY_ZLIB_NAMES_H_ |
| 156 + |
| 157 +/* Rename all zlib names with a Cr_z_ prefix. This is based on the Z_PREFIX |
| 158 + * option from zconf.h, but with a custom prefix. Where zconf.h would rename |
| 159 + * both a macro and its underscore-suffixed internal implementation (such as |
| 160 + * deflateInit2 and deflateInit2_), only the implementation is renamed here. |
| 161 + * The Byte type is also omitted. |
129 + * | 162 + * |
130 + * The contents of this file are subject to the Mozilla Public License Version | 163 + * To generate this list, run |
131 + * 1.1 (the "License"); you may not use this file except in compliance with | 164 + * sed -rn -e 's/^# *define +([^ ]+) +(z_[^ ]+)$/#define \1 Cr_\2/p' zconf.h |
132 + * the License. You may obtain a copy of the License at | 165 + * (use -E instead of -r on macOS). |
133 + * http://www.mozilla.org/MPL/ | |
134 + * | 166 + * |
135 + * Software distributed under the License is distributed on an "AS IS" basis, | 167 + * gzread is also addressed by modifications in gzread.c and zlib.h. */ |
136 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
137 + * for the specific language governing rights and limitations under the | |
138 + * License. | |
139 + * | |
140 + * The Original Code is the mozilla zlib configuration. | |
141 + * | |
142 + * The Initial Developer of the Original Code is IBM Corporation. | |
143 + * Portions created by the Initial Developer are Copyright (C) 2004 | |
144 + * the Initial Developer. All Rights Reserved. | |
145 + * | |
146 + * Contributor(s): | |
147 + * | |
148 + * Alternatively, the contents of this file may be used under the terms of | |
149 + * either of the GNU General Public License Version 2 or later (the "GPL"), | |
150 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), | |
151 + * in which case the provisions of the GPL or the LGPL are applicable instead | |
152 + * of those above. If you wish to allow use of your version of this file only | |
153 + * under the terms of either the GPL or the LGPL, and not to allow others to | |
154 + * use your version of this file under the terms of the MPL, indicate your | |
155 + * decision by deleting the provisions above and replace them with the notice | |
156 + * and other provisions required by the GPL or the LGPL. If you do not delete | |
157 + * the provisions above, a recipient may use your version of this file under | |
158 + * the terms of any one of the MPL, the GPL or the LGPL. | |
159 + * | |
160 + * ***** END LICENSE BLOCK ***** */ | |
161 + | 168 + |
162 +#ifndef MOZZCONF_H | 169 +#define Z_CR_PREFIX_SET |
163 +#define MOZZCONF_H | |
164 + | 170 + |
165 +#if defined(XP_WIN) && defined(ZLIB_DLL) && !defined(MOZ_ENABLE_LIBXUL) | 171 +#define _dist_code Cr_z__dist_code |
166 +#undef ZLIB_DLL | 172 +#define _length_code Cr_z__length_code |
167 +#endif | 173 +#define _tr_align Cr_z__tr_align |
| 174 +#define _tr_flush_bits Cr_z__tr_flush_bits |
| 175 +#define _tr_flush_block Cr_z__tr_flush_block |
| 176 +#define _tr_init Cr_z__tr_init |
| 177 +#define _tr_stored_block Cr_z__tr_stored_block |
| 178 +#define _tr_tally Cr_z__tr_tally |
| 179 +#define adler32 Cr_z_adler32 |
| 180 +#define adler32_combine Cr_z_adler32_combine |
| 181 +#define adler32_combine64 Cr_z_adler32_combine64 |
| 182 +#define adler32_z Cr_z_adler32_z |
| 183 +#define compress Cr_z_compress |
| 184 +#define compress2 Cr_z_compress2 |
| 185 +#define compressBound Cr_z_compressBound |
| 186 +#define crc32 Cr_z_crc32 |
| 187 +#define crc32_combine Cr_z_crc32_combine |
| 188 +#define crc32_combine64 Cr_z_crc32_combine64 |
| 189 +#define crc32_z Cr_z_crc32_z |
| 190 +#define deflate Cr_z_deflate |
| 191 +#define deflateBound Cr_z_deflateBound |
| 192 +#define deflateCopy Cr_z_deflateCopy |
| 193 +#define deflateEnd Cr_z_deflateEnd |
| 194 +#define deflateGetDictionary Cr_z_deflateGetDictionary |
| 195 +/* #undef deflateInit */ |
| 196 +/* #undef deflateInit2 */ |
| 197 +#define deflateInit2_ Cr_z_deflateInit2_ |
| 198 +#define deflateInit_ Cr_z_deflateInit_ |
| 199 +#define deflateParams Cr_z_deflateParams |
| 200 +#define deflatePending Cr_z_deflatePending |
| 201 +#define deflatePrime Cr_z_deflatePrime |
| 202 +#define deflateReset Cr_z_deflateReset |
| 203 +#define deflateResetKeep Cr_z_deflateResetKeep |
| 204 +#define deflateSetDictionary Cr_z_deflateSetDictionary |
| 205 +#define deflateSetHeader Cr_z_deflateSetHeader |
| 206 +#define deflateTune Cr_z_deflateTune |
| 207 +#define deflate_copyright Cr_z_deflate_copyright |
| 208 +#define get_crc_table Cr_z_get_crc_table |
| 209 +#define gz_error Cr_z_gz_error |
| 210 +#define gz_intmax Cr_z_gz_intmax |
| 211 +#define gz_strwinerror Cr_z_gz_strwinerror |
| 212 +#define gzbuffer Cr_z_gzbuffer |
| 213 +#define gzclearerr Cr_z_gzclearerr |
| 214 +#define gzclose Cr_z_gzclose |
| 215 +#define gzclose_r Cr_z_gzclose_r |
| 216 +#define gzclose_w Cr_z_gzclose_w |
| 217 +#define gzdirect Cr_z_gzdirect |
| 218 +#define gzdopen Cr_z_gzdopen |
| 219 +#define gzeof Cr_z_gzeof |
| 220 +#define gzerror Cr_z_gzerror |
| 221 +#define gzflush Cr_z_gzflush |
| 222 +#define gzfread Cr_z_gzfread |
| 223 +#define gzfwrite Cr_z_gzfwrite |
| 224 +#define gzgetc Cr_z_gzgetc |
| 225 +#define gzgetc_ Cr_z_gzgetc_ |
| 226 +#define gzgets Cr_z_gzgets |
| 227 +#define gzoffset Cr_z_gzoffset |
| 228 +#define gzoffset64 Cr_z_gzoffset64 |
| 229 +#define gzopen Cr_z_gzopen |
| 230 +#define gzopen64 Cr_z_gzopen64 |
| 231 +#define gzopen_w Cr_z_gzopen_w |
| 232 +#define gzprintf Cr_z_gzprintf |
| 233 +#define gzputc Cr_z_gzputc |
| 234 +#define gzputs Cr_z_gzputs |
| 235 +#define gzread Cr_z_gzread |
| 236 +#define gzrewind Cr_z_gzrewind |
| 237 +#define gzseek Cr_z_gzseek |
| 238 +#define gzseek64 Cr_z_gzseek64 |
| 239 +#define gzsetparams Cr_z_gzsetparams |
| 240 +#define gztell Cr_z_gztell |
| 241 +#define gztell64 Cr_z_gztell64 |
| 242 +#define gzungetc Cr_z_gzungetc |
| 243 +#define gzvprintf Cr_z_gzvprintf |
| 244 +#define gzwrite Cr_z_gzwrite |
| 245 +#define inflate Cr_z_inflate |
| 246 +#define inflateBack Cr_z_inflateBack |
| 247 +#define inflateBackEnd Cr_z_inflateBackEnd |
| 248 +/* #undef inflateBackInit */ |
| 249 +#define inflateBackInit_ Cr_z_inflateBackInit_ |
| 250 +#define inflateCodesUsed Cr_z_inflateCodesUsed |
| 251 +#define inflateCopy Cr_z_inflateCopy |
| 252 +#define inflateEnd Cr_z_inflateEnd |
| 253 +#define inflateGetDictionary Cr_z_inflateGetDictionary |
| 254 +#define inflateGetHeader Cr_z_inflateGetHeader |
| 255 +/* #undef inflateInit */ |
| 256 +/* #undef inflateInit2 */ |
| 257 +#define inflateInit2_ Cr_z_inflateInit2_ |
| 258 +#define inflateInit_ Cr_z_inflateInit_ |
| 259 +#define inflateMark Cr_z_inflateMark |
| 260 +#define inflatePrime Cr_z_inflatePrime |
| 261 +#define inflateReset Cr_z_inflateReset |
| 262 +#define inflateReset2 Cr_z_inflateReset2 |
| 263 +#define inflateResetKeep Cr_z_inflateResetKeep |
| 264 +#define inflateSetDictionary Cr_z_inflateSetDictionary |
| 265 +#define inflateSync Cr_z_inflateSync |
| 266 +#define inflateSyncPoint Cr_z_inflateSyncPoint |
| 267 +#define inflateUndermine Cr_z_inflateUndermine |
| 268 +#define inflateValidate Cr_z_inflateValidate |
| 269 +#define inflate_copyright Cr_z_inflate_copyright |
| 270 +#define inflate_fast Cr_z_inflate_fast |
| 271 +#define inflate_table Cr_z_inflate_table |
| 272 +#define uncompress Cr_z_uncompress |
| 273 +#define uncompress2 Cr_z_uncompress2 |
| 274 +#define zError Cr_z_zError |
| 275 +#define zcalloc Cr_z_zcalloc |
| 276 +#define zcfree Cr_z_zcfree |
| 277 +#define zlibCompileFlags Cr_z_zlibCompileFlags |
| 278 +#define zlibVersion Cr_z_zlibVersion |
| 279 +/* #undef Byte */ |
| 280 +#define Bytef Cr_z_Bytef |
| 281 +#define alloc_func Cr_z_alloc_func |
| 282 +#define charf Cr_z_charf |
| 283 +#define free_func Cr_z_free_func |
| 284 +#define gzFile Cr_z_gzFile |
| 285 +#define gz_header Cr_z_gz_header |
| 286 +#define gz_headerp Cr_z_gz_headerp |
| 287 +#define in_func Cr_z_in_func |
| 288 +#define intf Cr_z_intf |
| 289 +#define out_func Cr_z_out_func |
| 290 +#define uInt Cr_z_uInt |
| 291 +#define uIntf Cr_z_uIntf |
| 292 +#define uLong Cr_z_uLong |
| 293 +#define uLongf Cr_z_uLongf |
| 294 +#define voidp Cr_z_voidp |
| 295 +#define voidpc Cr_z_voidpc |
| 296 +#define voidpf Cr_z_voidpf |
| 297 +#define gz_header_s Cr_z_gz_header_s |
| 298 +#define internal_state Cr_z_internal_state |
| 299 +/* #undef z_off64_t */ |
168 + | 300 + |
169 +#ifdef HAVE_VISIBILITY_ATTRIBUTE | 301 +/* An exported symbol that isn't handled by Z_PREFIX in zconf.h */ |
170 +#define ZEXTERN __attribute__((visibility ("default"))) extern | 302 +#define z_errmsg Cr_z_z_errmsg |
171 +#endif | |
172 + | 303 + |
173 +/* Exported Symbols */ | 304 +#endif /* THIRD_PARTY_ZLIB_NAMES_H_ */ |
174 +#define zlibVersion MOZ_Z_zlibVersion | 305 diff --git a/zconf.h b/zconf.h |
175 +#define deflate MOZ_Z_deflate | 306 index 5e1d68a004e9..a7a815f575a7 100644 |
176 +#define deflateEnd MOZ_Z_deflateEnd | 307 --- a/zconf.h |
177 +#define inflate MOZ_Z_inflate | 308 +++ b/zconf.h |
178 +#define inflateEnd MOZ_Z_inflateEnd | |
179 +#define deflateSetDictionary MOZ_Z_deflateSetDictionary | |
180 +#define deflateCopy MOZ_Z_deflateCopy | |
181 +#define deflateReset MOZ_Z_deflateReset | |
182 +#define deflateParams MOZ_Z_deflateParams | |
183 +#define deflateBound MOZ_Z_deflateBound | |
184 +#define deflatePrime MOZ_Z_deflatePrime | |
185 +#define inflateSetDictionary MOZ_Z_inflateSetDictionary | |
186 +#define inflateSync MOZ_Z_inflateSync | |
187 +#define inflateCopy MOZ_Z_inflateCopy | |
188 +#define inflateReset MOZ_Z_inflateReset | |
189 +#define inflateBack MOZ_Z_inflateBack | |
190 +#define inflateBackEnd MOZ_Z_inflateBackEnd | |
191 +#define zlibCompileFlags MOZ_Z_zlibCompileFlags | |
192 +#define compress MOZ_Z_compress | |
193 +#define compress2 MOZ_Z_compress2 | |
194 +#define compressBound MOZ_Z_compressBound | |
195 +#define uncompress MOZ_Z_uncompress | |
196 +#define gzopen MOZ_Z_gzopen | |
197 +#define gzdopen MOZ_Z_gzdopen | |
198 +#define gzsetparams MOZ_Z_gzsetparams | |
199 +#define gzread MOZ_Z_gzread | |
200 +#define gzwrite MOZ_Z_gzwrite | |
201 +#define gzprintf MOZ_Z_gzprintf | |
202 +#define gzvprintf MOZ_Z_gzvprintf | |
203 +#define gzputs MOZ_Z_gzputs | |
204 +#define gzgets MOZ_Z_gzgets | |
205 +#define gzputc MOZ_Z_gzputc | |
206 +#define gzgetc MOZ_Z_gzgetc | |
207 +#define gzgetc_ MOZ_Z_gzgetc_ | |
208 +#define gzungetc MOZ_Z_gzungetc | |
209 +#define gzflush MOZ_Z_gzflush | |
210 +#define gzseek MOZ_Z_gzseek | |
211 +#define gzrewind MOZ_Z_gzrewind | |
212 +#define gztell MOZ_Z_gztell | |
213 +#define gzeof MOZ_Z_gzeof | |
214 +#define gzclose MOZ_Z_gzclose | |
215 +#define gzerror MOZ_Z_gzerror | |
216 +#define gzclearerr MOZ_Z_gzclearerr | |
217 +#define adler32 MOZ_Z_adler32 | |
218 +#define crc32 MOZ_Z_crc32 | |
219 +#define deflateInit_ MOZ_Z_deflateInit_ | |
220 +#define deflateInit2_ MOZ_Z_deflateInit2_ | |
221 +#define inflateInit_ MOZ_Z_inflateInit_ | |
222 +#define inflateInit2_ MOZ_Z_inflateInit2_ | |
223 +#define inflateBackInit_ MOZ_Z_inflateBackInit_ | |
224 +#define inflateSyncPoint MOZ_Z_inflateSyncPoint | |
225 +#define get_crc_table MOZ_Z_get_crc_table | |
226 +#define zError MOZ_Z_zError | |
227 + | |
228 +/* Extra global symbols */ | |
229 +#define _dist_code MOZ_Z__dist_code | |
230 +#define _length_code MOZ_Z__length_code | |
231 +#define _tr_align MOZ_Z__tr_align | |
232 +#define _tr_flush_block MOZ_Z__tr_flush_block | |
233 +#define _tr_init MOZ_Z__tr_init | |
234 +#define _tr_stored_block MOZ_Z__tr_stored_block | |
235 +#define _tr_tally MOZ_Z__tr_tally | |
236 +#define deflate_copyright MOZ_Z_deflate_copyright | |
237 +#define inflate_copyright MOZ_Z_inflate_copyright | |
238 +#define inflate_fast MOZ_Z_inflate_fast | |
239 +#define inflate_table MOZ_Z_inflate_table | |
240 +#define z_errmsg MOZ_Z_z_errmsg | |
241 +#define zcalloc MOZ_Z_zcalloc | |
242 +#define zcfree MOZ_Z_zcfree | |
243 +#define alloc_func MOZ_Z_alloc_func | |
244 +#define free_func MOZ_Z_free_func | |
245 +#define in_func MOZ_Z_in_func | |
246 +#define out_func MOZ_Z_out_func | |
247 + | |
248 +/* New as of libpng-1.2.3 */ | |
249 +#define adler32_combine MOZ_Z_adler32_combine | |
250 +#define crc32_combine MOZ_Z_crc32_combine | |
251 +#define deflateSetHeader MOZ_Z_deflateSetHeader | |
252 +#define deflateTune MOZ_Z_deflateTune | |
253 +#define gzdirect MOZ_Z_gzdirect | |
254 +#define inflatePrime MOZ_Z_inflatePrime | |
255 +#define inflateGetHeader MOZ_Z_inflateGetHeader | |
256 + | |
257 +/* New as of zlib 1.2.5 */ | |
258 +#define gzoffset MOZ_Z_gzoffset | |
259 +#define gzopen64 MOZ_Z_gzopen64 | |
260 +#define gzseek64 MOZ_Z_gzseek64 | |
261 +#define gztell64 MOZ_Z_gztell64 | |
262 +#define gzoffset64 MOZ_Z_gzoffset64 | |
263 +#define adler32_combine64 MOZ_Z_adler32_combine64 | |
264 +#define crc32_combine64 MOZ_Z_crc32_combine64 | |
265 +#define gz_error MOZ_Z_gz_error | |
266 +#define gz_intmax MOZ_Z_gz_intmax | |
267 +#define gz_strwinerror MOZ_Z_gz_strwinerror | |
268 +#define gzbuffer MOZ_Z_gzbuffer | |
269 +#define gzclose_r MOZ_Z_gzclose_r | |
270 +#define gzclose_w MOZ_Z_gzclose_w | |
271 +#define inflateMark MOZ_Z_inflateMark | |
272 +#define inflateReset2 MOZ_Z_inflateReset2 | |
273 +#define inflateUndermine MOZ_Z_inflateUndermine | |
274 +#define charf MOZ_Z_charf | |
275 +#define gzFile MOZ_Z_gzFile | |
276 +#define gz_header MOZ_Z_gz_header | |
277 +#define gz_headerp MOZ_Z_gz_headerp | |
278 +#define intf MOZ_Z_intf | |
279 +#define uInt MOZ_Z_uInt | |
280 +#define uIntf MOZ_Z_uIntf | |
281 +#define uLong MOZ_Z_uLong | |
282 +#define uLongf MOZ_Z_uLongf | |
283 +#define voidp MOZ_Z_voidp | |
284 +#define voidpc MOZ_Z_voidpc | |
285 +#define voidpf MOZ_Z_voidpf | |
286 +#define gz_header_s MOZ_Z_gz_header_s | |
287 +#define internal_state MOZ_Z_internal_state | |
288 + | |
289 +/* New as of zlib 1.2.8 */ | |
290 +#define _tr_flush_bits MOZ_Z__tr_flush_bits | |
291 +#define deflateResetKeep MOZ_Z_deflateResetKeep | |
292 +#define deflatePending MOZ_Z_deflatePending | |
293 +#define inflateGetDictionary MOZ_Z_inflateGetDictionary | |
294 +#define inflateResetKeep MOZ_Z_inflateResetKeep | |
295 +#define gzopen_w MOZ_Z_gzopen_w | |
296 + | |
297 +/* Mangle Byte types except on Mac. */ | |
298 +#if !defined(__MACTYPES__) | |
299 +#define Byte MOZ_Z_Byte | |
300 +#define Bytef MOZ_Z_Bytef | |
301 +#endif | |
302 + | |
303 +#endif | |
304 diff --git a/third_party/zlib/zconf.h b/third_party/zlib/zconf.h | |
305 index 9987a77..1b1d88b 100644 | |
306 --- a/third_party/zlib/zconf.h | |
307 +++ b/third_party/zlib/zconf.h | |
308 @@ -8,6 +8,9 @@ | 309 @@ -8,6 +8,9 @@ |
309 #ifndef ZCONF_H | 310 #ifndef ZCONF_H |
310 #define ZCONF_H | 311 #define ZCONF_H |
311 | 312 |
312 +/* This include does prefixing as below, but with an updated set of names */ | 313 +/* This include does prefixing as below, but with an updated set of names */ |
313 +#include "mozzconf.h" | 314 +#include "names.h" |
314 + | 315 + |
315 /* | 316 /* |
316 * If you *really* need a unique prefix for all types and library functions, | 317 * If you *really* need a unique prefix for all types and library functions, |
317 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. | 318 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. |
318 @@ -408,7 +411,7 @@ typedef uLong FAR uLongf; | 319 @@ -431,7 +434,7 @@ typedef uLong FAR uLongf; |
319 typedef unsigned long z_crc_t; | 320 typedef unsigned long z_crc_t; |
320 #endif | 321 #endif |
321 | 322 |
322 -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ | 323 -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ |
323 +#if !defined(_WIN32) | 324 +#if !defined(_WIN32) |
324 # define Z_HAVE_UNISTD_H | 325 # define Z_HAVE_UNISTD_H |
325 #endif | 326 #endif |
326 | 327 |
327 diff --git a/third_party/zlib/zlib.h b/third_party/zlib/zlib.h | 328 diff --git a/zlib.h b/zlib.h |
328 index 3e0c767..36c73af 100644 | 329 index f09cdaf1e054..99fd467f6b1a 100644 |
329 --- a/third_party/zlib/zlib.h | 330 --- a/zlib.h |
330 +++ b/third_party/zlib/zlib.h | 331 +++ b/zlib.h |
331 @@ -1678,8 +1678,14 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backwa
rd compatibility */ | 332 @@ -1824,6 +1824,11 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backwa
rd compatibility */ |
| 333 # undef z_gzgetc |
332 # define z_gzgetc(g) \ | 334 # define z_gzgetc(g) \ |
333 ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) | 335 ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) |
334 #else | 336 +#elif defined(Z_CR_PREFIX_SET) |
335 -# define gzgetc(g) \ | |
336 +# ifdef MOZZCONF_H | |
337 +# undef gzgetc | 337 +# undef gzgetc |
338 +# define gzgetc(g) \ | 338 +# define gzgetc(g) \ |
339 + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : MOZ_Z_gzgetc
(g)) | 339 + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) \ |
340 +# else | 340 + : (Cr_z_gzgetc)(g)) |
341 +# define gzgetc(g) \ | 341 #else |
342 ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) | 342 # define gzgetc(g) \ |
343 +# endif | 343 ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) |
344 #endif | 344 @@ -1853,11 +1858,29 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backw
ard compatibility */ |
345 | |
346 /* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or | |
347 @@ -1706,11 +1712,29 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backw
ard compatibility */ | |
348 # define z_adler32_combine z_adler32_combine64 | 345 # define z_adler32_combine z_adler32_combine64 |
349 # define z_crc32_combine z_crc32_combine64 | 346 # define z_crc32_combine z_crc32_combine64 |
350 # else | 347 # else |
351 +# ifdef gzopen | 348 +# ifdef gzopen |
352 +# undef gzopen | 349 +# undef gzopen |
353 +# endif | 350 +# endif |
354 # define gzopen gzopen64 | 351 # define gzopen gzopen64 |
355 +# ifdef gzseek | 352 +# ifdef gzseek |
356 +# undef gzseek | 353 +# undef gzseek |
357 +# endif | 354 +# endif |
358 # define gzseek gzseek64 | 355 # define gzseek gzseek64 |
359 +# ifdef gztell | 356 +# ifdef gztell |
360 +# undef gztell | 357 +# undef gztell |
361 +# endif | 358 +# endif |
362 # define gztell gztell64 | 359 # define gztell gztell64 |
363 +# ifdef gzoffset | 360 +# ifdef gzoffset |
364 +# undef gzoffset | 361 +# undef gzoffset |
365 +# endif | 362 +# endif |
366 # define gzoffset gzoffset64 | 363 # define gzoffset gzoffset64 |
367 +# ifdef adler32_combine | 364 +# ifdef adler32_combine |
368 +# undef adler32_combine | 365 +# undef adler32_combine |
369 +# endif | 366 +# endif |
370 # define adler32_combine adler32_combine64 | 367 # define adler32_combine adler32_combine64 |
371 +# ifdef crc32_combine | 368 +# ifdef crc32_combine |
372 +# undef crc32_combine | 369 +# undef crc32_combine |
373 +# endif | 370 +# endif |
374 # define crc32_combine crc32_combine64 | 371 # define crc32_combine crc32_combine64 |
375 # endif | 372 # endif |
376 # ifndef Z_LARGE64 | 373 # ifndef Z_LARGE64 |
377 diff --git a/third_party/zlib/zutil.h b/third_party/zlib/zutil.h | 374 diff --git a/zutil.h b/zutil.h |
378 index 24ab06b..fe9e53c 100644 | 375 index b079ea6a80f5..80375b8b6109 100644 |
379 --- a/third_party/zlib/zutil.h | 376 --- a/zutil.h |
380 +++ b/third_party/zlib/zutil.h | 377 +++ b/zutil.h |
381 @@ -28,6 +28,21 @@ | 378 @@ -28,6 +28,21 @@ |
382 # include <string.h> | 379 # include <string.h> |
383 # include <stdlib.h> | 380 # include <stdlib.h> |
384 #endif | 381 #endif |
385 +#ifdef NO_ERRNO_H | 382 +#ifdef NO_ERRNO_H |
386 +# ifdef _WIN32_WCE | 383 +# ifdef _WIN32_WCE |
387 + /* The Microsoft C Run-Time Library for Windows CE doesn't have | 384 + /* The Microsoft C Run-Time Library for Windows CE doesn't have |
388 + * errno. We define it as a global variable to simplify porting. | 385 + * errno. We define it as a global variable to simplify porting. |
389 + * Its value is always 0 and should not be used. We rename it to | 386 + * Its value is always 0 and should not be used. We rename it to |
390 + * avoid conflict with other libraries that use the same workaround. | 387 + * avoid conflict with other libraries that use the same workaround. |
391 + */ | 388 + */ |
392 +# define errno z_errno | 389 +# define errno z_errno |
393 +# endif | 390 +# endif |
394 + extern int errno; | 391 + extern int errno; |
395 +#else | 392 +#else |
396 +# ifndef _WIN32_WCE | 393 +# ifndef _WIN32_WCE |
397 +# include <errno.h> | 394 +# include <errno.h> |
398 +# endif | 395 +# endif |
399 +#endif | 396 +#endif |
400 | 397 |
401 #ifdef Z_SOLO | 398 #ifdef Z_SOLO |
402 typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */ | 399 typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */ |
403 @@ -135,6 +150,12 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-z
lib_error */ | |
404 # define OS_CODE 0x0a | |
405 #endif | |
406 | |
407 +#ifdef _MSC_VER | |
408 +#define zalign(x) __declspec(align(x)) | |
409 +#else | |
410 +#define zalign(x) __attribute__((aligned((x)))) | |
411 +#endif | |
412 + | |
413 #ifdef WIN32 | |
414 # ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */ | |
415 # define OS_CODE 0x0b | |
416 -- | |
417 2.7.4 | |
418 | |
OLD | NEW |