blob: 666093d696a58351b38d54b9cb5d5f90bb0cb17d [file] [log] [blame]
mark13dc2462017-02-14 22:15:29 -08001/* Copyright 2017 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */
4
Tom Anderson20c7ae12019-04-08 20:51:48 +00005#ifndef THIRD_PARTY_ZLIB_CHROMECONF_H_
6#define THIRD_PARTY_ZLIB_CHROMECONF_H_
7
8#if defined(COMPONENT_BUILD)
9#if defined(WIN32)
10#if defined(ZLIB_IMPLEMENTATION)
11#define ZEXTERN __declspec(dllexport)
12#else
13#define ZEXTERN __declspec(dllimport)
14#endif
15#elif defined(ZLIB_IMPLEMENTATION)
Jüri Valdmannd6d7cb82019-10-15 12:10:55 +000016#define ZEXTERN __attribute__((visibility("default")))
Tom Anderson20c7ae12019-04-08 20:51:48 +000017#endif
18#endif
mark13dc2462017-02-14 22:15:29 -080019
20/* Rename all zlib names with a Cr_z_ prefix. This is based on the Z_PREFIX
21 * option from zconf.h, but with a custom prefix. Where zconf.h would rename
22 * both a macro and its underscore-suffixed internal implementation (such as
23 * deflateInit2 and deflateInit2_), only the implementation is renamed here.
24 * The Byte type is also omitted.
25 *
26 * To generate this list, run
27 * sed -rn -e 's/^# *define +([^ ]+) +(z_[^ ]+)$/#define \1 Cr_\2/p' zconf.h
28 * (use -E instead of -r on macOS).
29 *
30 * gzread is also addressed by modifications in gzread.c and zlib.h. */
31
32#define Z_CR_PREFIX_SET
33
34#define _dist_code Cr_z__dist_code
35#define _length_code Cr_z__length_code
36#define _tr_align Cr_z__tr_align
37#define _tr_flush_bits Cr_z__tr_flush_bits
38#define _tr_flush_block Cr_z__tr_flush_block
39#define _tr_init Cr_z__tr_init
40#define _tr_stored_block Cr_z__tr_stored_block
41#define _tr_tally Cr_z__tr_tally
42#define adler32 Cr_z_adler32
43#define adler32_combine Cr_z_adler32_combine
44#define adler32_combine64 Cr_z_adler32_combine64
45#define adler32_z Cr_z_adler32_z
46#define compress Cr_z_compress
47#define compress2 Cr_z_compress2
48#define compressBound Cr_z_compressBound
49#define crc32 Cr_z_crc32
50#define crc32_combine Cr_z_crc32_combine
51#define crc32_combine64 Cr_z_crc32_combine64
52#define crc32_z Cr_z_crc32_z
53#define deflate Cr_z_deflate
54#define deflateBound Cr_z_deflateBound
55#define deflateCopy Cr_z_deflateCopy
56#define deflateEnd Cr_z_deflateEnd
57#define deflateGetDictionary Cr_z_deflateGetDictionary
58/* #undef deflateInit */
59/* #undef deflateInit2 */
60#define deflateInit2_ Cr_z_deflateInit2_
61#define deflateInit_ Cr_z_deflateInit_
62#define deflateParams Cr_z_deflateParams
63#define deflatePending Cr_z_deflatePending
64#define deflatePrime Cr_z_deflatePrime
65#define deflateReset Cr_z_deflateReset
66#define deflateResetKeep Cr_z_deflateResetKeep
67#define deflateSetDictionary Cr_z_deflateSetDictionary
68#define deflateSetHeader Cr_z_deflateSetHeader
69#define deflateTune Cr_z_deflateTune
70#define deflate_copyright Cr_z_deflate_copyright
71#define get_crc_table Cr_z_get_crc_table
72#define gz_error Cr_z_gz_error
73#define gz_intmax Cr_z_gz_intmax
74#define gz_strwinerror Cr_z_gz_strwinerror
75#define gzbuffer Cr_z_gzbuffer
76#define gzclearerr Cr_z_gzclearerr
77#define gzclose Cr_z_gzclose
78#define gzclose_r Cr_z_gzclose_r
79#define gzclose_w Cr_z_gzclose_w
80#define gzdirect Cr_z_gzdirect
81#define gzdopen Cr_z_gzdopen
82#define gzeof Cr_z_gzeof
83#define gzerror Cr_z_gzerror
84#define gzflush Cr_z_gzflush
85#define gzfread Cr_z_gzfread
86#define gzfwrite Cr_z_gzfwrite
87#define gzgetc Cr_z_gzgetc
88#define gzgetc_ Cr_z_gzgetc_
89#define gzgets Cr_z_gzgets
90#define gzoffset Cr_z_gzoffset
91#define gzoffset64 Cr_z_gzoffset64
92#define gzopen Cr_z_gzopen
93#define gzopen64 Cr_z_gzopen64
94#define gzopen_w Cr_z_gzopen_w
95#define gzprintf Cr_z_gzprintf
96#define gzputc Cr_z_gzputc
97#define gzputs Cr_z_gzputs
98#define gzread Cr_z_gzread
99#define gzrewind Cr_z_gzrewind
100#define gzseek Cr_z_gzseek
101#define gzseek64 Cr_z_gzseek64
102#define gzsetparams Cr_z_gzsetparams
103#define gztell Cr_z_gztell
104#define gztell64 Cr_z_gztell64
105#define gzungetc Cr_z_gzungetc
106#define gzvprintf Cr_z_gzvprintf
107#define gzwrite Cr_z_gzwrite
108#define inflate Cr_z_inflate
109#define inflateBack Cr_z_inflateBack
110#define inflateBackEnd Cr_z_inflateBackEnd
111/* #undef inflateBackInit */
112#define inflateBackInit_ Cr_z_inflateBackInit_
113#define inflateCodesUsed Cr_z_inflateCodesUsed
114#define inflateCopy Cr_z_inflateCopy
115#define inflateEnd Cr_z_inflateEnd
116#define inflateGetDictionary Cr_z_inflateGetDictionary
117#define inflateGetHeader Cr_z_inflateGetHeader
118/* #undef inflateInit */
119/* #undef inflateInit2 */
120#define inflateInit2_ Cr_z_inflateInit2_
121#define inflateInit_ Cr_z_inflateInit_
122#define inflateMark Cr_z_inflateMark
123#define inflatePrime Cr_z_inflatePrime
124#define inflateReset Cr_z_inflateReset
125#define inflateReset2 Cr_z_inflateReset2
126#define inflateResetKeep Cr_z_inflateResetKeep
127#define inflateSetDictionary Cr_z_inflateSetDictionary
128#define inflateSync Cr_z_inflateSync
129#define inflateSyncPoint Cr_z_inflateSyncPoint
130#define inflateUndermine Cr_z_inflateUndermine
131#define inflateValidate Cr_z_inflateValidate
132#define inflate_copyright Cr_z_inflate_copyright
133#define inflate_fast Cr_z_inflate_fast
134#define inflate_table Cr_z_inflate_table
135#define uncompress Cr_z_uncompress
136#define uncompress2 Cr_z_uncompress2
137#define zError Cr_z_zError
138#define zcalloc Cr_z_zcalloc
139#define zcfree Cr_z_zcfree
140#define zlibCompileFlags Cr_z_zlibCompileFlags
141#define zlibVersion Cr_z_zlibVersion
142/* #undef Byte */
143#define Bytef Cr_z_Bytef
144#define alloc_func Cr_z_alloc_func
145#define charf Cr_z_charf
146#define free_func Cr_z_free_func
147#define gzFile Cr_z_gzFile
148#define gz_header Cr_z_gz_header
149#define gz_headerp Cr_z_gz_headerp
150#define in_func Cr_z_in_func
151#define intf Cr_z_intf
152#define out_func Cr_z_out_func
153#define uInt Cr_z_uInt
154#define uIntf Cr_z_uIntf
155#define uLong Cr_z_uLong
156#define uLongf Cr_z_uLongf
157#define voidp Cr_z_voidp
158#define voidpc Cr_z_voidpc
159#define voidpf Cr_z_voidpf
160#define gz_header_s Cr_z_gz_header_s
Darin Fisher03559cc2019-07-19 21:26:12 +0000161/* #undef internal_state */
mark13dc2462017-02-14 22:15:29 -0800162/* #undef z_off64_t */
163
164/* An exported symbol that isn't handled by Z_PREFIX in zconf.h */
165#define z_errmsg Cr_z_z_errmsg
166
167/* Symbols added in simd.patch */
168#define copy_with_crc Cr_z_copy_with_crc
169#define crc_finalize Cr_z_crc_finalize
170#define crc_fold_512to32 Cr_z_crc_fold_512to32
171#define crc_fold_copy Cr_z_crc_fold_copy
172#define crc_fold_init Cr_z_crc_fold_init
173#define crc_reset Cr_z_crc_reset
174#define fill_window_sse Cr_z_fill_window_sse
Daniel Bratell2eb38892018-01-11 01:01:17 +0000175#define deflate_read_buf Cr_z_deflate_read_buf
mark13dc2462017-02-14 22:15:29 -0800176#define x86_check_features Cr_z_x86_check_features
177#define x86_cpu_enable_simd Cr_z_x86_cpu_enable_simd
178
Noel Gordon944e5802018-01-30 01:23:09 +0000179/* Symbols added by adler_simd.c */
Noel Gordon17bbb3d2017-09-29 19:44:25 +0000180#define adler32_simd_ Cr_z_adler32_simd_
Noel Gordon944e5802018-01-30 01:23:09 +0000181#define x86_cpu_enable_ssse3 Cr_z_x86_cpu_enable_ssse3
Noel Gordon17bbb3d2017-09-29 19:44:25 +0000182
Noel Gordon64ffef02017-12-08 11:39:34 +0000183/* Symbols added by contrib/optimizations/inffast_chunk */
184#define inflate_fast_chunk_ Cr_z_inflate_fast_chunk_
Noel Gordon64ffef02017-12-08 11:39:34 +0000185
Noel Gordon8e904b32018-01-04 12:10:08 +1100186/* Symbols added by crc32_simd.c */
187#define crc32_sse42_simd_ Cr_z_crc32_sse42_simd_
Noel Gordon8e904b32018-01-04 12:10:08 +1100188
Adenilson Cavalcanti72356722018-02-16 03:41:14 +0000189/* Symbols added by armv8_crc32 */
190#define arm_cpu_enable_crc32 Cr_z_arm_cpu_enable_crc32
191#define arm_cpu_enable_pmull Cr_z_arm_cpu_enable_pmull
192#define arm_check_features Cr_z_arm_check_features
193#define armv8_crc32_little Cr_z_armv8_crc32_little
194
Tom Anderson20c7ae12019-04-08 20:51:48 +0000195#endif /* THIRD_PARTY_ZLIB_CHROMECONF_H_ */