clickhouse-native 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. checksums.yaml +7 -0
  2. data/ext/clickhouse_native/client.cpp +847 -0
  3. data/ext/clickhouse_native/extconf.rb +101 -0
  4. data/ext/clickhouse_native/vendor/clickhouse-cpp/.clang-format +11 -0
  5. data/ext/clickhouse_native/vendor/clickhouse-cpp/.git +1 -0
  6. data/ext/clickhouse_native/vendor/clickhouse-cpp/.gitattributes +63 -0
  7. data/ext/clickhouse_native/vendor/clickhouse-cpp/.github/CODEOWNERS +1 -0
  8. data/ext/clickhouse_native/vendor/clickhouse-cpp/.github/workflows/linux.yml +139 -0
  9. data/ext/clickhouse_native/vendor/clickhouse-cpp/.github/workflows/macos.yml +87 -0
  10. data/ext/clickhouse_native/vendor/clickhouse-cpp/.github/workflows/windows_mingw.yml +102 -0
  11. data/ext/clickhouse_native/vendor/clickhouse-cpp/.github/workflows/windows_msvc.yml +74 -0
  12. data/ext/clickhouse_native/vendor/clickhouse-cpp/.gitignore +280 -0
  13. data/ext/clickhouse_native/vendor/clickhouse-cpp/.travis.yml +62 -0
  14. data/ext/clickhouse_native/vendor/clickhouse-cpp/CMakeLists.txt +157 -0
  15. data/ext/clickhouse_native/vendor/clickhouse-cpp/LICENSE +206 -0
  16. data/ext/clickhouse_native/vendor/clickhouse-cpp/README.md +260 -0
  17. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/CMakeLists.txt +246 -0
  18. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/buffer.h +10 -0
  19. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/compressed.cpp +258 -0
  20. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/compressed.h +48 -0
  21. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/endpoints_iterator.cpp +20 -0
  22. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/endpoints_iterator.h +34 -0
  23. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/input.cpp +96 -0
  24. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/input.h +103 -0
  25. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/open_telemetry.h +23 -0
  26. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/output.cpp +119 -0
  27. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/output.h +142 -0
  28. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/platform.cpp +1 -0
  29. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/platform.h +33 -0
  30. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/projected_iterator.h +55 -0
  31. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/singleton.h +11 -0
  32. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/socket.cpp +489 -0
  33. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/socket.h +177 -0
  34. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/sslsocket.cpp +307 -0
  35. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/sslsocket.h +111 -0
  36. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/string_utils.h +28 -0
  37. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/string_view.h +142 -0
  38. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/uuid.h +10 -0
  39. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/wire_format.cpp +177 -0
  40. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/base/wire_format.h +79 -0
  41. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/block.cpp +134 -0
  42. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/block.h +114 -0
  43. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/client.cpp +1269 -0
  44. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/client.h +320 -0
  45. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/array.cpp +175 -0
  46. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/array.h +321 -0
  47. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/column.cpp +24 -0
  48. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/column.h +107 -0
  49. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/date.cpp +365 -0
  50. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/date.h +245 -0
  51. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/decimal.cpp +255 -0
  52. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/decimal.h +50 -0
  53. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/enum.cpp +123 -0
  54. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/enum.h +65 -0
  55. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/factory.cpp +285 -0
  56. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/factory.h +14 -0
  57. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/geo.cpp +108 -0
  58. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/geo.h +79 -0
  59. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/ip4.cpp +117 -0
  60. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/ip4.h +71 -0
  61. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/ip6.cpp +108 -0
  62. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/ip6.h +66 -0
  63. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/itemview.cpp +101 -0
  64. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/itemview.h +86 -0
  65. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/lowcardinality.cpp +527 -0
  66. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/lowcardinality.h +221 -0
  67. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/lowcardinalityadaptor.h +63 -0
  68. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/map.cpp +87 -0
  69. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/map.h +257 -0
  70. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/nothing.h +87 -0
  71. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/nullable.cpp +109 -0
  72. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/nullable.h +153 -0
  73. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/numeric.cpp +126 -0
  74. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/numeric.h +88 -0
  75. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/string.cpp +333 -0
  76. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/string.h +145 -0
  77. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/time.cpp +155 -0
  78. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/time.h +118 -0
  79. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/tuple.cpp +106 -0
  80. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/tuple.h +178 -0
  81. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/utils.h +41 -0
  82. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/uuid.cpp +80 -0
  83. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/columns/uuid.h +58 -0
  84. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/error_codes.h +595 -0
  85. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/exceptions.h +66 -0
  86. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/protocol.h +54 -0
  87. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/query.cpp +25 -0
  88. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/query.h +246 -0
  89. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/server_exception.h +16 -0
  90. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/types/type_parser.cpp +314 -0
  91. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/types/type_parser.h +89 -0
  92. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/types/types.cpp +484 -0
  93. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/types/types.h +397 -0
  94. data/ext/clickhouse_native/vendor/clickhouse-cpp/clickhouse/version.h +14 -0
  95. data/ext/clickhouse_native/vendor/clickhouse-cpp/cmake/Findcityhash.cmake +26 -0
  96. data/ext/clickhouse_native/vendor/clickhouse-cpp/cmake/Findlz4.cmake +39 -0
  97. data/ext/clickhouse_native/vendor/clickhouse-cpp/cmake/Findzstd.cmake +39 -0
  98. data/ext/clickhouse_native/vendor/clickhouse-cpp/cmake/cpp17.cmake +8 -0
  99. data/ext/clickhouse_native/vendor/clickhouse-cpp/cmake/openssl.cmake +8 -0
  100. data/ext/clickhouse_native/vendor/clickhouse-cpp/cmake/subdirs.cmake +5 -0
  101. data/ext/clickhouse_native/vendor/clickhouse-cpp/cmake/version.cmake +87 -0
  102. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/CMakeLists.txt +9 -0
  103. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/base/attributes.h +682 -0
  104. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/base/config.h +714 -0
  105. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/base/internal/bits.h +219 -0
  106. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/base/macros.h +147 -0
  107. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/base/optimization.h +241 -0
  108. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/base/options.h +238 -0
  109. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/base/policy_checks.h +111 -0
  110. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/base/port.h +26 -0
  111. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/numeric/int128.cc +390 -0
  112. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/numeric/int128.h +1092 -0
  113. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/numeric/int128_have_intrinsic.inc +302 -0
  114. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/absl/absl/numeric/int128_no_intrinsic.inc +308 -0
  115. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/cityhash/cityhash/BUCK +13 -0
  116. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/cityhash/cityhash/CMakeLists.txt +7 -0
  117. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/cityhash/cityhash/COPYING +19 -0
  118. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/cityhash/cityhash/city.cc +469 -0
  119. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/cityhash/cityhash/city.h +90 -0
  120. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/cityhash/cityhash/citycrc.h +43 -0
  121. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/cityhash/cityhash/config.h +118 -0
  122. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/BUCK +14 -0
  123. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/CMakeLists.txt +4 -0
  124. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/LICENSE +28 -0
  125. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/README.md +1 -0
  126. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/gtest-death-test.h +346 -0
  127. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/gtest-matchers.h +930 -0
  128. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/gtest-message.h +219 -0
  129. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/gtest-param-test.h +507 -0
  130. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/gtest-printers.h +1029 -0
  131. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/gtest-spi.h +238 -0
  132. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/gtest-test-part.h +184 -0
  133. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/gtest-typed-test.h +329 -0
  134. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/gtest.h +2495 -0
  135. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/gtest_pred_impl.h +359 -0
  136. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/gtest_prod.h +61 -0
  137. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/custom/README.md +56 -0
  138. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/custom/gtest-port.h +37 -0
  139. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/custom/gtest-printers.h +42 -0
  140. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/custom/gtest.h +37 -0
  141. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/gtest-death-test-internal.h +304 -0
  142. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/gtest-filepath.h +211 -0
  143. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/gtest-internal.h +1560 -0
  144. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/gtest-param-util.h +947 -0
  145. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/gtest-port-arch.h +114 -0
  146. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/gtest-port.h +2389 -0
  147. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/gtest-string.h +175 -0
  148. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/include/gtest/internal/gtest-type-util.h +183 -0
  149. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/src/gtest-all.cc +48 -0
  150. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/src/gtest-death-test.cc +1644 -0
  151. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/src/gtest-filepath.cc +369 -0
  152. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/src/gtest-internal-inl.h +1221 -0
  153. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/src/gtest-matchers.cc +97 -0
  154. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/src/gtest-port.cc +1433 -0
  155. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/src/gtest-printers.cc +533 -0
  156. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/src/gtest-test-part.cc +108 -0
  157. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/src/gtest-typed-test.cc +107 -0
  158. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/src/gtest.cc +6746 -0
  159. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/gtest/src/gtest_main.cc +54 -0
  160. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/lz4/lz4/BUCK +13 -0
  161. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/lz4/lz4/CMakeLists.txt +8 -0
  162. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/lz4/lz4/LICENSE +24 -0
  163. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/lz4/lz4/lz4.c +2402 -0
  164. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/lz4/lz4/lz4.h +764 -0
  165. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/lz4/lz4/lz4hc.c +1554 -0
  166. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/lz4/lz4/lz4hc.h +438 -0
  167. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/BUCK +232 -0
  168. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/CMakeLists.txt +115 -0
  169. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/LICENSE +30 -0
  170. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/allocations.h +55 -0
  171. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/bits.h +200 -0
  172. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/bitstream.h +437 -0
  173. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/compiler.h +358 -0
  174. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/cpu.h +213 -0
  175. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/debug.c +24 -0
  176. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/debug.h +107 -0
  177. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/entropy_common.c +340 -0
  178. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/error_private.c +63 -0
  179. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/error_private.h +159 -0
  180. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/fse.h +639 -0
  181. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/fse_decompress.c +311 -0
  182. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/huf.h +273 -0
  183. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/mem.h +435 -0
  184. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/pool.c +371 -0
  185. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/pool.h +90 -0
  186. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/portability_macros.h +156 -0
  187. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/threading.c +176 -0
  188. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/threading.h +150 -0
  189. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/xxhash.c +24 -0
  190. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/xxhash.h +5686 -0
  191. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/zstd_common.c +48 -0
  192. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/zstd_deps.h +111 -0
  193. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/zstd_internal.h +392 -0
  194. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/common/zstd_trace.h +163 -0
  195. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/clevels.h +134 -0
  196. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/fse_compress.c +624 -0
  197. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/hist.c +181 -0
  198. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/hist.h +75 -0
  199. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/huf_compress.c +1435 -0
  200. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_compress.c +7032 -0
  201. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_compress_internal.h +1532 -0
  202. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_compress_literals.c +235 -0
  203. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_compress_literals.h +39 -0
  204. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_compress_sequences.c +442 -0
  205. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_compress_sequences.h +54 -0
  206. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_compress_superblock.c +577 -0
  207. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_compress_superblock.h +32 -0
  208. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_cwksp.h +742 -0
  209. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_double_fast.c +758 -0
  210. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_double_fast.h +39 -0
  211. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_fast.c +960 -0
  212. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_fast.h +38 -0
  213. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_lazy.c +2157 -0
  214. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_lazy.h +127 -0
  215. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_ldm.c +724 -0
  216. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_ldm.h +117 -0
  217. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_ldm_geartab.h +106 -0
  218. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_opt.c +1472 -0
  219. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstd_opt.h +56 -0
  220. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstdmt_compress.c +1867 -0
  221. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/compress/zstdmt_compress.h +113 -0
  222. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/decompress/huf_decompress.c +1882 -0
  223. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/decompress/huf_decompress_amd64.S +576 -0
  224. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/decompress/zstd_ddict.c +244 -0
  225. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/decompress/zstd_ddict.h +44 -0
  226. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/decompress/zstd_decompress.c +2355 -0
  227. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/decompress/zstd_decompress_block.c +2192 -0
  228. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/decompress/zstd_decompress_block.h +73 -0
  229. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/decompress/zstd_decompress_internal.h +238 -0
  230. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/dictBuilder/cover.c +1257 -0
  231. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/dictBuilder/cover.h +158 -0
  232. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/dictBuilder/divsufsort.c +1913 -0
  233. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/dictBuilder/divsufsort.h +67 -0
  234. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/dictBuilder/fastcover.c +766 -0
  235. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/dictBuilder/zdict.c +1127 -0
  236. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_legacy.h +422 -0
  237. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v01.c +2125 -0
  238. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v01.h +94 -0
  239. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v02.c +3477 -0
  240. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v02.h +93 -0
  241. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v03.c +3117 -0
  242. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v03.h +93 -0
  243. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v04.c +3605 -0
  244. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v04.h +142 -0
  245. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v05.c +4004 -0
  246. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v05.h +162 -0
  247. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v06.c +4113 -0
  248. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v06.h +172 -0
  249. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v07.c +4498 -0
  250. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/legacy/zstd_v07.h +187 -0
  251. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/zdict.h +474 -0
  252. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/zstd.h +3020 -0
  253. data/ext/clickhouse_native/vendor/clickhouse-cpp/contrib/zstd/zstd/zstd_errors.h +114 -0
  254. data/lib/clickhouse_native/clickhouse_native.bundle +0 -0
  255. data/lib/clickhouse_native/client.rb +50 -0
  256. data/lib/clickhouse_native/errors.rb +23 -0
  257. data/lib/clickhouse_native/pool.rb +49 -0
  258. data/lib/clickhouse_native/version.rb +3 -0
  259. data/lib/clickhouse_native.rb +8 -0
  260. metadata +369 -0
