rugged 1.3.2.3 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (329) hide show
  1. checksums.yaml +4 -4
  2. data/ext/rugged/extconf.rb +1 -1
  3. data/ext/rugged/rugged_config.c +7 -2
  4. data/ext/rugged/rugged_remote.c +17 -0
  5. data/lib/rugged/version.rb +1 -1
  6. data/vendor/libgit2/CMakeLists.txt +103 -276
  7. data/vendor/libgit2/COPYING +36 -19
  8. data/vendor/libgit2/cmake/AddCFlagIfSupported.cmake +21 -21
  9. data/vendor/libgit2/cmake/DefaultCFlags.cmake +154 -0
  10. data/vendor/libgit2/cmake/EnableWarnings.cmake +13 -13
  11. data/vendor/libgit2/cmake/FindCoreFoundation.cmake +13 -13
  12. data/vendor/libgit2/cmake/FindGSSAPI.cmake +171 -287
  13. data/vendor/libgit2/cmake/FindGSSFramework.cmake +13 -13
  14. data/vendor/libgit2/cmake/{FindHTTP_Parser.cmake → FindHTTPParser.cmake} +17 -17
  15. data/vendor/libgit2/cmake/FindIconv.cmake +27 -27
  16. data/vendor/libgit2/cmake/FindLibSSH2.cmake +5 -5
  17. data/vendor/libgit2/cmake/FindPCRE.cmake +13 -13
  18. data/vendor/libgit2/cmake/FindPCRE2.cmake +12 -12
  19. data/vendor/libgit2/cmake/FindPkgLibraries.cmake +19 -19
  20. data/vendor/libgit2/cmake/FindSecurity.cmake +14 -14
  21. data/vendor/libgit2/cmake/FindStatNsec.cmake +12 -18
  22. data/vendor/libgit2/cmake/Findfutimens.cmake +8 -8
  23. data/vendor/libgit2/cmake/FindmbedTLS.cmake +63 -70
  24. data/vendor/libgit2/cmake/IdeSplitSources.cmake +18 -18
  25. data/vendor/libgit2/cmake/PkgBuildConfig.cmake +60 -60
  26. data/vendor/libgit2/cmake/SanitizeBool.cmake +20 -20
  27. data/vendor/libgit2/cmake/SelectGSSAPI.cmake +37 -37
  28. data/vendor/libgit2/cmake/SelectHTTPParser.cmake +19 -0
  29. data/vendor/libgit2/cmake/SelectHTTPSBackend.cmake +100 -100
  30. data/vendor/libgit2/cmake/SelectHashes.cmake +39 -49
  31. data/vendor/libgit2/cmake/SelectRegex.cmake +51 -0
  32. data/vendor/libgit2/cmake/SelectSSH.cmake +41 -0
  33. data/vendor/libgit2/cmake/SelectWinHTTP.cmake +17 -0
  34. data/vendor/libgit2/cmake/SelectZlib.cmake +34 -0
  35. data/vendor/libgit2/deps/chromium-zlib/CMakeLists.txt +6 -6
  36. data/vendor/libgit2/deps/ntlmclient/CMakeLists.txt +31 -31
  37. data/vendor/libgit2/deps/ntlmclient/crypt_openssl.c +1 -1
  38. data/vendor/libgit2/deps/ntlmclient/ntlm.c +4 -4
  39. data/vendor/libgit2/deps/ntlmclient/ntlm.h +4 -4
  40. data/vendor/libgit2/deps/ntlmclient/ntlmclient.h +2 -2
  41. data/vendor/libgit2/deps/pcre/CMakeLists.txt +88 -88
  42. data/vendor/libgit2/deps/winhttp/CMakeLists.txt +14 -16
  43. data/vendor/libgit2/deps/zlib/adler32.c +0 -7
  44. data/vendor/libgit2/deps/zlib/crc32.c +288 -975
  45. data/vendor/libgit2/deps/zlib/crc32.h +436 -9441
  46. data/vendor/libgit2/deps/zlib/deflate.c +31 -83
  47. data/vendor/libgit2/deps/zlib/deflate.h +15 -12
  48. data/vendor/libgit2/deps/zlib/gzguts.h +2 -3
  49. data/vendor/libgit2/deps/zlib/infback.c +1 -2
  50. data/vendor/libgit2/deps/zlib/inffast.c +14 -14
  51. data/vendor/libgit2/deps/zlib/inflate.c +8 -39
  52. data/vendor/libgit2/deps/zlib/inflate.h +2 -3
  53. data/vendor/libgit2/deps/zlib/inftrees.c +3 -3
  54. data/vendor/libgit2/deps/zlib/trees.c +48 -27
  55. data/vendor/libgit2/deps/zlib/zlib.h +100 -126
  56. data/vendor/libgit2/deps/zlib/zutil.c +2 -2
  57. data/vendor/libgit2/deps/zlib/zutil.h +9 -12
  58. data/vendor/libgit2/include/git2/apply.h +16 -2
  59. data/vendor/libgit2/include/git2/attr.h +11 -2
  60. data/vendor/libgit2/include/git2/blame.h +4 -1
  61. data/vendor/libgit2/include/git2/blob.h +14 -1
  62. data/vendor/libgit2/include/git2/branch.h +2 -0
  63. data/vendor/libgit2/include/git2/buffer.h +18 -78
  64. data/vendor/libgit2/include/git2/cert.h +2 -2
  65. data/vendor/libgit2/include/git2/checkout.h +5 -2
  66. data/vendor/libgit2/include/git2/clone.h +3 -3
  67. data/vendor/libgit2/include/git2/commit.h +2 -0
  68. data/vendor/libgit2/include/git2/common.h +5 -12
  69. data/vendor/libgit2/include/git2/config.h +19 -3
  70. data/vendor/libgit2/include/git2/credential.h +2 -1
  71. data/vendor/libgit2/include/git2/credential_helpers.h +1 -0
  72. data/vendor/libgit2/include/git2/deprecated.h +1 -1
  73. data/vendor/libgit2/include/git2/describe.h +7 -2
  74. data/vendor/libgit2/include/git2/diff.h +17 -9
  75. data/vendor/libgit2/include/git2/email.h +1 -1
  76. data/vendor/libgit2/include/git2/errors.h +1 -2
  77. data/vendor/libgit2/include/git2/filter.h +7 -2
  78. data/vendor/libgit2/include/git2/graph.h +1 -0
  79. data/vendor/libgit2/include/git2/ignore.h +1 -1
  80. data/vendor/libgit2/include/git2/index.h +11 -5
  81. data/vendor/libgit2/include/git2/indexer.h +19 -0
  82. data/vendor/libgit2/include/git2/merge.h +23 -3
  83. data/vendor/libgit2/include/git2/message.h +2 -0
  84. data/vendor/libgit2/include/git2/object.h +23 -0
  85. data/vendor/libgit2/include/git2/odb.h +37 -7
  86. data/vendor/libgit2/include/git2/odb_backend.h +1 -1
  87. data/vendor/libgit2/include/git2/pack.h +24 -8
  88. data/vendor/libgit2/include/git2/patch.h +8 -0
  89. data/vendor/libgit2/include/git2/pathspec.h +1 -1
  90. data/vendor/libgit2/include/git2/proxy.h +1 -1
  91. data/vendor/libgit2/include/git2/rebase.h +9 -1
  92. data/vendor/libgit2/include/git2/refdb.h +3 -0
  93. data/vendor/libgit2/include/git2/reflog.h +1 -1
  94. data/vendor/libgit2/include/git2/refs.h +2 -2
  95. data/vendor/libgit2/include/git2/remote.h +184 -37
  96. data/vendor/libgit2/include/git2/repository.h +14 -9
  97. data/vendor/libgit2/include/git2/reset.h +2 -2
  98. data/vendor/libgit2/include/git2/revparse.h +1 -1
  99. data/vendor/libgit2/include/git2/revwalk.h +4 -1
  100. data/vendor/libgit2/include/git2/signature.h +1 -1
  101. data/vendor/libgit2/include/git2/stash.h +3 -3
  102. data/vendor/libgit2/include/git2/status.h +9 -3
  103. data/vendor/libgit2/include/git2/submodule.h +7 -2
  104. data/vendor/libgit2/include/git2/sys/commit_graph.h +1 -1
  105. data/vendor/libgit2/include/git2/sys/odb_backend.h +2 -5
  106. data/vendor/libgit2/include/git2/sys/remote.h +31 -0
  107. data/vendor/libgit2/include/git2/sys/stream.h +1 -1
  108. data/vendor/libgit2/include/git2/sys/transport.h +25 -34
  109. data/vendor/libgit2/include/git2/tag.h +1 -0
  110. data/vendor/libgit2/include/git2/tree.h +4 -3
  111. data/vendor/libgit2/include/git2/types.h +7 -7
  112. data/vendor/libgit2/include/git2/version.h +3 -3
  113. data/vendor/libgit2/include/git2/worktree.h +12 -2
  114. data/vendor/libgit2/src/CMakeLists.txt +189 -315
  115. data/vendor/libgit2/src/annotated_commit.h +1 -1
  116. data/vendor/libgit2/src/apply.c +18 -18
  117. data/vendor/libgit2/src/apply.h +2 -2
  118. data/vendor/libgit2/src/attr.c +18 -18
  119. data/vendor/libgit2/src/attr_file.c +17 -17
  120. data/vendor/libgit2/src/attr_file.h +4 -4
  121. data/vendor/libgit2/src/attrcache.c +17 -12
  122. data/vendor/libgit2/src/blame_git.c +1 -1
  123. data/vendor/libgit2/src/blob.c +33 -26
  124. data/vendor/libgit2/src/blob.h +1 -1
  125. data/vendor/libgit2/src/branch.c +150 -109
  126. data/vendor/libgit2/src/branch.h +15 -3
  127. data/vendor/libgit2/src/buf.c +126 -0
  128. data/vendor/libgit2/src/buf.h +50 -0
  129. data/vendor/libgit2/src/cc-compat.h +1 -1
  130. data/vendor/libgit2/src/checkout.c +74 -68
  131. data/vendor/libgit2/src/cherrypick.c +10 -10
  132. data/vendor/libgit2/src/clone.c +66 -66
  133. data/vendor/libgit2/src/commit.c +128 -58
  134. data/vendor/libgit2/src/commit.h +24 -1
  135. data/vendor/libgit2/src/commit_graph.c +68 -53
  136. data/vendor/libgit2/src/commit_graph.h +10 -3
  137. data/vendor/libgit2/src/commit_list.c +2 -3
  138. data/vendor/libgit2/src/common.h +10 -3
  139. data/vendor/libgit2/src/config.c +99 -77
  140. data/vendor/libgit2/src/config.h +15 -2
  141. data/vendor/libgit2/src/config_file.c +103 -91
  142. data/vendor/libgit2/src/config_mem.c +9 -9
  143. data/vendor/libgit2/src/config_parse.c +27 -23
  144. data/vendor/libgit2/src/crlf.c +24 -21
  145. data/vendor/libgit2/src/date.c +10 -17
  146. data/vendor/libgit2/src/date.h +33 -0
  147. data/vendor/libgit2/src/describe.c +27 -19
  148. data/vendor/libgit2/src/diff.c +25 -8
  149. data/vendor/libgit2/src/diff.h +2 -4
  150. data/vendor/libgit2/src/diff_driver.c +34 -36
  151. data/vendor/libgit2/src/diff_driver.h +3 -3
  152. data/vendor/libgit2/src/diff_file.c +29 -20
  153. data/vendor/libgit2/src/diff_generate.c +30 -6
  154. data/vendor/libgit2/src/diff_generate.h +5 -3
  155. data/vendor/libgit2/src/diff_print.c +102 -95
  156. data/vendor/libgit2/src/diff_stats.c +40 -29
  157. data/vendor/libgit2/src/{message.h → diff_stats.h} +7 -6
  158. data/vendor/libgit2/src/diff_tform.c +9 -8
  159. data/vendor/libgit2/src/diff_xdiff.c +3 -8
  160. data/vendor/libgit2/src/email.c +54 -38
  161. data/vendor/libgit2/src/email.h +1 -1
  162. data/vendor/libgit2/src/errors.c +18 -18
  163. data/vendor/libgit2/src/features.h.in +6 -1
  164. data/vendor/libgit2/src/fetch.c +69 -24
  165. data/vendor/libgit2/src/fetch.h +1 -1
  166. data/vendor/libgit2/src/fetchhead.c +19 -19
  167. data/vendor/libgit2/src/filebuf.c +28 -28
  168. data/vendor/libgit2/src/filebuf.h +1 -1
  169. data/vendor/libgit2/src/filter.c +96 -52
  170. data/vendor/libgit2/src/filter.h +26 -5
  171. data/vendor/libgit2/src/fs_path.c +1912 -0
  172. data/vendor/libgit2/src/fs_path.h +752 -0
  173. data/vendor/libgit2/src/futils.c +91 -85
  174. data/vendor/libgit2/src/futils.h +26 -14
  175. data/vendor/libgit2/src/hash/sha1/collisiondetect.c +2 -2
  176. data/vendor/libgit2/src/hash/sha1/common_crypto.c +2 -2
  177. data/vendor/libgit2/src/hash/sha1/generic.c +2 -2
  178. data/vendor/libgit2/src/hash/sha1/mbedtls.c +2 -2
  179. data/vendor/libgit2/src/hash/sha1/openssl.c +2 -2
  180. data/vendor/libgit2/src/hash/sha1/sha1dc/sha1.c +1 -1
  181. data/vendor/libgit2/src/hash/sha1/win32.c +6 -6
  182. data/vendor/libgit2/src/hash/sha1.h +3 -1
  183. data/vendor/libgit2/src/hash.c +67 -35
  184. data/vendor/libgit2/src/hash.h +12 -12
  185. data/vendor/libgit2/src/ident.c +18 -18
  186. data/vendor/libgit2/src/ignore.c +35 -34
  187. data/vendor/libgit2/src/ignore.h +2 -2
  188. data/vendor/libgit2/src/index.c +79 -80
  189. data/vendor/libgit2/src/index.h +6 -3
  190. data/vendor/libgit2/src/indexer.c +75 -57
  191. data/vendor/libgit2/src/iterator.c +64 -56
  192. data/vendor/libgit2/src/iterator.h +5 -5
  193. data/vendor/libgit2/src/khash.h +1 -1
  194. data/vendor/libgit2/src/libgit2.c +22 -19
  195. data/vendor/libgit2/src/mailmap.c +38 -36
  196. data/vendor/libgit2/src/merge.c +27 -27
  197. data/vendor/libgit2/src/merge.h +1 -14
  198. data/vendor/libgit2/src/merge_driver.c +2 -2
  199. data/vendor/libgit2/src/merge_file.c +13 -3
  200. data/vendor/libgit2/src/message.c +21 -10
  201. data/vendor/libgit2/src/midx.c +83 -66
  202. data/vendor/libgit2/src/midx.h +3 -3
  203. data/vendor/libgit2/src/mwindow.c +1 -1
  204. data/vendor/libgit2/src/net.c +278 -68
  205. data/vendor/libgit2/src/net.h +10 -3
  206. data/vendor/libgit2/src/netops.c +1 -1
  207. data/vendor/libgit2/src/netops.h +1 -1
  208. data/vendor/libgit2/src/notes.c +20 -29
  209. data/vendor/libgit2/src/object.c +49 -9
  210. data/vendor/libgit2/src/object.h +1 -1
  211. data/vendor/libgit2/src/odb.c +35 -32
  212. data/vendor/libgit2/src/odb.h +1 -1
  213. data/vendor/libgit2/src/odb_loose.c +68 -68
  214. data/vendor/libgit2/src/odb_mempack.c +18 -5
  215. data/vendor/libgit2/src/odb_pack.c +43 -43
  216. data/vendor/libgit2/src/oid.c +11 -4
  217. data/vendor/libgit2/src/oid.h +15 -0
  218. data/vendor/libgit2/src/pack-objects.c +41 -26
  219. data/vendor/libgit2/src/pack-objects.h +11 -6
  220. data/vendor/libgit2/src/pack.c +10 -10
  221. data/vendor/libgit2/src/patch.c +3 -3
  222. data/vendor/libgit2/src/patch.h +1 -0
  223. data/vendor/libgit2/src/patch_generate.c +27 -11
  224. data/vendor/libgit2/src/patch_generate.h +5 -5
  225. data/vendor/libgit2/src/patch_parse.c +24 -24
  226. data/vendor/libgit2/src/path.c +76 -1951
  227. data/vendor/libgit2/src/path.h +34 -741
  228. data/vendor/libgit2/src/pathspec.c +6 -6
  229. data/vendor/libgit2/src/pathspec.h +2 -2
  230. data/vendor/libgit2/src/posix.c +3 -3
  231. data/vendor/libgit2/src/posix.h +1 -0
  232. data/vendor/libgit2/src/pqueue.h +1 -1
  233. data/vendor/libgit2/src/proxy.c +4 -1
  234. data/vendor/libgit2/src/proxy.h +1 -1
  235. data/vendor/libgit2/src/push.c +30 -35
  236. data/vendor/libgit2/src/push.h +4 -16
  237. data/vendor/libgit2/src/rand.c +226 -0
  238. data/vendor/libgit2/src/rand.h +37 -0
  239. data/vendor/libgit2/src/reader.c +8 -8
  240. data/vendor/libgit2/src/reader.h +2 -2
  241. data/vendor/libgit2/src/rebase.c +89 -88
  242. data/vendor/libgit2/src/refdb_fs.c +447 -173
  243. data/vendor/libgit2/src/refs.c +32 -32
  244. data/vendor/libgit2/src/refs.h +2 -2
  245. data/vendor/libgit2/src/refspec.c +32 -37
  246. data/vendor/libgit2/src/refspec.h +5 -2
  247. data/vendor/libgit2/src/regexp.c +1 -1
  248. data/vendor/libgit2/src/remote.c +713 -419
  249. data/vendor/libgit2/src/remote.h +15 -10
  250. data/vendor/libgit2/src/repository.c +350 -467
  251. data/vendor/libgit2/src/repository.h +11 -10
  252. data/vendor/libgit2/src/reset.c +8 -5
  253. data/vendor/libgit2/src/revert.c +10 -10
  254. data/vendor/libgit2/src/revparse.c +48 -35
  255. data/vendor/libgit2/src/revwalk.c +7 -7
  256. data/vendor/libgit2/src/signature.c +12 -6
  257. data/vendor/libgit2/src/signature.h +1 -1
  258. data/vendor/libgit2/src/sortedcache.c +1 -1
  259. data/vendor/libgit2/src/sortedcache.h +1 -1
  260. data/vendor/libgit2/src/stash.c +36 -37
  261. data/vendor/libgit2/src/status.c +4 -1
  262. data/vendor/libgit2/src/{buffer.c → str.c} +157 -151
  263. data/vendor/libgit2/src/str.h +357 -0
  264. data/vendor/libgit2/src/streams/mbedtls.c +8 -6
  265. data/vendor/libgit2/src/streams/openssl_dynamic.h +3 -3
  266. data/vendor/libgit2/src/submodule.c +171 -159
  267. data/vendor/libgit2/src/submodule.h +1 -1
  268. data/vendor/libgit2/src/sysdir.c +68 -52
  269. data/vendor/libgit2/src/sysdir.h +15 -10
  270. data/vendor/libgit2/src/tag.c +29 -27
  271. data/vendor/libgit2/src/thread.h +3 -3
  272. data/vendor/libgit2/src/threadstate.c +3 -3
  273. data/vendor/libgit2/src/threadstate.h +1 -1
  274. data/vendor/libgit2/src/trace.c +1 -14
  275. data/vendor/libgit2/src/trace.h +5 -22
  276. data/vendor/libgit2/src/trailer.c +1 -1
  277. data/vendor/libgit2/src/transaction.c +1 -1
  278. data/vendor/libgit2/src/transport.c +10 -10
  279. data/vendor/libgit2/src/transports/auth.c +7 -9
  280. data/vendor/libgit2/src/transports/auth.h +2 -3
  281. data/vendor/libgit2/src/transports/auth_negotiate.c +12 -13
  282. data/vendor/libgit2/src/transports/auth_ntlm.c +10 -10
  283. data/vendor/libgit2/src/transports/auth_ntlm.h +0 -1
  284. data/vendor/libgit2/src/transports/git.c +9 -11
  285. data/vendor/libgit2/src/transports/http.c +37 -17
  286. data/vendor/libgit2/src/transports/http.h +2 -3
  287. data/vendor/libgit2/src/transports/httpclient.c +65 -65
  288. data/vendor/libgit2/src/transports/local.c +124 -116
  289. data/vendor/libgit2/src/transports/smart.c +51 -139
  290. data/vendor/libgit2/src/transports/smart.h +25 -31
  291. data/vendor/libgit2/src/transports/smart_pkt.c +33 -33
  292. data/vendor/libgit2/src/transports/smart_protocol.c +57 -39
  293. data/vendor/libgit2/src/transports/ssh.c +47 -112
  294. data/vendor/libgit2/src/transports/winhttp.c +50 -56
  295. data/vendor/libgit2/src/tree-cache.c +5 -5
  296. data/vendor/libgit2/src/tree-cache.h +2 -2
  297. data/vendor/libgit2/src/tree.c +59 -48
  298. data/vendor/libgit2/src/tree.h +1 -1
  299. data/vendor/libgit2/src/unix/map.c +0 -2
  300. data/vendor/libgit2/src/unix/posix.h +1 -4
  301. data/vendor/libgit2/src/unix/realpath.c +0 -2
  302. data/vendor/libgit2/src/util.c +14 -14
  303. data/vendor/libgit2/src/util.h +2 -28
  304. data/vendor/libgit2/src/vector.h +1 -1
  305. data/vendor/libgit2/src/win32/findfile.c +172 -116
  306. data/vendor/libgit2/src/win32/findfile.h +7 -4
  307. data/vendor/libgit2/src/win32/path_w32.c +140 -9
  308. data/vendor/libgit2/src/win32/path_w32.h +2 -0
  309. data/vendor/libgit2/src/win32/posix.h +0 -1
  310. data/vendor/libgit2/src/win32/posix_w32.c +11 -27
  311. data/vendor/libgit2/src/win32/w32_buffer.c +2 -3
  312. data/vendor/libgit2/src/win32/w32_buffer.h +2 -3
  313. data/vendor/libgit2/src/win32/w32_leakcheck.c +1 -1
  314. data/vendor/libgit2/src/worktree.c +116 -94
  315. data/vendor/libgit2/src/worktree.h +1 -1
  316. data/vendor/libgit2/src/xdiff/git-xdiff.h +53 -0
  317. data/vendor/libgit2/src/xdiff/xdiff.h +15 -15
  318. data/vendor/libgit2/src/xdiff/xdiffi.c +134 -108
  319. data/vendor/libgit2/src/xdiff/xemit.c +23 -7
  320. data/vendor/libgit2/src/xdiff/xhistogram.c +87 -78
  321. data/vendor/libgit2/src/xdiff/xinclude.h +1 -12
  322. data/vendor/libgit2/src/xdiff/xmerge.c +104 -117
  323. data/vendor/libgit2/src/xdiff/xpatience.c +6 -17
  324. data/vendor/libgit2/src/xdiff/xprepare.c +15 -20
  325. data/vendor/libgit2/src/xdiff/xutils.c +18 -7
  326. data/vendor/libgit2/src/zstream.c +5 -5
  327. data/vendor/libgit2/src/zstream.h +4 -4
  328. metadata +25 -10
  329. data/vendor/libgit2/src/buffer.h +0 -374
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6910dab301773725d36a8a8397fe2b61eb5e0010534c959398f2aa8512abac71
4
- data.tar.gz: 7ec4af39092208c5968aa343917961d3517b2b026c7b046a1cfc16d17396d382
3
+ metadata.gz: ca4d518c34a0642302d00faa7d9cebf7a2541f12bf7b19a977e0d51a3c64eee1
4
+ data.tar.gz: 447603f2a0c3ea4aec48a107b9026ac1094016e2c1fc3b61a51752d61793fdb5
5
5
  SHA512:
6
- metadata.gz: 69343adaa8da5ef75976ad1ae12892b73770ccf96a0322f11969de49203ca320e496b5644cd168c40c00a371a84a14ed8ea9907313109432793e1a918624b4fe
7
- data.tar.gz: 2a144dd5bd5f9b7545d4f2882dc72e66deb074efdce08feead9d724b23d200e7d46cd1ae866e0ebace14f9c25616322b46876ba6e47e72c8ef03c8429b5b36b8
6
+ metadata.gz: 33ffc07452cc1463143d34db00d74b9816e82e682d5ae5a26d07e3264a9d0f0f45fc66ebc5ac96d03be69d1ddbb57692dc729cccf2d9755c77a814159540e514
7
+ data.tar.gz: 9e83d292922396712035031ebbb606d7185acdd9258b88e56b6d5f8ab4cfd7db6e01afebf0eae1cfe09ee47c123ef23ea64def5012abfb666e47a93d50b01d39
@@ -103,7 +103,7 @@ else
103
103
  Dir.chdir("build") do
104
104
  # On Windows, Ruby-DevKit is MSYS-based, so ensure to use MSYS Makefiles.
105
105
  generator = "-G \"MSYS Makefiles\"" if Gem.win_platform?
106
- run_cmake(5 * 60, ".. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo #{cmake_flags.join(' ')} #{generator}")
106
+ run_cmake(5 * 60, ".. -DBUILD_TESTS=OFF -DUSE_THREADS=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo #{cmake_flags.join(' ')} #{generator}")
107
107
  sys(MAKE)
