11cb0ef41Sopenharmony_ci/* Copyright 2017 The Chromium Authors 21cb0ef41Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be 31cb0ef41Sopenharmony_ci * found in the LICENSE file. */ 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci#ifndef THIRD_PARTY_ZLIB_CHROMECONF_H_ 61cb0ef41Sopenharmony_ci#define THIRD_PARTY_ZLIB_CHROMECONF_H_ 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ci#if defined(COMPONENT_BUILD) 91cb0ef41Sopenharmony_ci#if defined(WIN32) 101cb0ef41Sopenharmony_ci#if defined(ZLIB_IMPLEMENTATION) 111cb0ef41Sopenharmony_ci#define ZEXTERN __declspec(dllexport) 121cb0ef41Sopenharmony_ci#else 131cb0ef41Sopenharmony_ci#define ZEXTERN __declspec(dllimport) 141cb0ef41Sopenharmony_ci#endif 151cb0ef41Sopenharmony_ci#elif defined(ZLIB_IMPLEMENTATION) 161cb0ef41Sopenharmony_ci#define ZEXTERN __attribute__((visibility("default"))) 171cb0ef41Sopenharmony_ci#endif 181cb0ef41Sopenharmony_ci#endif 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_ci/* Rename all zlib names with a Cr_z_ prefix. This is based on the Z_PREFIX 211cb0ef41Sopenharmony_ci * option from zconf.h, but with a custom prefix. Where zconf.h would rename 221cb0ef41Sopenharmony_ci * both a macro and its underscore-suffixed internal implementation (such as 231cb0ef41Sopenharmony_ci * deflateInit2 and deflateInit2_), only the implementation is renamed here. 241cb0ef41Sopenharmony_ci * The Byte type is also omitted. 251cb0ef41Sopenharmony_ci * 261cb0ef41Sopenharmony_ci * To generate this list, run 271cb0ef41Sopenharmony_ci * sed -rn -e 's/^# *define +([^ ]+) +(z_[^ ]+)$/#define \1 Cr_\2/p' zconf.h 281cb0ef41Sopenharmony_ci * (use -E instead of -r on macOS). 291cb0ef41Sopenharmony_ci * 301cb0ef41Sopenharmony_ci * gzread is also addressed by modifications in gzread.c and zlib.h. */ 311cb0ef41Sopenharmony_ci 321cb0ef41Sopenharmony_ci#define Z_CR_PREFIX_SET 331cb0ef41Sopenharmony_ci 341cb0ef41Sopenharmony_ci#define _dist_code Cr_z__dist_code 351cb0ef41Sopenharmony_ci#define _length_code Cr_z__length_code 361cb0ef41Sopenharmony_ci#define _tr_align Cr_z__tr_align 371cb0ef41Sopenharmony_ci#define _tr_flush_bits Cr_z__tr_flush_bits 381cb0ef41Sopenharmony_ci#define _tr_flush_block Cr_z__tr_flush_block 391cb0ef41Sopenharmony_ci#define _tr_init Cr_z__tr_init 401cb0ef41Sopenharmony_ci#define _tr_stored_block Cr_z__tr_stored_block 411cb0ef41Sopenharmony_ci#define _tr_tally Cr_z__tr_tally 421cb0ef41Sopenharmony_ci#define adler32 Cr_z_adler32 431cb0ef41Sopenharmony_ci#define adler32_combine Cr_z_adler32_combine 441cb0ef41Sopenharmony_ci#define adler32_combine64 Cr_z_adler32_combine64 451cb0ef41Sopenharmony_ci#define adler32_z Cr_z_adler32_z 461cb0ef41Sopenharmony_ci#define compress Cr_z_compress 471cb0ef41Sopenharmony_ci#define compress2 Cr_z_compress2 481cb0ef41Sopenharmony_ci#define compressBound Cr_z_compressBound 491cb0ef41Sopenharmony_ci#define crc32 Cr_z_crc32 501cb0ef41Sopenharmony_ci#define crc32_combine Cr_z_crc32_combine 511cb0ef41Sopenharmony_ci#define crc32_combine64 Cr_z_crc32_combine64 521cb0ef41Sopenharmony_ci#define crc32_combine_gen64 Cr_z_crc32_combine_gen64 531cb0ef41Sopenharmony_ci#define crc32_combine_gen Cr_z_crc32_combine_gen 541cb0ef41Sopenharmony_ci#define crc32_combine_op Cr_z_crc32_combine_op 551cb0ef41Sopenharmony_ci#define crc32_z Cr_z_crc32_z 561cb0ef41Sopenharmony_ci#define deflate Cr_z_deflate 571cb0ef41Sopenharmony_ci#define deflateBound Cr_z_deflateBound 581cb0ef41Sopenharmony_ci#define deflateCopy Cr_z_deflateCopy 591cb0ef41Sopenharmony_ci#define deflateEnd Cr_z_deflateEnd 601cb0ef41Sopenharmony_ci#define deflateGetDictionary Cr_z_deflateGetDictionary 611cb0ef41Sopenharmony_ci/* #undef deflateInit */ 621cb0ef41Sopenharmony_ci/* #undef deflateInit2 */ 631cb0ef41Sopenharmony_ci#define deflateInit2_ Cr_z_deflateInit2_ 641cb0ef41Sopenharmony_ci#define deflateInit_ Cr_z_deflateInit_ 651cb0ef41Sopenharmony_ci#define deflateParams Cr_z_deflateParams 661cb0ef41Sopenharmony_ci#define deflatePending Cr_z_deflatePending 671cb0ef41Sopenharmony_ci#define deflatePrime Cr_z_deflatePrime 681cb0ef41Sopenharmony_ci#define deflateReset Cr_z_deflateReset 691cb0ef41Sopenharmony_ci#define deflateResetKeep Cr_z_deflateResetKeep 701cb0ef41Sopenharmony_ci#define deflateSetDictionary Cr_z_deflateSetDictionary 711cb0ef41Sopenharmony_ci#define deflateSetHeader Cr_z_deflateSetHeader 721cb0ef41Sopenharmony_ci#define deflateTune Cr_z_deflateTune 731cb0ef41Sopenharmony_ci#define deflate_copyright Cr_z_deflate_copyright 741cb0ef41Sopenharmony_ci#define get_crc_table Cr_z_get_crc_table 751cb0ef41Sopenharmony_ci#define gz_error Cr_z_gz_error 761cb0ef41Sopenharmony_ci#define gz_intmax Cr_z_gz_intmax 771cb0ef41Sopenharmony_ci#define gz_strwinerror Cr_z_gz_strwinerror 781cb0ef41Sopenharmony_ci#define gzbuffer Cr_z_gzbuffer 791cb0ef41Sopenharmony_ci#define gzclearerr Cr_z_gzclearerr 801cb0ef41Sopenharmony_ci#define gzclose Cr_z_gzclose 811cb0ef41Sopenharmony_ci#define gzclose_r Cr_z_gzclose_r 821cb0ef41Sopenharmony_ci#define gzclose_w Cr_z_gzclose_w 831cb0ef41Sopenharmony_ci#define gzdirect Cr_z_gzdirect 841cb0ef41Sopenharmony_ci#define gzdopen Cr_z_gzdopen 851cb0ef41Sopenharmony_ci#define gzeof Cr_z_gzeof 861cb0ef41Sopenharmony_ci#define gzerror Cr_z_gzerror 871cb0ef41Sopenharmony_ci#define gzflush Cr_z_gzflush 881cb0ef41Sopenharmony_ci#define gzfread Cr_z_gzfread 891cb0ef41Sopenharmony_ci#define gzfwrite Cr_z_gzfwrite 901cb0ef41Sopenharmony_ci#define gzgetc Cr_z_gzgetc 911cb0ef41Sopenharmony_ci#define gzgetc_ Cr_z_gzgetc_ 921cb0ef41Sopenharmony_ci#define gzgets Cr_z_gzgets 931cb0ef41Sopenharmony_ci#define gzoffset Cr_z_gzoffset 941cb0ef41Sopenharmony_ci#define gzoffset64 Cr_z_gzoffset64 951cb0ef41Sopenharmony_ci#define gzopen Cr_z_gzopen 961cb0ef41Sopenharmony_ci#define gzopen64 Cr_z_gzopen64 971cb0ef41Sopenharmony_ci#define gzopen_w Cr_z_gzopen_w 981cb0ef41Sopenharmony_ci#define gzprintf Cr_z_gzprintf 991cb0ef41Sopenharmony_ci#define gzputc Cr_z_gzputc 1001cb0ef41Sopenharmony_ci#define gzputs Cr_z_gzputs 1011cb0ef41Sopenharmony_ci#define gzread Cr_z_gzread 1021cb0ef41Sopenharmony_ci#define gzrewind Cr_z_gzrewind 1031cb0ef41Sopenharmony_ci#define gzseek Cr_z_gzseek 1041cb0ef41Sopenharmony_ci#define gzseek64 Cr_z_gzseek64 1051cb0ef41Sopenharmony_ci#define gzsetparams Cr_z_gzsetparams 1061cb0ef41Sopenharmony_ci#define gztell Cr_z_gztell 1071cb0ef41Sopenharmony_ci#define gztell64 Cr_z_gztell64 1081cb0ef41Sopenharmony_ci#define gzungetc Cr_z_gzungetc 1091cb0ef41Sopenharmony_ci#define gzvprintf Cr_z_gzvprintf 1101cb0ef41Sopenharmony_ci#define gzwrite Cr_z_gzwrite 1111cb0ef41Sopenharmony_ci#define inflate Cr_z_inflate 1121cb0ef41Sopenharmony_ci#define inflateBack Cr_z_inflateBack 1131cb0ef41Sopenharmony_ci#define inflateBackEnd Cr_z_inflateBackEnd 1141cb0ef41Sopenharmony_ci/* #undef inflateBackInit */ 1151cb0ef41Sopenharmony_ci#define inflateBackInit_ Cr_z_inflateBackInit_ 1161cb0ef41Sopenharmony_ci#define inflateCodesUsed Cr_z_inflateCodesUsed 1171cb0ef41Sopenharmony_ci#define inflateCopy Cr_z_inflateCopy 1181cb0ef41Sopenharmony_ci#define inflateEnd Cr_z_inflateEnd 1191cb0ef41Sopenharmony_ci#define inflateGetDictionary Cr_z_inflateGetDictionary 1201cb0ef41Sopenharmony_ci#define inflateGetHeader Cr_z_inflateGetHeader 1211cb0ef41Sopenharmony_ci/* #undef inflateInit */ 1221cb0ef41Sopenharmony_ci/* #undef inflateInit2 */ 1231cb0ef41Sopenharmony_ci#define inflateInit2_ Cr_z_inflateInit2_ 1241cb0ef41Sopenharmony_ci#define inflateInit_ Cr_z_inflateInit_ 1251cb0ef41Sopenharmony_ci#define inflateMark Cr_z_inflateMark 1261cb0ef41Sopenharmony_ci#define inflatePrime Cr_z_inflatePrime 1271cb0ef41Sopenharmony_ci#define inflateReset Cr_z_inflateReset 1281cb0ef41Sopenharmony_ci#define inflateReset2 Cr_z_inflateReset2 1291cb0ef41Sopenharmony_ci#define inflateResetKeep Cr_z_inflateResetKeep 1301cb0ef41Sopenharmony_ci#define inflateSetDictionary Cr_z_inflateSetDictionary 1311cb0ef41Sopenharmony_ci#define inflateSync Cr_z_inflateSync 1321cb0ef41Sopenharmony_ci#define inflateSyncPoint Cr_z_inflateSyncPoint 1331cb0ef41Sopenharmony_ci#define inflateUndermine Cr_z_inflateUndermine 1341cb0ef41Sopenharmony_ci#define inflateValidate Cr_z_inflateValidate 1351cb0ef41Sopenharmony_ci#define inflate_copyright Cr_z_inflate_copyright 1361cb0ef41Sopenharmony_ci#define inflate_fast Cr_z_inflate_fast 1371cb0ef41Sopenharmony_ci#define inflate_table Cr_z_inflate_table 1381cb0ef41Sopenharmony_ci#define uncompress Cr_z_uncompress 1391cb0ef41Sopenharmony_ci#define uncompress2 Cr_z_uncompress2 1401cb0ef41Sopenharmony_ci#define zError Cr_z_zError 1411cb0ef41Sopenharmony_ci#define zcalloc Cr_z_zcalloc 1421cb0ef41Sopenharmony_ci#define zcfree Cr_z_zcfree 1431cb0ef41Sopenharmony_ci#define zlibCompileFlags Cr_z_zlibCompileFlags 1441cb0ef41Sopenharmony_ci#define zlibVersion Cr_z_zlibVersion 1451cb0ef41Sopenharmony_ci/* #undef Byte */ 1461cb0ef41Sopenharmony_ci#define Bytef Cr_z_Bytef 1471cb0ef41Sopenharmony_ci#define alloc_func Cr_z_alloc_func 1481cb0ef41Sopenharmony_ci#define charf Cr_z_charf 1491cb0ef41Sopenharmony_ci#define free_func Cr_z_free_func 1501cb0ef41Sopenharmony_ci#define gzFile Cr_z_gzFile 1511cb0ef41Sopenharmony_ci#define gz_header Cr_z_gz_header 1521cb0ef41Sopenharmony_ci#define gz_headerp Cr_z_gz_headerp 1531cb0ef41Sopenharmony_ci#define in_func Cr_z_in_func 1541cb0ef41Sopenharmony_ci#define intf Cr_z_intf 1551cb0ef41Sopenharmony_ci#define out_func Cr_z_out_func 1561cb0ef41Sopenharmony_ci#define uInt Cr_z_uInt 1571cb0ef41Sopenharmony_ci#define uIntf Cr_z_uIntf 1581cb0ef41Sopenharmony_ci#define uLong Cr_z_uLong 1591cb0ef41Sopenharmony_ci#define uLongf Cr_z_uLongf 1601cb0ef41Sopenharmony_ci#define voidp Cr_z_voidp 1611cb0ef41Sopenharmony_ci#define voidpc Cr_z_voidpc 1621cb0ef41Sopenharmony_ci#define voidpf Cr_z_voidpf 1631cb0ef41Sopenharmony_ci#define gz_header_s Cr_z_gz_header_s 1641cb0ef41Sopenharmony_ci/* #undef internal_state */ 1651cb0ef41Sopenharmony_ci/* #undef z_off64_t */ 1661cb0ef41Sopenharmony_ci 1671cb0ef41Sopenharmony_ci/* An exported symbol that isn't handled by Z_PREFIX in zconf.h */ 1681cb0ef41Sopenharmony_ci#define z_errmsg Cr_z_z_errmsg 1691cb0ef41Sopenharmony_ci 1701cb0ef41Sopenharmony_ci/* Symbols added in simd.patch */ 1711cb0ef41Sopenharmony_ci#define copy_with_crc Cr_z_copy_with_crc 1721cb0ef41Sopenharmony_ci#define crc_finalize Cr_z_crc_finalize 1731cb0ef41Sopenharmony_ci#define crc_fold_512to32 Cr_z_crc_fold_512to32 1741cb0ef41Sopenharmony_ci#define crc_fold_copy Cr_z_crc_fold_copy 1751cb0ef41Sopenharmony_ci#define crc_fold_init Cr_z_crc_fold_init 1761cb0ef41Sopenharmony_ci#define crc_reset Cr_z_crc_reset 1771cb0ef41Sopenharmony_ci#define fill_window_sse Cr_z_fill_window_sse 1781cb0ef41Sopenharmony_ci#define deflate_read_buf Cr_z_deflate_read_buf 1791cb0ef41Sopenharmony_ci#define x86_check_features Cr_z_x86_check_features 1801cb0ef41Sopenharmony_ci#define x86_cpu_enable_simd Cr_z_x86_cpu_enable_simd 1811cb0ef41Sopenharmony_ci 1821cb0ef41Sopenharmony_ci/* Symbols added by adler_simd.c */ 1831cb0ef41Sopenharmony_ci#define adler32_simd_ Cr_z_adler32_simd_ 1841cb0ef41Sopenharmony_ci#define x86_cpu_enable_ssse3 Cr_z_x86_cpu_enable_ssse3 1851cb0ef41Sopenharmony_ci 1861cb0ef41Sopenharmony_ci/* Symbols added by contrib/optimizations/inffast_chunk */ 1871cb0ef41Sopenharmony_ci#define inflate_fast_chunk_ Cr_z_inflate_fast_chunk_ 1881cb0ef41Sopenharmony_ci 1891cb0ef41Sopenharmony_ci/* Symbols added by crc32_simd.c */ 1901cb0ef41Sopenharmony_ci#define crc32_sse42_simd_ Cr_z_crc32_sse42_simd_ 1911cb0ef41Sopenharmony_ci 1921cb0ef41Sopenharmony_ci/* Symbols added by armv8_crc32 */ 1931cb0ef41Sopenharmony_ci#define arm_cpu_enable_crc32 Cr_z_arm_cpu_enable_crc32 1941cb0ef41Sopenharmony_ci#define arm_cpu_enable_pmull Cr_z_arm_cpu_enable_pmull 1951cb0ef41Sopenharmony_ci#define arm_check_features Cr_z_arm_check_features 1961cb0ef41Sopenharmony_ci#define armv8_crc32_little Cr_z_armv8_crc32_little 1971cb0ef41Sopenharmony_ci#define armv8_crc32_pmull_little Cr_z_armv8_crc32_pmull_little 1981cb0ef41Sopenharmony_ci 1991cb0ef41Sopenharmony_ci/* Symbols added by cpu_features.c */ 2001cb0ef41Sopenharmony_ci#define cpu_check_features Cr_z_cpu_check_features 2011cb0ef41Sopenharmony_ci#define x86_cpu_enable_sse2 Cr_z_x86_cpu_enable_sse2 2021cb0ef41Sopenharmony_ci 2031cb0ef41Sopenharmony_ci#endif /* THIRD_PARTY_ZLIB_CHROMECONF_H_ */ 204