@@ -0,0 +1,714 @@
1
+ //
2
+ // Copyright 2017 The Abseil Authors.
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // -----------------------------------------------------------------------------
17
+ // File: config.h
18
+ // -----------------------------------------------------------------------------
19
+ //
20
+ // This header file defines a set of macros for checking the presence of
21
+ // important compiler and platform features. Such macros can be used to
22
+ // produce portable code by parameterizing compilation based on the presence or
23
+ // lack of a given feature.
24
+ //
25
+ // We define a "feature" as some interface we wish to program to: for example,
26
+ // a library function or system call. A value of `1` indicates support for
27
+ // that feature; any other value indicates the feature support is undefined.
28
+ //
29
+ // Example:
30
+ //
31
+ // Suppose a programmer wants to write a program that uses the 'mmap()' system
32
+ // call. The Abseil macro for that feature (`ABSL_HAVE_MMAP`) allows you to
33
+ // selectively include the `mmap.h` header and bracket code using that feature
34
+ // in the macro:
35
+ //
36
+ // #include "absl/base/config.h"
37
+ //
38
+ // #ifdef ABSL_HAVE_MMAP
39
+ // #include "sys/mman.h"
40
+ // #endif //ABSL_HAVE_MMAP
41
+ //
42
+ // ...
43
+ // #ifdef ABSL_HAVE_MMAP
44
+ // void *ptr = mmap(...);
45
+ // ...
46
+ // #endif // ABSL_HAVE_MMAP
47
+
48
+ #ifndef ABSL_BASE_CONFIG_H_
49
+ #define ABSL_BASE_CONFIG_H_
50
+
51
+ // Included for the __GLIBC__ macro (or similar macros on other systems).
52
+ #include <limits.h>
53
+
54
+ #ifdef __cplusplus
55
+ // Included for __GLIBCXX__, _LIBCPP_VERSION
56
+ #include <cstddef>
57
+ #endif // __cplusplus
58
+
59
+ #if defined(__APPLE__)
60
+ // Included for TARGET_OS_IPHONE, __IPHONE_OS_VERSION_MIN_REQUIRED,
61
+ // __IPHONE_8_0.
62
+ #include <Availability.h>
63
+ #include <TargetConditionals.h>
64
+ #endif
65
+
66
+ #include "absl/base/options.h"
67
+ #include "absl/base/policy_checks.h"
68
+
69
+ // Helper macro to convert a CPP variable to a string literal.
70
+ #define ABSL_INTERNAL_DO_TOKEN_STR(x) #x
71
+ #define ABSL_INTERNAL_TOKEN_STR(x) ABSL_INTERNAL_DO_TOKEN_STR(x)
72
+
73
+ // -----------------------------------------------------------------------------
74
+ // Abseil namespace annotations
75
+ // -----------------------------------------------------------------------------
76
+
77
+ // ABSL_NAMESPACE_BEGIN/ABSL_NAMESPACE_END
78
+ //
79
+ // An annotation placed at the beginning/end of each `namespace absl` scope.
80
+ // This is used to inject an inline namespace.
81
+ //
82
+ // The proper way to write Abseil code in the `absl` namespace is:
83
+ //
84
+ // namespace absl {
85
+ // ABSL_NAMESPACE_BEGIN
86
+ //
87
+ // void Foo(); // absl::Foo().
88
+ //
89
+ // ABSL_NAMESPACE_END
90
+ // } // namespace absl
91
+ //
92
+ // Users of Abseil should not use these macros, because users of Abseil should
93
+ // not write `namespace absl {` in their own code for any reason. (Abseil does
94
+ // not support forward declarations of its own types, nor does it support
95
+ // user-provided specialization of Abseil templates. Code that violates these
96
+ // rules may be broken without warning.)
97
+ #if !defined(ABSL_OPTION_USE_INLINE_NAMESPACE) || \
98
+ !defined(ABSL_OPTION_INLINE_NAMESPACE_NAME)
99
+ #error options.h is misconfigured.
100
+ #endif
101
+
102
+ // Check that ABSL_OPTION_INLINE_NAMESPACE_NAME is neither "head" nor ""
103
+ #if defined(__cplusplus) && ABSL_OPTION_USE_INLINE_NAMESPACE == 1
104
+
105
+ #define ABSL_INTERNAL_INLINE_NAMESPACE_STR \
106
+ ABSL_INTERNAL_TOKEN_STR(ABSL_OPTION_INLINE_NAMESPACE_NAME)
107
+
108
+ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != '\0',
109
+ "options.h misconfigured: ABSL_OPTION_INLINE_NAMESPACE_NAME must "
110
+ "not be empty.");
111
+ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
112
+ ABSL_INTERNAL_INLINE_NAMESPACE_STR[1] != 'e' ||
113
+ ABSL_INTERNAL_INLINE_NAMESPACE_STR[2] != 'a' ||
114
+ ABSL_INTERNAL_INLINE_NAMESPACE_STR[3] != 'd' ||
115
+ ABSL_INTERNAL_INLINE_NAMESPACE_STR[4] != '\0',
116
+ "options.h misconfigured: ABSL_OPTION_INLINE_NAMESPACE_NAME must "
117
+ "be changed to a new, unique identifier name.");
118
+
119
+ #endif
120
+
121
+ #if ABSL_OPTION_USE_INLINE_NAMESPACE == 0
122
+ #define ABSL_NAMESPACE_BEGIN
123
+ #define ABSL_NAMESPACE_END
124
+ #elif ABSL_OPTION_USE_INLINE_NAMESPACE == 1
125
+ #define ABSL_NAMESPACE_BEGIN \
126
+ inline namespace ABSL_OPTION_INLINE_NAMESPACE_NAME {
127
+ #define ABSL_NAMESPACE_END }
128
+ #else
129
+ #error options.h is misconfigured.
130
+ #endif
131
+
132
+ // -----------------------------------------------------------------------------
133
+ // Compiler Feature Checks
134
+ // -----------------------------------------------------------------------------
135
+
136
+ // ABSL_HAVE_BUILTIN()
137
+ //
138
+ // Checks whether the compiler supports a Clang Feature Checking Macro, and if
139
+ // so, checks whether it supports the provided builtin function "x" where x
140
+ // is one of the functions noted in
141
+ // https://clang.llvm.org/docs/LanguageExtensions.html
142
+ //
143
+ // Note: Use this macro to avoid an extra level of #ifdef __has_builtin check.
144
+ // http://releases.llvm.org/3.3/tools/clang/docs/LanguageExtensions.html
145
+ #ifdef __has_builtin
146
+ #define ABSL_HAVE_BUILTIN(x) __has_builtin(x)
147
+ #else
148
+ #define ABSL_HAVE_BUILTIN(x) 0
149
+ #endif
150
+
151
+ #if defined(__is_identifier)
152
+ #define ABSL_INTERNAL_HAS_KEYWORD(x) !(__is_identifier(x))
153
+ #else
154
+ #define ABSL_INTERNAL_HAS_KEYWORD(x) 0
155
+ #endif
156
+
157
+ #ifdef __has_feature
158
+ #define ABSL_HAVE_FEATURE(f) __has_feature(f)
159
+ #else
160
+ #define ABSL_HAVE_FEATURE(f) 0
161
+ #endif
162
+
163
+ // ABSL_HAVE_TLS is defined to 1 when __thread should be supported.
164
+ // We assume __thread is supported on Linux when compiled with Clang or compiled
165
+ // against libstdc++ with _GLIBCXX_HAVE_TLS defined.
166
+ #ifdef ABSL_HAVE_TLS
167
+ #error ABSL_HAVE_TLS cannot be directly set
168
+ #elif defined(__linux__) && (defined(__clang__) || defined(_GLIBCXX_HAVE_TLS))
169
+ #define ABSL_HAVE_TLS 1
170
+ #endif
171
+
172
+ // ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE
173
+ //
174
+ // Checks whether `std::is_trivially_destructible<T>` is supported.
175
+ //
176
+ // Notes: All supported compilers using libc++ support this feature, as does
177
+ // gcc >= 4.8.1 using libstdc++, and Visual Studio.
178
+ #ifdef ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE
179
+ #error ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE cannot be directly set
180
+ #elif defined(_LIBCPP_VERSION) || \
181
+ (!defined(__clang__) && defined(__GNUC__) && defined(__GLIBCXX__) && \
182
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) || \
183
+ defined(_MSC_VER)
184
+ #define ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE 1
185
+ #endif
186
+
187
+ // ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE
188
+ //
189
+ // Checks whether `std::is_trivially_default_constructible<T>` and
190
+ // `std::is_trivially_copy_constructible<T>` are supported.
191
+
192
+ // ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE
193
+ //
194
+ // Checks whether `std::is_trivially_copy_assignable<T>` is supported.
195
+
196
+ // Notes: Clang with libc++ supports these features, as does gcc >= 5.1 with
197
+ // either libc++ or libstdc++, and Visual Studio (but not NVCC).
198
+ #if defined(ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE)
199
+ #error ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE cannot be directly set
200
+ #elif defined(ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE)
201
+ #error ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE cannot directly set
202
+ #elif (defined(__clang__) && defined(_LIBCPP_VERSION)) || \
203
+ (!defined(__clang__) && defined(__GNUC__) && \
204
+ (__GNUC__ > 7 || (__GNUC__ == 7 && __GNUC_MINOR__ >= 4)) && \
205
+ (defined(_LIBCPP_VERSION) || defined(__GLIBCXX__))) || \
206
+ (defined(_MSC_VER) && !defined(__NVCC__))
207
+ #define ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE 1
208
+ #define ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE 1
209
+ #endif
210
+
211
+ // ABSL_HAVE_SOURCE_LOCATION_CURRENT
212
+ //
213
+ // Indicates whether `absl::SourceLocation::current()` will return useful
214
+ // information in some contexts.
215
+ #ifndef ABSL_HAVE_SOURCE_LOCATION_CURRENT
216
+ #if ABSL_INTERNAL_HAS_KEYWORD(__builtin_LINE) && \
217
+ ABSL_INTERNAL_HAS_KEYWORD(__builtin_FILE)
218
+ #define ABSL_HAVE_SOURCE_LOCATION_CURRENT 1
219
+ #endif
220
+ #endif
221
+
222
+ // ABSL_HAVE_THREAD_LOCAL
223
+ //
224
+ // Checks whether C++11's `thread_local` storage duration specifier is
225
+ // supported.
226
+ #ifdef ABSL_HAVE_THREAD_LOCAL
227
+ #error ABSL_HAVE_THREAD_LOCAL cannot be directly set
228
+ #elif defined(__APPLE__)
229
+ // Notes:
230
+ // * Xcode's clang did not support `thread_local` until version 8, and
231
+ // even then not for all iOS < 9.0.
232
+ // * Xcode 9.3 started disallowing `thread_local` for 32-bit iOS simulator
233
+ // targeting iOS 9.x.
234
+ // * Xcode 10 moves the deployment target check for iOS < 9.0 to link time
235
+ // making ABSL_HAVE_FEATURE unreliable there.
236
+ //
237
+ #if ABSL_HAVE_FEATURE(cxx_thread_local) && \
238
+ !(TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0)
239
+ #define ABSL_HAVE_THREAD_LOCAL 1
240
+ #endif
241
+ #else // !defined(__APPLE__)
242
+ #define ABSL_HAVE_THREAD_LOCAL 1
243
+ #endif
244
+
245
+ // There are platforms for which TLS should not be used even though the compiler
246
+ // makes it seem like it's supported (Android NDK < r12b for example).
247
+ // This is primarily because of linker problems and toolchain misconfiguration:
248
+ // Abseil does not intend to support this indefinitely. Currently, the newest
249
+ // toolchain that we intend to support that requires this behavior is the
250
+ // r11 NDK - allowing for a 5 year support window on that means this option
251
+ // is likely to be removed around June of 2021.
252
+ // TLS isn't supported until NDK r12b per
253
+ // https://developer.android.com/ndk/downloads/revision_history.html
254
+ // Since NDK r16, `__NDK_MAJOR__` and `__NDK_MINOR__` are defined in
255
+ // <android/ndk-version.h>. For NDK < r16, users should define these macros,
256
+ // e.g. `-D__NDK_MAJOR__=11 -D__NKD_MINOR__=0` for NDK r11.
257
+ #if defined(__ANDROID__) && defined(__clang__)
258
+ #if __has_include(<android/ndk-version.h>)
259
+ #include <android/ndk-version.h>
260
+ #endif // __has_include(<android/ndk-version.h>)
261
+ #if defined(__ANDROID__) && defined(__clang__) && defined(__NDK_MAJOR__) && \
262
+ defined(__NDK_MINOR__) && \
263
+ ((__NDK_MAJOR__ < 12) || ((__NDK_MAJOR__ == 12) && (__NDK_MINOR__ < 1)))
264
+ #undef ABSL_HAVE_TLS
265
+ #undef ABSL_HAVE_THREAD_LOCAL
266
+ #endif
267
+ #endif // defined(__ANDROID__) && defined(__clang__)
268
+
269
+ // ABSL_HAVE_INTRINSIC_INT128
270
+ //
271
+ // Checks whether the __int128 compiler extension for a 128-bit integral type is
272
+ // supported.
273
+ //
274
+ // Note: __SIZEOF_INT128__ is defined by Clang and GCC when __int128 is
275
+ // supported, but we avoid using it in certain cases:
276
+ // * On Clang:
277
+ // * Building using Clang for Windows, where the Clang runtime library has
278
+ // 128-bit support only on LP64 architectures, but Windows is LLP64.
279
+ // * On Nvidia's nvcc:
280
+ // * nvcc also defines __GNUC__ and __SIZEOF_INT128__, but not all versions
281
+ // actually support __int128.
282
+ #ifdef ABSL_HAVE_INTRINSIC_INT128
283
+ #error ABSL_HAVE_INTRINSIC_INT128 cannot be directly set
284
+ #elif defined(__SIZEOF_INT128__)
285
+ #if (defined(__clang__) && !defined(_WIN32)) || \
286
+ (defined(__CUDACC__) && __CUDACC_VER_MAJOR__ >= 9) || \
287
+ (defined(__GNUC__) && !defined(__clang__) && !defined(__CUDACC__))
288
+ #define ABSL_HAVE_INTRINSIC_INT128 1
289
+ #elif defined(__CUDACC__)
290
+ // __CUDACC_VER__ is a full version number before CUDA 9, and is defined to a
291
+ // string explaining that it has been removed starting with CUDA 9. We use
292
+ // nested #ifs because there is no short-circuiting in the preprocessor.
293
+ // NOTE: `__CUDACC__` could be undefined while `__CUDACC_VER__` is defined.
294
+ #if __CUDACC_VER__ >= 70000
295
+ #define ABSL_HAVE_INTRINSIC_INT128 1
296
+ #endif // __CUDACC_VER__ >= 70000
297
+ #endif // defined(__CUDACC__)
298
+ #endif // ABSL_HAVE_INTRINSIC_INT128
299
+
300
+ // ABSL_HAVE_EXCEPTIONS
301
+ //
302
+ // Checks whether the compiler both supports and enables exceptions. Many
303
+ // compilers support a "no exceptions" mode that disables exceptions.
304
+ //
305
+ // Generally, when ABSL_HAVE_EXCEPTIONS is not defined:
306
+ //
307
+ // * Code using `throw` and `try` may not compile.
308
+ // * The `noexcept` specifier will still compile and behave as normal.
309
+ // * The `noexcept` operator may still return `false`.
310
+ //
311
+ // For further details, consult the compiler's documentation.
312
+ #ifdef ABSL_HAVE_EXCEPTIONS
313
+ #error ABSL_HAVE_EXCEPTIONS cannot be directly set.
314
+
315
+ #elif defined(__clang__)
316
+
317
+ #if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6)
318
+ // Clang >= 3.6
319
+ #if ABSL_HAVE_FEATURE(cxx_exceptions)
320
+ #define ABSL_HAVE_EXCEPTIONS 1
321
+ #endif // ABSL_HAVE_FEATURE(cxx_exceptions)
322
+ #else
323
+ // Clang < 3.6
324
+ // http://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html#the-exceptions-macro
325
+ #if defined(__EXCEPTIONS) && ABSL_HAVE_FEATURE(cxx_exceptions)
326
+ #define ABSL_HAVE_EXCEPTIONS 1
327
+ #endif // defined(__EXCEPTIONS) && ABSL_HAVE_FEATURE(cxx_exceptions)
328
+ #endif // __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6)
329
+
330
+ // Handle remaining special cases and default to exceptions being supported.
331
+ #elif !(defined(__GNUC__) && (__GNUC__ < 5) && !defined(__EXCEPTIONS)) && \
332
+ !(defined(__GNUC__) && (__GNUC__ >= 5) && !defined(__cpp_exceptions)) && \
333
+ !(defined(_MSC_VER) && !defined(_CPPUNWIND))
334
+ #define ABSL_HAVE_EXCEPTIONS 1
335
+ #endif
336
+
337
+ // -----------------------------------------------------------------------------
338
+ // Platform Feature Checks
339
+ // -----------------------------------------------------------------------------
340
+
341
+ // Currently supported operating systems and associated preprocessor
342
+ // symbols:
343
+ //
344
+ // Linux and Linux-derived __linux__
345
+ // Android __ANDROID__ (implies __linux__)
346
+ // Linux (non-Android) __linux__ && !__ANDROID__
347
+ // Darwin (macOS and iOS) __APPLE__
348
+ // Akaros (http://akaros.org) __ros__
349
+ // Windows _WIN32
350
+ // NaCL __native_client__
351
+ // AsmJS __asmjs__
352
+ // WebAssembly __wasm__
353
+ // Fuchsia __Fuchsia__
354
+ //
355
+ // Note that since Android defines both __ANDROID__ and __linux__, one
356
+ // may probe for either Linux or Android by simply testing for __linux__.
357
+
358
+ // ABSL_HAVE_MMAP
359
+ //
360
+ // Checks whether the platform has an mmap(2) implementation as defined in
361
+ // POSIX.1-2001.
362
+ #ifdef ABSL_HAVE_MMAP
363
+ #error ABSL_HAVE_MMAP cannot be directly set
364
+ #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
365
+ defined(__ros__) || defined(__native_client__) || defined(__asmjs__) || \
366
+ defined(__wasm__) || defined(__Fuchsia__) || defined(__sun) || \
367
+ defined(__ASYLO__)
368
+ #define ABSL_HAVE_MMAP 1
369
+ #endif
370
+
371
+ // ABSL_HAVE_PTHREAD_GETSCHEDPARAM
372
+ //
373
+ // Checks whether the platform implements the pthread_(get|set)schedparam(3)
374
+ // functions as defined in POSIX.1-2001.
375
+ #ifdef ABSL_HAVE_PTHREAD_GETSCHEDPARAM
376
+ #error ABSL_HAVE_PTHREAD_GETSCHEDPARAM cannot be directly set
377
+ #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
378
+ defined(__ros__)
379
+ #define ABSL_HAVE_PTHREAD_GETSCHEDPARAM 1
380
+ #endif
381
+
382
+ // ABSL_HAVE_SCHED_YIELD
383
+ //
384
+ // Checks whether the platform implements sched_yield(2) as defined in
385
+ // POSIX.1-2001.
386
+ #ifdef ABSL_HAVE_SCHED_YIELD
387
+ #error ABSL_HAVE_SCHED_YIELD cannot be directly set
388
+ #elif defined(__linux__) || defined(__ros__) || defined(__native_client__)
389
+ #define ABSL_HAVE_SCHED_YIELD 1
390
+ #endif
391
+
392
+ // ABSL_HAVE_SEMAPHORE_H
393
+ //
394
+ // Checks whether the platform supports the <semaphore.h> header and sem_init(3)
395
+ // family of functions as standardized in POSIX.1-2001.
396
+ //
397
+ // Note: While Apple provides <semaphore.h> for both iOS and macOS, it is
398
+ // explicitly deprecated and will cause build failures if enabled for those
399
+ // platforms. We side-step the issue by not defining it here for Apple
400
+ // platforms.
401
+ #ifdef ABSL_HAVE_SEMAPHORE_H
402
+ #error ABSL_HAVE_SEMAPHORE_H cannot be directly set
403
+ #elif defined(__linux__) || defined(__ros__)
404
+ #define ABSL_HAVE_SEMAPHORE_H 1
405
+ #endif
406
+
407
+ // ABSL_HAVE_ALARM
408
+ //
409
+ // Checks whether the platform supports the <signal.h> header and alarm(2)
410
+ // function as standardized in POSIX.1-2001.
411
+ #ifdef ABSL_HAVE_ALARM
412
+ #error ABSL_HAVE_ALARM cannot be directly set
413
+ #elif defined(__GOOGLE_GRTE_VERSION__)
414
+ // feature tests for Google's GRTE
415
+ #define ABSL_HAVE_ALARM 1
416
+ #elif defined(__GLIBC__)
417
+ // feature test for glibc
418
+ #define ABSL_HAVE_ALARM 1
419
+ #elif defined(_MSC_VER)
420
+ // feature tests for Microsoft's library
421
+ #elif defined(__MINGW32__)
422
+ // mingw32 doesn't provide alarm(2):
423
+ // https://osdn.net/projects/mingw/scm/git/mingw-org-wsl/blobs/5.2-trunk/mingwrt/include/unistd.h
424
+ // mingw-w64 provides a no-op implementation:
425
+ // https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/misc/alarm.c
426
+ #elif defined(__EMSCRIPTEN__)
427
+ // emscripten doesn't support signals
428
+ #elif defined(__Fuchsia__)
429
+ // Signals don't exist on fuchsia.
430
+ #elif defined(__native_client__)
431
+ #else
432
+ // other standard libraries
433
+ #define ABSL_HAVE_ALARM 1
434
+ #endif
435
+
436
+ // ABSL_IS_LITTLE_ENDIAN
437
+ // ABSL_IS_BIG_ENDIAN
438
+ //
439
+ // Checks the endianness of the platform.
440
+ //
441
+ // Notes: uses the built in endian macros provided by GCC (since 4.6) and
442
+ // Clang (since 3.2); see
443
+ // https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html.
444
+ // Otherwise, if _WIN32, assume little endian. Otherwise, bail with an error.
445
+ #if defined(ABSL_IS_BIG_ENDIAN)
446
+ #error "ABSL_IS_BIG_ENDIAN cannot be directly set."
447
+ #endif
448
+ #if defined(ABSL_IS_LITTLE_ENDIAN)
449
+ #error "ABSL_IS_LITTLE_ENDIAN cannot be directly set."
450
+ #endif
451
+
452
+ #if (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
453
+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
454
+ #define ABSL_IS_LITTLE_ENDIAN 1
455
+ #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && \
456
+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
457
+ #define ABSL_IS_BIG_ENDIAN 1
458
+ #elif defined(_WIN32)
459
+ #define ABSL_IS_LITTLE_ENDIAN 1
460
+ #else
461
+ #error "absl endian detection needs to be set up for your compiler"
462
+ #endif
463
+
464
+ // macOS 10.13 and iOS 10.11 don't let you use <any>, <optional>, or <variant>
465
+ // even though the headers exist and are publicly noted to work. See
466
+ // https://github.com/abseil/abseil-cpp/issues/207 and
467
+ // https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
468
+ // libc++ spells out the availability requirements in the file
469
+ // llvm-project/libcxx/include/__config via the #define
470
+ // _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS.
471
+ #if defined(__APPLE__) && defined(_LIBCPP_VERSION) && \
472
+ ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \
473
+ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101400) || \
474
+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \
475
+ __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 120000) || \
476
+ (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && \
477
+ __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000) || \
478
+ (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && \
479
+ __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 120000))
480
+ #define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 1
481
+ #else
482
+ #define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 0
483
+ #endif
484
+
485
+ // ABSL_HAVE_STD_ANY
486
+ //
487
+ // Checks whether C++17 std::any is available by checking whether <any> exists.
488
+ #ifdef ABSL_HAVE_STD_ANY
489
+ #error "ABSL_HAVE_STD_ANY cannot be directly set."
490
+ #endif
491
+
492
+ #ifdef __has_include
493
+ #if __has_include(<any>) && __cplusplus >= 201703L && \
494
+ !ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE
495
+ #define ABSL_HAVE_STD_ANY 1
496
+ #endif
497
+ #endif
498
+
499
+ // ABSL_HAVE_STD_OPTIONAL
500
+ //
501
+ // Checks whether C++17 std::optional is available.
502
+ #ifdef ABSL_HAVE_STD_OPTIONAL
503
+ #error "ABSL_HAVE_STD_OPTIONAL cannot be directly set."
504
+ #endif
505
+
506
+ #ifdef __has_include
507
+ #if __has_include(<optional>) && __cplusplus >= 201703L && \
508
+ !ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE
509
+ #define ABSL_HAVE_STD_OPTIONAL 1
510
+ #endif
511
+ #endif
512
+
513
+ // ABSL_HAVE_STD_VARIANT
514
+ //
515
+ // Checks whether C++17 std::variant is available.
516
+ #ifdef ABSL_HAVE_STD_VARIANT
517
+ #error "ABSL_HAVE_STD_VARIANT cannot be directly set."
518
+ #endif
519
+
520
+ #ifdef __has_include
521
+ #if __has_include(<variant>) && __cplusplus >= 201703L && \
522
+ !ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE
523
+ #define ABSL_HAVE_STD_VARIANT 1
524
+ #endif
525
+ #endif
526
+
527
+ // ABSL_HAVE_STD_STRING_VIEW
528
+ //
529
+ // Checks whether C++17 std::string_view is available.
530
+ #ifdef ABSL_HAVE_STD_STRING_VIEW
531
+ #error "ABSL_HAVE_STD_STRING_VIEW cannot be directly set."
532
+ #endif
533
+
534
+ #ifdef __has_include
535
+ #if __has_include(<string_view>) && __cplusplus >= 201703L
536
+ #define ABSL_HAVE_STD_STRING_VIEW 1
537
+ #endif
538
+ #endif
539
+
540
+ // For MSVC, `__has_include` is supported in VS 2017 15.3, which is later than
541
+ // the support for <optional>, <any>, <string_view>, <variant>. So we use
542
+ // _MSC_VER to check whether we have VS 2017 RTM (when <optional>, <any>,
543
+ // <string_view>, <variant> is implemented) or higher. Also, `__cplusplus` is
544
+ // not correctly set by MSVC, so we use `_MSVC_LANG` to check the language
545
+ // version.
546
+ // TODO(zhangxy): fix tests before enabling aliasing for `std::any`.
547
+ #if defined(_MSC_VER) && _MSC_VER >= 1910 && \
548
+ ((defined(_MSVC_LANG) && _MSVC_LANG > 201402) || __cplusplus > 201402)
549
+ // #define ABSL_HAVE_STD_ANY 1
550
+ #define ABSL_HAVE_STD_OPTIONAL 1
551
+ #define ABSL_HAVE_STD_VARIANT 1
552
+ #define ABSL_HAVE_STD_STRING_VIEW 1
553
+ #endif
554
+
555
+ // ABSL_USES_STD_ANY
556
+ //
557
+ // Indicates whether absl::any is an alias for std::any.
558
+ #if !defined(ABSL_OPTION_USE_STD_ANY)
559
+ #error options.h is misconfigured.
560
+ #elif ABSL_OPTION_USE_STD_ANY == 0 || \
561
+ (ABSL_OPTION_USE_STD_ANY == 2 && !defined(ABSL_HAVE_STD_ANY))
562
+ #undef ABSL_USES_STD_ANY
563
+ #elif ABSL_OPTION_USE_STD_ANY == 1 || \
564
+ (ABSL_OPTION_USE_STD_ANY == 2 && defined(ABSL_HAVE_STD_ANY))
565
+ #define ABSL_USES_STD_ANY 1
566
+ #else
567
+ #error options.h is misconfigured.
568
+ #endif
569
+
570
+ // ABSL_USES_STD_OPTIONAL
571
+ //
572
+ // Indicates whether absl::optional is an alias for std::optional.
573
+ #if !defined(ABSL_OPTION_USE_STD_OPTIONAL)
574
+ #error options.h is misconfigured.
575
+ #elif ABSL_OPTION_USE_STD_OPTIONAL == 0 || \
576
+ (ABSL_OPTION_USE_STD_OPTIONAL == 2 && !defined(ABSL_HAVE_STD_OPTIONAL))
577
+ #undef ABSL_USES_STD_OPTIONAL
578
+ #elif ABSL_OPTION_USE_STD_OPTIONAL == 1 || \
579
+ (ABSL_OPTION_USE_STD_OPTIONAL == 2 && defined(ABSL_HAVE_STD_OPTIONAL))
580
+ #define ABSL_USES_STD_OPTIONAL 1
581
+ #else
582
+ #error options.h is misconfigured.
583
+ #endif
584
+
585
+ // ABSL_USES_STD_VARIANT
586
+ //
587
+ // Indicates whether absl::variant is an alias for std::variant.
588
+ #if !defined(ABSL_OPTION_USE_STD_VARIANT)
589
+ #error options.h is misconfigured.
590
+ #elif ABSL_OPTION_USE_STD_VARIANT == 0 || \
591
+ (ABSL_OPTION_USE_STD_VARIANT == 2 && !defined(ABSL_HAVE_STD_VARIANT))
592
+ #undef ABSL_USES_STD_VARIANT
593
+ #elif ABSL_OPTION_USE_STD_VARIANT == 1 || \
594
+ (ABSL_OPTION_USE_STD_VARIANT == 2 && defined(ABSL_HAVE_STD_VARIANT))
595
+ #define ABSL_USES_STD_VARIANT 1
596
+ #else
597
+ #error options.h is misconfigured.
598
+ #endif
599
+
600
+ // ABSL_USES_STD_STRING_VIEW
601
+ //
602
+ // Indicates whether absl::string_view is an alias for std::string_view.
603
+ #if !defined(ABSL_OPTION_USE_STD_STRING_VIEW)
604
+ #error options.h is misconfigured.
605
+ #elif ABSL_OPTION_USE_STD_STRING_VIEW == 0 || \
606
+ (ABSL_OPTION_USE_STD_STRING_VIEW == 2 && \
607
+ !defined(ABSL_HAVE_STD_STRING_VIEW))
608
+ #undef ABSL_USES_STD_STRING_VIEW
609
+ #elif ABSL_OPTION_USE_STD_STRING_VIEW == 1 || \
610
+ (ABSL_OPTION_USE_STD_STRING_VIEW == 2 && \
611
+ defined(ABSL_HAVE_STD_STRING_VIEW))
612
+ #define ABSL_USES_STD_STRING_VIEW 1
613
+ #else
614
+ #error options.h is misconfigured.
615
+ #endif
616
+
617
+ // In debug mode, MSVC 2017's std::variant throws a EXCEPTION_ACCESS_VIOLATION
618
+ // SEH exception from emplace for variant<SomeStruct> when constructing the
619
+ // struct can throw. This defeats some of variant_test and
620
+ // variant_exception_safety_test.
621
+ #if defined(_MSC_VER) && _MSC_VER >= 1700 && defined(_DEBUG)
622
+ #define ABSL_INTERNAL_MSVC_2017_DBG_MODE
623
+ #endif
624
+
625
+ // ABSL_INTERNAL_MANGLED_NS
626
+ // ABSL_INTERNAL_MANGLED_BACKREFERENCE
627
+ //
628
+ // Internal macros for building up mangled names in our internal fork of CCTZ.
629
+ // This implementation detail is only needed and provided for the MSVC build.
630
+ //
631
+ // These macros both expand to string literals. ABSL_INTERNAL_MANGLED_NS is
632
+ // the mangled spelling of the `absl` namespace, and
633
+ // ABSL_INTERNAL_MANGLED_BACKREFERENCE is a back-reference integer representing
634
+ // the proper count to skip past the CCTZ fork namespace names. (This number
635
+ // is one larger when there is an inline namespace name to skip.)
636
+ #if defined(_MSC_VER)
637
+ #if ABSL_OPTION_USE_INLINE_NAMESPACE == 0
638
+ #define ABSL_INTERNAL_MANGLED_NS "absl"
639
+ #define ABSL_INTERNAL_MANGLED_BACKREFERENCE "5"
640
+ #else
641
+ #define ABSL_INTERNAL_MANGLED_NS \
642
+ ABSL_INTERNAL_TOKEN_STR(ABSL_OPTION_INLINE_NAMESPACE_NAME) "@absl"
643
+ #define ABSL_INTERNAL_MANGLED_BACKREFERENCE "6"
644
+ #endif
645
+ #endif
646
+
647
+ #undef ABSL_INTERNAL_HAS_KEYWORD
648
+
649
+ // ABSL_DLL
650
+ //
651
+ // When building Abseil as a DLL, this macro expands to `__declspec(dllexport)`
652
+ // so we can annotate symbols appropriately as being exported. When used in
653
+ // headers consuming a DLL, this macro expands to `__declspec(dllimport)` so
654
+ // that consumers know the symbol is defined inside the DLL. In all other cases,
655
+ // the macro expands to nothing.
656
+ #if defined(_MSC_VER)
657
+ #if defined(ABSL_BUILD_DLL)
658
+ #define ABSL_DLL __declspec(dllexport)
659
+ #elif defined(ABSL_CONSUME_DLL)
660
+ #define ABSL_DLL __declspec(dllimport)
661
+ #else
662
+ #define ABSL_DLL
663
+ #endif
664
+ #else
665
+ #define ABSL_DLL
666
+ #endif // defined(_MSC_VER)
667
+
668
+ // ABSL_HAVE_MEMORY_SANITIZER
669
+ //
670
+ // MemorySanitizer (MSan) is a detector of uninitialized reads. It consists of
671
+ // a compiler instrumentation module and a run-time library.
672
+ #ifdef ABSL_HAVE_MEMORY_SANITIZER
673
+ #error "ABSL_HAVE_MEMORY_SANITIZER cannot be directly set."
674
+ #elif defined(MEMORY_SANITIZER)
675
+ // The MEMORY_SANITIZER macro is deprecated but we will continue to honor it
676
+ // for now.
677
+ #define ABSL_HAVE_MEMORY_SANITIZER 1
678
+ #elif defined(__SANITIZE_MEMORY__)
679
+ #define ABSL_HAVE_MEMORY_SANITIZER 1
680
+ #elif !defined(__native_client__) && ABSL_HAVE_FEATURE(memory_sanitizer)
681
+ #define ABSL_HAVE_MEMORY_SANITIZER 1
682
+ #endif
683
+
684
+ // ABSL_HAVE_THREAD_SANITIZER
685
+ //
686
+ // ThreadSanitizer (TSan) is a fast data race detector.
687
+ #ifdef ABSL_HAVE_THREAD_SANITIZER
688
+ #error "ABSL_HAVE_THREAD_SANITIZER cannot be directly set."
689
+ #elif defined(THREAD_SANITIZER)
690
+ // The THREAD_SANITIZER macro is deprecated but we will continue to honor it
691
+ // for now.
692
+ #define ABSL_HAVE_THREAD_SANITIZER 1
693
+ #elif defined(__SANITIZE_THREAD__)
694
+ #define ABSL_HAVE_THREAD_SANITIZER 1
695
+ #elif ABSL_HAVE_FEATURE(thread_sanitizer)
696
+ #define ABSL_HAVE_THREAD_SANITIZER 1
697
+ #endif
698
+
699
+ // ABSL_HAVE_ADDRESS_SANITIZER
700
+ //
701
+ // AddressSanitizer (ASan) is a fast memory error detector.
702
+ #ifdef ABSL_HAVE_ADDRESS_SANITIZER
703
+ #error "ABSL_HAVE_ADDRESS_SANITIZER cannot be directly set."
704
+ #elif defined(ADDRESS_SANITIZER)
705
+ // The ADDRESS_SANITIZER macro is deprecated but we will continue to honor it
706
+ // for now.
707
+ #define ABSL_HAVE_ADDRESS_SANITIZER 1
708
+ #elif defined(__SANITIZE_ADDRESS__)
709
+ #define ABSL_HAVE_ADDRESS_SANITIZER 1
710
+ #elif ABSL_HAVE_FEATURE(address_sanitizer)
711
+ #define ABSL_HAVE_ADDRESS_SANITIZER 1
712
+ #endif
713
+
714
+ #endif // ABSL_BASE_CONFIG_H_