108
108
 
109
109
  # "normal" libraries (and libgit2 builds) get all these when they build but we're doing it
@@ -181,17 +181,22 @@ static int cb_config__each_key(const git_config_entry *entry, void *payload)
181
181
  static int cb_config__each_pair(const git_config_entry *entry, void *payload)
182
182
  {
183
183
  int *exception = (int *) payload;
184
+ VALUE value;
184
185
 
185
- rb_protect(rb_yield, rb_ary_new3(2, rb_str_new_utf8(entry->name), rb_str_new_utf8(entry->value)), exception);
186
+ value = entry->value ? rb_str_new_utf8(entry->value) : Qnil;
187
+ rb_protect(rb_yield, rb_ary_new3(2, rb_str_new_utf8(entry->name), value), exception);
186
188
 
187
189
  return (*exception != 0) ? GIT_EUSER : GIT_OK;
188
190
  }
189
191
 
190
192
  static int cb_config__to_hash(const git_config_entry *entry, void *opaque)
191
193
  {
194
+ VALUE value;
195
+
196
+ value = entry->value ? rb_str_new_utf8(entry->value) : Qnil;
192
197
  rb_hash_aset((VALUE)opaque,
193
198
  rb_str_new_utf8(entry->name),
194
- rb_str_new_utf8(entry->value)
199
+ value
195
200
  );
196
201
 
197
202
  return GIT_OK;
@@ -219,6 +219,17 @@ static void init_proxy_options(VALUE rb_options, git_proxy_options *proxy_option
219
219
  }
220
220
  }
