Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: third_party/zlib/google.patch

Issue 2079313002: Revert of Update Zlib to version 1.2.8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/zlib/deflate.c ('k') | third_party/zlib/gzguts.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 diff --git a/third_party/zlib/contrib/minizip/ioapi.h b/third_party/zlib/contrib /minizip/ioapi.h 1 diff -ru zlib-1.2.5/gzlib.c zlib/gzlib.c
2 index 8dcbdb0..c1b7a54 100644 2 --- zlib-1.2.5/gzlib.c
3 --- a/third_party/zlib/contrib/minizip/ioapi.h 3 +++ zlib/gzlib.c
4 +++ b/third_party/zlib/contrib/minizip/ioapi.h 4 @@ -5,7 +5,9 @@
5 @@ -43,7 +43,7 @@
6 5
7 #include <stdio.h> 6 #include "gzguts.h"
8 #include <stdlib.h>
9 -#include "zlib.h"
10 +#include "third_party/zlib/zlib.h"
11 7
12 #if defined(USE_FILE32API) 8 -#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
13 #define fopen64 fopen 9 +#if defined(_WIN32)
14 diff --git a/third_party/zlib/contrib/minizip/mztools.c b/third_party/zlib/contr ib/minizip/mztools.c 10 +# define LSEEK (z_off64_t)_lseeki64
15 index 96891c2..8bf9cca 100644 11 +#elif defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
16 --- a/third_party/zlib/contrib/minizip/mztools.c 12 # define LSEEK lseek64
17 +++ b/third_party/zlib/contrib/minizip/mztools.c
18 @@ -8,7 +8,7 @@
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <string.h>
22 -#include "zlib.h"
23 +#include "third_party/zlib/zlib.h"
24 #include "unzip.h"
25
26 #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
28 index a49a426..f295ffe 100644
29 --- a/third_party/zlib/contrib/minizip/mztools.h
30 +++ b/third_party/zlib/contrib/minizip/mztools.h
31 @@ -12,7 +12,7 @@ extern "C" {
32 #endif
33
34 #ifndef _ZLIB_H
35 -#include "zlib.h"
36 +#include "third_party/zlib/zlib.h"
37 #endif
38
39 #include "unzip.h"
40 diff --git a/third_party/zlib/contrib/minizip/unzip.c b/third_party/zlib/contrib /minizip/unzip.c
41 index 9093504..2d5f0b1 100644
42 --- a/third_party/zlib/contrib/minizip/unzip.c
43 +++ b/third_party/zlib/contrib/minizip/unzip.c
44 @@ -72,7 +72,7 @@
45 #define NOUNCRYPT
46 #endif
47
48 -#include "zlib.h"
49 +#include "third_party/zlib/zlib.h"
50 #include "unzip.h"
51
52 #ifdef STDC
53 @@ -1705,11 +1705,6 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voi dp buf, unsigned len)
54
55 pfile_in_zip_read_info->stream.avail_out = (uInt)len;
56
57 - if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
58 - (!(pfile_in_zip_read_info->raw)))
59 - pfile_in_zip_read_info->stream.avail_out =
60 - (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
61 -
62 if ((len>pfile_in_zip_read_info->rest_read_compressed+
63 pfile_in_zip_read_info->stream.avail_in) &&
64 (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
66 index 2104e39..3c01435 100644
67 --- a/third_party/zlib/contrib/minizip/unzip.h
68 +++ b/third_party/zlib/contrib/minizip/unzip.h
69 @@ -48,7 +48,7 @@ extern "C" {
70 #endif
71
72 #ifndef _ZLIB_H
73 -#include "zlib.h"
74 +#include "third_party/zlib/zlib.h"
75 #endif
76
77 #ifndef _ZLIBIOAPI_H
78 diff --git a/third_party/zlib/contrib/minizip/zip.c b/third_party/zlib/contrib/m inizip/zip.c
79 index ea54853..aaf6961 100644
80 --- a/third_party/zlib/contrib/minizip/zip.c
81 +++ b/third_party/zlib/contrib/minizip/zip.c
82 @@ -26,7 +26,7 @@
83 #include <stdlib.h>
84 #include <string.h>
85 #include <time.h>
86 -#include "zlib.h"
87 +#include "third_party/zlib/zlib.h"
88 #include "zip.h"
89
90 #ifdef STDC
91 diff --git a/third_party/zlib/contrib/minizip/zip.h b/third_party/zlib/contrib/m inizip/zip.h
92 index 8aaebb6..8c06c0a 100644
93 --- a/third_party/zlib/contrib/minizip/zip.h
94 +++ b/third_party/zlib/contrib/minizip/zip.h
95 @@ -47,7 +47,7 @@ extern "C" {
96 //#define HAVE_BZIP2
97
98 #ifndef _ZLIB_H
99 -#include "zlib.h"
100 +#include "third_party/zlib/zlib.h"
101 #endif
102
103 #ifndef _ZLIBIOAPI_H
104 diff --git a/third_party/zlib/gzread.c b/third_party/zlib/gzread.c
105 index bf4538e..4e11246 100644
106 --- a/third_party/zlib/gzread.c
107 +++ b/third_party/zlib/gzread.c
108 @@ -383,7 +383,11 @@ int ZEXPORT gzread(file, buf, len)
109 # undef z_gzgetc
110 #else 13 #else
111 # undef gzgetc 14 # define LSEEK lseek
112 +# ifdef MOZZCONF_H 15 diff -ru zlib-1.2.5/mozzconf.h zlib/mozzconf.h
113 +# define gzgetc MOZ_Z_gzgetc 16 --- zlib-1.2.5/mozzconf.h» 2011-12-15 18:10:49.000000000 +0800
114 +# endif 17 +++ zlib/mozzconf.h» 2011-12-16 16:08:00.000000000 +0800
115 #endif 18 @@ -0,0 +1,168 @@
116 +
117 int ZEXPORT gzgetc(file)
118 gzFile file;
119 {
120 diff --git a/third_party/zlib/mozzconf.h b/third_party/zlib/mozzconf.h
121 new file mode 100644
122 index 0000000..902673b
123 --- /dev/null
124 +++ b/third_party/zlib/mozzconf.h
125 @@ -0,0 +1,170 @@
126 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 19 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
127 +/* ***** BEGIN LICENSE BLOCK ***** 20 +/* ***** BEGIN LICENSE BLOCK *****
128 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 21 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
129 + * 22 + *
130 + * The contents of this file are subject to the Mozilla Public License Version 23 + * The contents of this file are subject to the Mozilla Public License Version
131 + * 1.1 (the "License"); you may not use this file except in compliance with 24 + * 1.1 (the "License"); you may not use this file except in compliance with
132 + * the License. You may obtain a copy of the License at 25 + * the License. You may obtain a copy of the License at
133 + * http://www.mozilla.org/MPL/ 26 + * http://www.mozilla.org/MPL/
134 + * 27 + *
135 + * Software distributed under the License is distributed on an "AS IS" basis, 28 + * Software distributed under the License is distributed on an "AS IS" basis,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 +#define compress MOZ_Z_compress 85 +#define compress MOZ_Z_compress
193 +#define compress2 MOZ_Z_compress2 86 +#define compress2 MOZ_Z_compress2
194 +#define compressBound MOZ_Z_compressBound 87 +#define compressBound MOZ_Z_compressBound
195 +#define uncompress MOZ_Z_uncompress 88 +#define uncompress MOZ_Z_uncompress
196 +#define gzopen MOZ_Z_gzopen 89 +#define gzopen MOZ_Z_gzopen
197 +#define gzdopen MOZ_Z_gzdopen 90 +#define gzdopen MOZ_Z_gzdopen
198 +#define gzsetparams MOZ_Z_gzsetparams 91 +#define gzsetparams MOZ_Z_gzsetparams
199 +#define gzread MOZ_Z_gzread 92 +#define gzread MOZ_Z_gzread
200 +#define gzwrite MOZ_Z_gzwrite 93 +#define gzwrite MOZ_Z_gzwrite
201 +#define gzprintf MOZ_Z_gzprintf 94 +#define gzprintf MOZ_Z_gzprintf
202 +#define gzvprintf MOZ_Z_gzvprintf
203 +#define gzputs MOZ_Z_gzputs 95 +#define gzputs MOZ_Z_gzputs
204 +#define gzgets MOZ_Z_gzgets 96 +#define gzgets MOZ_Z_gzgets
205 +#define gzputc MOZ_Z_gzputc 97 +#define gzputc MOZ_Z_gzputc
206 +#define gzgetc MOZ_Z_gzgetc 98 +#define gzgetc MOZ_Z_gzgetc
207 +#define gzgetc_ MOZ_Z_gzgetc_
208 +#define gzungetc MOZ_Z_gzungetc 99 +#define gzungetc MOZ_Z_gzungetc
209 +#define gzflush MOZ_Z_gzflush 100 +#define gzflush MOZ_Z_gzflush
210 +#define gzseek MOZ_Z_gzseek 101 +#define gzseek MOZ_Z_gzseek
211 +#define gzrewind MOZ_Z_gzrewind 102 +#define gzrewind MOZ_Z_gzrewind
212 +#define gztell MOZ_Z_gztell 103 +#define gztell MOZ_Z_gztell
213 +#define gzeof MOZ_Z_gzeof 104 +#define gzeof MOZ_Z_gzeof
214 +#define gzclose MOZ_Z_gzclose 105 +#define gzclose MOZ_Z_gzclose
215 +#define gzerror MOZ_Z_gzerror 106 +#define gzerror MOZ_Z_gzerror
216 +#define gzclearerr MOZ_Z_gzclearerr 107 +#define gzclearerr MOZ_Z_gzclearerr
217 +#define adler32 MOZ_Z_adler32 108 +#define adler32 MOZ_Z_adler32
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 +#define gz_header_s MOZ_Z_gz_header_s 177 +#define gz_header_s MOZ_Z_gz_header_s
287 +#define internal_state MOZ_Z_internal_state 178 +#define internal_state MOZ_Z_internal_state
288 + 179 +
289 +/* Mangle Byte types except on Mac. */ 180 +/* Mangle Byte types except on Mac. */
290 +#if !defined(__MACTYPES__) 181 +#if !defined(__MACTYPES__)
291 +#define Byte MOZ_Z_Byte 182 +#define Byte MOZ_Z_Byte
292 +#define Bytef MOZ_Z_Bytef 183 +#define Bytef MOZ_Z_Bytef
293 +#endif 184 +#endif
294 + 185 +
295 +#endif 186 +#endif
296 diff --git a/third_party/zlib/zconf.h b/third_party/zlib/zconf.h 187 diff -ru zlib-1.2.5/zconf.h zlib/zconf.h
297 index 9987a77..1b1d88b 100644 188 --- zlib-1.2.5/zconf.h» 2010-04-19 01:58:06.000000000 +0800
298 --- a/third_party/zlib/zconf.h 189 +++ zlib/zconf.h» 2011-12-14 08:06:37.000000000 +0800
299 +++ b/third_party/zlib/zconf.h
300 @@ -8,6 +8,9 @@ 190 @@ -8,6 +8,9 @@
301 #ifndef ZCONF_H 191 #ifndef ZCONF_H
302 #define ZCONF_H 192 #define ZCONF_H
303 193
304 +/* This include does prefixing as below, but with an updated set of names */ 194 +/* This include does prefixing as below, but with an updated set of names */
305 +#include "mozzconf.h" 195 +#include "mozzconf.h"
306 + 196 +
307 /* 197 /*
308 * If you *really* need a unique prefix for all types and library functions, 198 * If you *really* need a unique prefix for all types and library functions,
309 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. 199 * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
310 @@ -408,7 +411,7 @@ typedef uLong FAR uLongf; 200 @@ -359,7 +359,7 @@ typedef uLong FAR uLongf;
311 typedef unsigned long z_crc_t; 201 typedef Byte *voidp;
312 #endif 202 #endif
313 203
314 -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ 204 -#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
315 +#if !defined(_WIN32) 205 +#if !defined(_WIN32)
316 # define Z_HAVE_UNISTD_H 206 # define Z_HAVE_UNISTD_H
317 #endif 207 #endif
318 208
319 diff --git a/third_party/zlib/zlib.h b/third_party/zlib/zlib.h 209 --- zlib-1.2.5/zlib.h» 2010-04-20 12:12:48.000000000 +0800
320 index 3e0c767..36c73af 100644 210 +++ zlib/zlib.h»2013-04-06 16:08:48.000000000 +0800
321 --- a/third_party/zlib/zlib.h 211 @@ -1572,11 +1572,29 @@
322 +++ b/third_party/zlib/zlib.h
323 @@ -1678,8 +1678,14 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backwa rd compatibility */
324 # define z_gzgetc(g) \
325 ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
326 #else
327 -# define gzgetc(g) \
328 +# ifdef MOZZCONF_H
329 +# undef gzgetc
330 +# define gzgetc(g) \
331 + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : MOZ_Z_gzgetc (g))
332 +# else
333 +# define gzgetc(g) \
334 ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
335 +# endif
336 #endif 212 #endif
337 213
338 /* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or 214 #if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
339 @@ -1706,11 +1712,29 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backw ard compatibility */ 215 +# ifdef gzopen
340 # define z_adler32_combine z_adler32_combine64 216 +# undef gzopen
341 # define z_crc32_combine z_crc32_combine64
342 # else
343 +# ifdef gzopen
344 +# undef gzopen
345 +# endif
346 # define gzopen gzopen64
347 +# ifdef gzseek
348 +# undef gzseek
349 +# endif
350 # define gzseek gzseek64
351 +# ifdef gztell
352 +# undef gztell
353 +# endif
354 # define gztell gztell64
355 +# ifdef gzoffset
356 +# undef gzoffset
357 +# endif
358 # define gzoffset gzoffset64
359 +# ifdef adler32_combine
360 +# undef adler32_combine
361 +# endif
362 # define adler32_combine adler32_combine64
363 +# ifdef crc32_combine
364 +# undef crc32_combine
365 +# endif
366 # define crc32_combine crc32_combine64
367 # endif
368 # ifndef Z_LARGE64
369 diff --git a/third_party/zlib/zutil.h b/third_party/zlib/zutil.h
370 index 24ab06b..fe9e53c 100644
371 --- a/third_party/zlib/zutil.h
372 +++ b/third_party/zlib/zutil.h
373 @@ -28,6 +28,21 @@
374 # include <string.h>
375 # include <stdlib.h>
376 #endif
377 +#ifdef NO_ERRNO_H
378 +# ifdef _WIN32_WCE
379 + /* The Microsoft C Run-Time Library for Windows CE doesn't have
380 + * errno. We define it as a global variable to simplify porting.
381 + * Its value is always 0 and should not be used. We rename it to
382 + * avoid conflict with other libraries that use the same workaround.
383 + */
384 +# define errno z_errno
385 +# endif
386 + extern int errno;
387 +#else
388 +# ifndef _WIN32_WCE
389 +# include <errno.h>
390 +# endif 217 +# endif
391 +#endif 218 # define gzopen gzopen64
392 219 +# ifdef gzseek
393 #ifdef Z_SOLO 220 +# undef gzseek
394 typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */ 221 +# endif
395 @@ -135,6 +150,12 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-z lib_error */ 222 # define gzseek gzseek64
396 # define OS_CODE 0x0a 223 +# ifdef gztell
397 #endif 224 +# undef gztell
398 225 +# endif
399 +#ifdef _MSC_VER 226 # define gztell gztell64
400 +#define zalign(x) __declspec(align(x)) 227 +# ifdef gzoffset
401 +#else 228 +# undef gzoffset
402 +#define zalign(x) __attribute__((aligned((x)))) 229 +# endif
403 +#endif 230 # define gzoffset gzoffset64
404 + 231 +# ifdef adler32_combine
405 #ifdef WIN32 232 +# undef adler32_combine
406 # ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */ 233 +# endif
407 # define OS_CODE 0x0b 234 # define adler32_combine adler32_combine64
408 -- 235 +# ifdef crc32_combine
409 2.7.4 236 +# undef crc32_combine
410 237 +# endif
238 # define crc32_combine crc32_combine64
239 # ifdef _LARGEFILE64_SOURCE
240 ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
OLDNEW
« no previous file with comments | « third_party/zlib/deflate.c ('k') | third_party/zlib/gzguts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698