chromeconf.h 6.8 KB

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