221
221
 
222
+ static void init_pb_parallelism(VALUE rb_options, git_push_options *opts)
223
+ {
224
+ if (NIL_P(rb_options)) return;
225
+
226
+ VALUE val = rb_hash_aref(rb_options, CSTR2SYM("pb_parallelism"));
227
+ if (!NIL_P(val)) {
228
+ Check_Type(val, T_FIXNUM);
229
+ opts->pb_parallelism = FIX2UINT(val);
230
+ }
231
+ }
232
+
222
233
  static int parse_prune_type(VALUE rb_prune_type)
223
234
  {
224
235
  if (rb_prune_type == Qtrue) {
@@ -683,6 +694,11 @@ static VALUE rb_git_remote_fetch(int argc, VALUE *argv, VALUE self)
683
694
  * :proxy_url ::
684
695
  * The url of an http proxy to use to access the remote repository.
685
696
  *
697
+ * :pb_parallelism ::
698
+ * Sets the number of worker threads that will be available to the packbuilder when generating
699
+ * a pack file, if required by the transport being used. A value of 0 means the packbuilder will
700
+ * auto-detect the number of of threads to use.
701
+ *
686
702
  * Example:
687
703
  *
688
704
  * remote = Rugged::Remote.lookup(@repo, 'origin')
@@ -709,6 +725,7 @@ static VALUE rb_git_remote_push(int argc, VALUE *argv, VALUE self)
709
725
  rugged_remote_init_callbacks_and_payload_from_options(rb_options, &opts.callbacks, &payload);
710
726
  init_custom_headers(rb_options, &opts.custom_headers);
711
727
  init_proxy_options(rb_options, &opts.proxy_opts);
728
+ init_pb_parallelism(rb_options, &opts);
712
729
 
713
730
  error = git_remote_push(remote, &refspecs, &opts);
714
731
 
@@ -4,5 +4,5 @@
4
4
  # For full terms see the included LICENSE file.
5
5
 
6
6
  module Rugged
7
- Version = VERSION = '1.3.2.3'
7
+ Version = VERSION = '1.4.2'
8
8
  end
@@ -1,306 +1,133 @@
1
1
  # CMake build script for the libgit2 project
2
- #
3
- # Building (out of source build):
4
- # > mkdir build && cd build
5
- # > cmake .. [-DSETTINGS=VALUE]
6
- # > cmake --build .
7
- #
8
- # Testing:
9
- # > ctest -V
10
- #
11
- # Install:
12
- # > cmake --build . --target install
2
+ # See `README.md` for build instructions.
13
3
 
14
- CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
4
+ cmake_minimum_required(VERSION 3.5.1)
15
5
 
16
- project(libgit2 VERSION "1.3.2" LANGUAGES C)
6
+ project(libgit2 VERSION "1.4.0" LANGUAGES C)
17
7
 
18
8
  # Add find modules to the path
19
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${libgit2_SOURCE_DIR}/cmake/")
20
-
21
- INCLUDE(CheckLibraryExists)
22
- INCLUDE(CheckFunctionExists)
23
- INCLUDE(CheckSymbolExists)
24
- INCLUDE(CheckStructHasMember)
25
- INCLUDE(CheckPrototypeDefinition) # Added in CMake 3.0
26
- INCLUDE(AddCFlagIfSupported)
27
- INCLUDE(FindPkgLibraries)
28
- INCLUDE(FindThreads)
29
- INCLUDE(FindStatNsec)
30
- INCLUDE(Findfutimens)
31
- INCLUDE(GNUInstallDirs)
32
- INCLUDE(IdeSplitSources)
33
- INCLUDE(FeatureSummary)
34
- INCLUDE(EnableWarnings)
9
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
35
10
 
11
+ #
36
12
  # Build options
37
13
  #
38
- OPTION(SONAME "Set the (SO)VERSION of the target" ON)
39
- OPTION(BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
40
- OPTION(THREADSAFE "Build libgit2 as threadsafe" ON)
41
- OPTION(BUILD_CLAR "Build Tests using the Clar suite" ON)
42
- OPTION(BUILD_EXAMPLES "Build library usage example apps" OFF)
43
- OPTION(BUILD_FUZZERS "Build the fuzz targets" OFF)
44
- OPTION(ENABLE_TRACE "Enables tracing support" ON)
45
- OPTION(LIBGIT2_FILENAME "Name of the produced binary" OFF)
46
- OPTION(USE_SSH "Link with libssh2 to enable SSH support" ON)
47
- OPTION(USE_HTTPS "Enable HTTPS support. Can be set to a specific backend" ON)
48
- OPTION(USE_SHA1 "Enable SHA1. Can be set to CollisionDetection(ON)/HTTPS/Generic" ON)
49
- OPTION(USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF)
50
- OPTION(USE_STANDALONE_FUZZERS "Enable standalone fuzzers (compatible with gcc)" OFF)
51
- OPTION(USE_LEAK_CHECKER "Run tests with leak checker" OFF)
52
- OPTION(DEBUG_POOL "Enable debug pool allocator" OFF)
53
- OPTION(DEBUG_STRICT_ALLOC "Enable strict allocator behavior" OFF)
54
- OPTION(DEBUG_STRICT_OPEN "Enable path validation in open" OFF)
55
- OPTION(ENABLE_WERROR "Enable compilation with -Werror" OFF)
56
- OPTION(USE_BUNDLED_ZLIB "Use the bundled version of zlib. Can be set to one of Bundled(ON)/Chromium. The Chromium option requires a x86_64 processor with SSE4.2 and CLMUL" OFF)
57
- SET(USE_HTTP_PARSER "" CACHE STRING "Specifies the HTTP Parser implementation; either system or builtin.")
58
- OPTION(DEPRECATE_HARD "Do not include deprecated functions in the library" OFF)
59
- SET(REGEX_BACKEND "" CACHE STRING "Regular expression implementation. One of regcomp_l, pcre2, pcre, regcomp, or builtin.")
60
14
 
61
- IF (UNIX)
62
- IF (NOT USE_HTTPS)
63
- OPTION(USE_NTLMCLIENT "Enable NTLM support on Unix." OFF )
64
- ELSE()
65
- OPTION(USE_NTLMCLIENT "Enable NTLM support on Unix." ON )
66
- ENDIF()
67
- ENDIF()
15
+ # Optional subsystems
16
+ option(BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
17
+ option(BUILD_TESTS "Build Tests using the Clar suite" ON)
18
+ option(BUILD_EXAMPLES "Build library usage example apps" OFF)
19
+ option(BUILD_FUZZERS "Build the fuzz targets" OFF)
20
+
21
+ # Suggested functionality that may not be available on a per-platform basis
22
+ option(USE_THREADS "Use threads for parallel processing when possible" ON)
23
+ option(USE_NSEC "Support nanosecond precision file mtimes and ctimes" ON)
24
+
25
+ # Backend selection
26
+ option(USE_SSH "Link with libssh2 to enable SSH support" OFF)
27
+ option(USE_HTTPS "Enable HTTPS support. Can be set to a specific backend" ON)
28
+ option(USE_SHA1 "Enable SHA1. Can be set to CollisionDetection(ON)/HTTPS/Generic" ON)
29
+ option(USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF)
30
+ set(USE_HTTP_PARSER "" CACHE STRING "Specifies the HTTP Parser implementation; either system or builtin.")
31
+ set(REGEX_BACKEND "" CACHE STRING "Regular expression implementation. One of regcomp_l, pcre2, pcre, regcomp, or builtin.")
32
+ option(USE_BUNDLED_ZLIB "Use the bundled version of zlib. Can be set to one of Bundled(ON)/Chromium. The Chromium option requires a x86_64 processor with SSE4.2 and CLMUL" OFF)
33
+
34
+ # Debugging options
35
+ option(USE_LEAK_CHECKER "Run tests with leak checker" OFF)
36
+ option(USE_STANDALONE_FUZZERS "Enable standalone fuzzers (compatible with gcc)" OFF)
37
+ option(DEBUG_POOL "Enable debug pool allocator" OFF)
38
+ option(DEBUG_STRICT_ALLOC "Enable strict allocator behavior" OFF)
39
+ option(DEBUG_STRICT_OPEN "Enable path validation in open" OFF)
40
+
41
+ # Output options
42
+ option(SONAME "Set the (SO)VERSION of the target" ON)
43
+ set(LIBGIT2_FILENAME "git2" CACHE STRING "Name of the produced binary")
44
+ option(DEPRECATE_HARD "Do not include deprecated functions in the library" OFF)
45
+
46
+ # Compilation options
47
+ option(ENABLE_WERROR "Enable compilation with -Werror" OFF)
48
+
49
+ if(UNIX)
50
+ # NTLM client requires crypto libraries from the system HTTPS stack
51
+ if(NOT USE_HTTPS)
52
+ option(USE_NTLMCLIENT "Enable NTLM support on Unix." OFF)
53
+ else()
54
+ option(USE_NTLMCLIENT "Enable NTLM support on Unix." ON)
55
+ endif()
68
56
 
69
- IF (UNIX AND NOT APPLE)
70
- OPTION(ENABLE_REPRODUCIBLE_BUILDS "Enable reproducible builds" OFF)
71
- ENDIF()
57
+ option(ENABLE_REPRODUCIBLE_BUILDS "Enable reproducible builds" OFF)
58
+ endif()
72
59
 
73
- IF (APPLE)
74
- OPTION(USE_ICONV "Link with and use iconv library" ON)
75
- ENDIF()
60
+ if(APPLE)
61
+ option(USE_ICONV "Link with and use iconv library" ON)
62
+ endif()
76
63
 
77
- IF(MSVC)
64
+ if(MSVC)
78
65
  # This option must match the settings used in your program, in particular if you
79
66
  # are linking statically
80
- OPTION(STATIC_CRT "Link the static CRT libraries" ON)
67
+ option(STATIC_CRT "Link the static CRT libraries" ON)
81
68
 
82
69
  # If you want to embed a copy of libssh2 into libgit2, pass a
83
70
  # path to libssh2
84
- OPTION(EMBED_SSH_PATH "Path to libssh2 to embed (Windows)" OFF)
85
- ENDIF()
86
-
87
-
88
- IF(WIN32)
89
- # By default, libgit2 is built with WinHTTP. To use the built-in
90
- # HTTP transport, invoke CMake with the "-DWINHTTP=OFF" argument.
91
- OPTION(WINHTTP "Use Win32 WinHTTP routines" ON)
92
- ENDIF()
71
+ option(EMBED_SSH_PATH "Path to libssh2 to embed (Windows)" OFF)
93
72
 
94
- IF(MSVC)
95
73
  # Enable leak checking using the debugging C runtime.
96
- OPTION(WIN32_LEAKCHECK "Enable leak reporting via crtdbg" OFF)
97
- ENDIF()
98
-
99
- IF (DEPRECATE_HARD)
100
- ADD_DEFINITIONS(-DGIT_DEPRECATE_HARD)
101
- ENDIF()
102
-
103
- # Platform specific compilation flags
104
- IF (MSVC)
105
- IF (STDCALL)
106
- MESSAGE(FATAL_ERROR "The STDCALL option is no longer supported; libgit2 is now always built as a cdecl library. If you're using PInvoke, please add the CallingConventions.Cdecl attribute for support.")
107
- ENDIF()
108
-
109
- ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)
110
- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
111
- ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
112
-
113
- STRING(REPLACE "/Zm1000" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
114
-
115
- # /GF - String pooling
116
- # /MP - Parallel build
117
- SET(CMAKE_C_FLAGS "/GF /MP /nologo ${CMAKE_C_FLAGS}")
118
-
119
- # /Gd - explicitly set cdecl calling convention
120
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gd")
121
-
122
- IF (NOT (MSVC_VERSION LESS 1900))
123
- # /guard:cf - Enable Control Flow Guard
124
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf")
125
- ENDIF()
126
-
127
- IF (STATIC_CRT)
128
- SET(CRT_FLAG_DEBUG "/MTd")
129
- SET(CRT_FLAG_RELEASE "/MT")
130
- ELSE()
131
- SET(CRT_FLAG_DEBUG "/MDd")
132
- SET(CRT_FLAG_RELEASE "/MD")
133
- ENDIF()
134
-
135
- IF (WIN32_LEAKCHECK)
136
- SET(GIT_WIN32_LEAKCHECK 1)
137
- SET(CRT_FLAG_DEBUG "${CRT_FLAG_DEBUG}")
138
- SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} Dbghelp.lib")
139
- ENDIF()
140
-
141
- # /Zi - Create debugging information
142
- # /Od - Disable optimization
143
- # /D_DEBUG - #define _DEBUG
144
- # /MTd - Statically link the multithreaded debug version of the CRT
145
- # /MDd - Dynamically link the multithreaded debug version of the CRT
146
- # /RTC1 - Run time checks
147
- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Zi /Od /D_DEBUG /RTC1 ${CRT_FLAG_DEBUG}")
74
+ option(WIN32_LEAKCHECK "Enable leak reporting via crtdbg" OFF)
75
+ endif()
148
76
 
149
- # /DNDEBUG - Disables asserts
150
- # /MT - Statically link the multithreaded release version of the CRT
151
- # /MD - Dynamically link the multithreaded release version of the CRT
152
- # /O2 - Optimize for speed
153
- # /Oy - Enable frame pointer omission (FPO) (otherwise CMake will automatically turn it off)
154
- # /GL - Link time code generation (whole program optimization)
155
- # /Gy - Function-level linking
156
- SET(CMAKE_C_FLAGS_RELEASE "/DNDEBUG /O2 /Oy /GL /Gy ${CRT_FLAG_RELEASE}")
157
-
158
- # /Oy- - Disable frame pointer omission (FPO)
159
- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/DNDEBUG /Zi /O2 /Oy- /GL /Gy ${CRT_FLAG_RELEASE}")
160
-
161
- # /O1 - Optimize for size
162
- SET(CMAKE_C_FLAGS_MINSIZEREL "/DNDEBUG /O1 /Oy /GL /Gy ${CRT_FLAG_RELEASE}")
163
-
164
- # /IGNORE:4221 - Ignore empty compilation units
165
- SET(CMAKE_STATIC_LINKER_FLAGS "/IGNORE:4221")
166
-
167
- # /DYNAMICBASE - Address space load randomization (ASLR)
168
- # /NXCOMPAT - Data execution prevention (DEP)
169
- # /LARGEADDRESSAWARE - >2GB user address space on x86
170
- # /VERSION - Embed version information in PE header
171
- SET(CMAKE_EXE_LINKER_FLAGS "/DYNAMICBASE /NXCOMPAT /LARGEADDRESSAWARE /VERSION:${libgit2_VERSION_MAJOR}.${libgit2_VERSION_MINOR}")
172
-
173
- IF (NOT (MSVC_VERSION LESS 1900))
174
- # /GUARD:CF - Enable Control Flow Guard
175
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /GUARD:CF")
176
- ENDIF()
177
-
178
- # /DEBUG - Create a PDB
179
- # /LTCG - Link time code generation (whole program optimization)
180
- # /OPT:REF /OPT:ICF - Fold out duplicate code at link step
181
- # /INCREMENTAL:NO - Required to use /LTCG
182
- # /DEBUGTYPE:cv,fixup - Additional data embedded in the PDB (requires /INCREMENTAL:NO, so not on for Debug)
183
- SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG")
184
- SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "/RELEASE /LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
185
- SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/DEBUG /RELEASE /LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO /DEBUGTYPE:cv,fixup")
186
- SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "/RELEASE /LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO")
187
-
188
- # Same linker settings for DLL as EXE
189
- SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
190
- SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
191
- SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
192
- SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO}")
193
- SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL}")
194
- ELSE ()
195
- IF (ENABLE_REPRODUCIBLE_BUILDS)
196
- SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Dqc <TARGET> <LINK_FLAGS> <OBJECTS>")
197
- SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> Dq <TARGET> <LINK_FLAGS> <OBJECTS>")
198
- SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -D <TARGET>")
199
- ENDIF()
200
-
201
- SET(CMAKE_C_FLAGS "-D_GNU_SOURCE ${CMAKE_C_FLAGS}")
202
-
203
- ENABLE_WARNINGS(all)
204
- ENABLE_WARNINGS(extra)
205
-
206
- IF (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
207
- SET(CMAKE_C_FLAGS "-D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS ${CMAKE_C_FLAGS}")
208
- ENDIF()
77
+ if(WIN32)
78
+ # By default, libgit2 is built with WinHTTP. To use the built-in
79
+ # HTTP transport, invoke CMake with the "-DUSE_WINHTTP=OFF" argument.
80
+ option(USE_WINHTTP "Use Win32 WinHTTP routines" ON)
81
+ endif()
82
+
83
+ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
84
+ set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
85
+ endif()
86
+
87
+
88
+ # Modules
89
+
90
+ include(CheckLibraryExists)
91
+ include(CheckFunctionExists)
92
+ include(CheckSymbolExists)
93
+ include(CheckStructHasMember)
94
+ include(CheckPrototypeDefinition)
95
+ include(AddCFlagIfSupported)
96
+ include(FindPkgLibraries)
97
+ include(FindThreads)
98
+ include(FindStatNsec)
99
+ include(Findfutimens)
100
+ include(GNUInstallDirs)
101
+ include(IdeSplitSources)
102
+ include(FeatureSummary)
103
+ include(EnableWarnings)
104
+ include(DefaultCFlags)
209
105
 
210
- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -O0")
211
106
 
212
- IF (MINGW OR MSYS) # MinGW and MSYS always do PIC and complain if we tell them to
213
- STRING(REGEX REPLACE "-fPIC" "" CMAKE_SHARED_LIBRARY_C_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}")
214
- ELSEIF (BUILD_SHARED_LIBS)
215
- ADD_C_FLAG_IF_SUPPORTED(-fvisibility=hidden)
107
+ #
108
+ # Subdirectories
109
+ #
216
110
 
217
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
218
- ENDIF ()
111
+ add_subdirectory(src)
219
112
 
220
- IF (MINGW)
221
- # MinGW >= 3.14 uses the C99-style stdio functions
222
- # automatically, but forks like mingw-w64 still want
223
- # us to define this in order to use them
224
- ADD_DEFINITIONS(-D__USE_MINGW_ANSI_STDIO=1)
225
- ENDIF ()
113
+ if(BUILD_TESTS)
114
+ enable_testing()
115
+ add_subdirectory(tests)
116
+ endif()
226
117
 
227
- enable_warnings(documentation)
228
- disable_warnings(documentation-deprecated-sync)
229
- disable_warnings(missing-field-initializers)
230
- enable_warnings(strict-aliasing)
231
- enable_warnings(strict-prototypes)
232
- enable_warnings(declaration-after-statement)
233
- enable_warnings(shift-count-overflow)
234
- enable_warnings(unused-const-variable)
235
- enable_warnings(unused-function)
236
- enable_warnings(int-conversion)
237
- enable_warnings(c11-extensions)
238
- enable_warnings(c99-c11-compat)
118
+ if(BUILD_EXAMPLES)
119
+ add_subdirectory(examples)
120
+ endif()
239
121
 
240
- # MinGW uses gcc, which expects POSIX formatting for printf, but
241
- # uses the Windows C library, which uses its own format specifiers.
242
- # Disable format specifier warnings.
243
- if(MINGW)
244
- disable_warnings(format)
245
- disable_warnings(format-security)
246
- else()
247
- enable_warnings(format)
248
- enable_warnings(format-security)
122
+ if(BUILD_FUZZERS)
123
+ if((BUILD_TESTS OR BUILD_EXAMPLES) AND NOT USE_STANDALONE_FUZZERS)
124
+ message(FATAL_ERROR "Cannot build the fuzzer and the tests or examples together")
249
125
  endif()
250
- ENDIF()
251
-
252
- # Ensure that MinGW provides the correct header files.
253
- IF (WIN32 AND NOT CYGWIN)
254
- ADD_DEFINITIONS(-DWIN32 -D_WIN32_WINNT=0x0600)
255
- ENDIF()
256
-
257
- IF( NOT CMAKE_CONFIGURATION_TYPES )
258
- # Build Debug by default
259
- IF (NOT CMAKE_BUILD_TYPE)
260
- SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
261
- ENDIF ()
262
- ELSE()
263
- # Using a multi-configuration generator eg MSVC or Xcode
264
- # that uses CMAKE_CONFIGURATION_TYPES and not CMAKE_BUILD_TYPE
265
- ENDIF()
266
-
267
- IF(BUILD_FUZZERS AND NOT USE_STANDALONE_FUZZERS)
268
- # The actual sanitizer link target will be added when linking the fuzz
269
- # targets.
270
- SET(CMAKE_REQUIRED_FLAGS "-fsanitize=fuzzer-no-link")
271
- ADD_C_FLAG(-fsanitize=fuzzer-no-link)
272
- UNSET(CMAKE_REQUIRED_FLAGS)
273
- ENDIF ()
274
-
275
- ADD_SUBDIRECTORY(src)
276
-
277
- # Tests
278
- IF (NOT MSVC)
279
- IF (NOT BUILD_SHARED_LIBS)
280
- SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
281
- ENDIF()
282
- ENDIF ()
283
-
284
- IF (BUILD_CLAR)
285
- ENABLE_TESTING()
286
- ADD_SUBDIRECTORY(tests)
287
- ENDIF ()
126
+ add_subdirectory(fuzzers)
127
+ endif()
288
128
 
289
- IF (BUILD_EXAMPLES)
290
- ADD_SUBDIRECTORY(examples)
291
- ENDIF ()
292
129
 
293
- IF(BUILD_FUZZERS)
294
- IF(NOT USE_STANDALONE_FUZZERS)
295
- IF(BUILD_EXAMPLES)
296
- MESSAGE(FATAL_ERROR "Cannot build the fuzzer targets and the examples together")
297
- ENDIF()
298
- IF(BUILD_CLAR)
299
- MESSAGE(FATAL_ERROR "Cannot build the fuzzer targets and the tests together")
300
- ENDIF()
301
- ENDIF()
302
- ADD_SUBDIRECTORY(fuzzers)
303
- ENDIF()
130
+ # Summary
304
131
 
305
- FEATURE_SUMMARY(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
306
- FEATURE_SUMMARY(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
132
+ feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
133
+ feature_summary(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
@@ -406,30 +406,35 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
406
406
 
407
407
  ----------------------------------------------------------------------
408
408
 
409
- The regex library (deps/regex/) is licensed under the GNU LGPL
410
- (available at the end of this file).
409
+ The bundled PCRE implementation (deps/pcre/) is licensed under the BSD
410
+ license.
411
411
 
412
- Definitions for data structures and routines for the regular
413
- expression library.
412
+ Redistribution and use in source and binary forms, with or without
413
+ modification, are permitted provided that the following conditions are met:
414
414
 
415
- Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006,2008
416
- Free Software Foundation, Inc.
417
- This file is part of the GNU C Library.
415
+ * Redistributions of source code must retain the above copyright notice,
416
+ this list of conditions and the following disclaimer.
418
417
 
419
- The GNU C Library is free software; you can redistribute it and/or
420
- modify it under the terms of the GNU Lesser General Public
421
- License as published by the Free Software Foundation; either
422
- version 2.1 of the License, or (at your option) any later version.
418
+ * Redistributions in binary form must reproduce the above copyright
419
+ notice, this list of conditions and the following disclaimer in the
420
+ documentation and/or other materials provided with the distribution.
423
421
 
424
- The GNU C Library is distributed in the hope that it will be useful,
425
- but WITHOUT ANY WARRANTY; without even the implied warranty of
426
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
427
- Lesser General Public License for more details.
422
+ * Neither the name of the University of Cambridge nor the name of Google
423
+ Inc. nor the names of their contributors may be used to endorse or
424
+ promote products derived from this software without specific prior
425
+ written permission.
428
426
 
429
- You should have received a copy of the GNU Lesser General Public
430
- License along with the GNU C Library; if not, write to the Free
431
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
432
- 02110-1301 USA.
427
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
428
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
429
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
430
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
431
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
432
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
433
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
434
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
435
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
436
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
437
+ POSSIBILITY OF SUCH DAMAGE.
433
438
 
434
439
  ----------------------------------------------------------------------
435
440
 
@@ -1127,3 +1132,15 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1127
1132
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
1128
1133
  OF THE POSSIBILITY OF SUCH DAMAGE.
1129
1134
 
1135
+ ----------------------------------------------------------------------
1136
+
1137
+ The xoroshiro256** implementation is licensed in the public domain:
1138
+
1139
+ Written in 2018 by David Blackman and Sebastiano Vigna (vigna@acm.org)
1140
+
1141
+ To the extent possible under law, the author has dedicated all copyright
1142
+ and related and neighboring rights to this software to the public domain
1143
+ worldwide. This software is distributed without any warranty.
1144
+
1145
+ See <http://creativecommons.org/publicdomain/zero/1.0/>.
1146
+
@@ -3,28 +3,28 @@
3
3
  # <flag> - the compiler flag to test
4
4
  # This internally calls the CHECK_C_COMPILER_FLAG macro.
5
5
 
6
- INCLUDE(CheckCCompilerFlag)
6
+ include(CheckCCompilerFlag)
7
7
 
8
- MACRO(ADD_C_FLAG _FLAG)
9
- STRING(TOUPPER ${_FLAG} UPCASE)
10
- STRING(REGEX REPLACE "[-=]" "_" UPCASE_PRETTY ${UPCASE})
11
- STRING(REGEX REPLACE "^_+" "" UPCASE_PRETTY ${UPCASE_PRETTY})
12
- CHECK_C_COMPILER_FLAG(${_FLAG} IS_${UPCASE_PRETTY}_SUPPORTED)
8
+ macro(ADD_C_FLAG _FLAG)
9
+ string(TOUPPER ${_FLAG} UPCASE)
10
+ string(REGEX REPLACE "[-=]" "_" UPCASE_PRETTY ${UPCASE})
11
+ string(REGEX REPLACE "^_+" "" UPCASE_PRETTY ${UPCASE_PRETTY})
12
+ check_c_compiler_flag(${_FLAG} IS_${UPCASE_PRETTY}_SUPPORTED)
13
13
 
14
- IF(IS_${UPCASE_PRETTY}_SUPPORTED)
15
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_FLAG}")
16
- ELSE()
17
- MESSAGE(FATAL_ERROR "Required flag ${_FLAG} is not supported")
18
- ENDIF()
19
- ENDMACRO()
14
+ if(IS_${UPCASE_PRETTY}_SUPPORTED)
15
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_FLAG}")
16
+ else()
17
+ message(FATAL_ERROR "Required flag ${_FLAG} is not supported")
18
+ endif()
19
+ endmacro()
20
20
 
21
- MACRO(ADD_C_FLAG_IF_SUPPORTED _FLAG)
22
- STRING(TOUPPER ${_FLAG} UPCASE)
23
- STRING(REGEX REPLACE "[-=]" "_" UPCASE_PRETTY ${UPCASE})
24
- STRING(REGEX REPLACE "^_+" "" UPCASE_PRETTY ${UPCASE_PRETTY})
25
- CHECK_C_COMPILER_FLAG(${_FLAG} IS_${UPCASE_PRETTY}_SUPPORTED)
21
+ macro(ADD_C_FLAG_IF_SUPPORTED _FLAG)
22
+ string(TOUPPER ${_FLAG} UPCASE)
23
+ string(REGEX REPLACE "[-=]" "_" UPCASE_PRETTY ${UPCASE})
24
+ string(REGEX REPLACE "^_+" "" UPCASE_PRETTY ${UPCASE_PRETTY})
25
+ check_c_compiler_flag(${_FLAG} IS_${UPCASE_PRETTY}_SUPPORTED)
26
26
 
27
- IF(IS_${UPCASE_PRETTY}_SUPPORTED)
28
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_FLAG}")
29
- ENDIF()
30
- ENDMACRO()
27
+ if(IS_${UPCASE_PRETTY}_SUPPORTED)
28
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_FLAG}")
29
+ endif()
30
+ endmacro()