]> git.proxmox.com Git - libgit2.git/commit - src/integer.h
integer overflow: use compiler intrinsics if supported
authorEdward Thomson <ethomson@microsoft.com>
Thu, 12 Feb 2015 22:36:48 +0000 (17:36 -0500)
committerEdward Thomson <ethomson@microsoft.com>
Fri, 13 Feb 2015 14:28:09 +0000 (09:28 -0500)
commit16942c6fdaddb819b71b72e53aa4aa691e3c0053
tree05a719c0753521789eff1ebc4c4c284d80afb696
parent8aab36a3010372edec71e8c765d4ecfd848c09b6
integer overflow: use compiler intrinsics if supported

gcc and clang support __builtin_add_overflow, use it whenever
possible, falling back to our naive routines.
src/common.h
src/integer.h