summaryrefslogtreecommitdiff
path: root/src/integer.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix MAX 32 bit build problem described in libgit2/libgit2#2917ntk/macosx_build_cherrypickedJeff Hostetler2015-02-201-1/+1
|
* integer overflow: use compiler intrinsics if supportedEdward Thomson2015-02-131-0/+15
| | | | | gcc and clang support __builtin_add_overflow, use it whenever possible, falling back to our naive routines.
* Make our overflow check look more like gcc/clang'sEdward Thomson2015-02-131-12/+16
| | | | | | | | | Make our overflow checking look more like gcc and clang's, so that we can substitute it out with the compiler instrinsics on platforms that support it. This means dropping the ability to pass `NULL` as an out parameter. As a result, the macros also get updated to reflect this as well.
* Introduce git__add_sizet_overflow and friendsEdward Thomson2015-02-121-0/+77
Add some helper functions to check for overflow in a type-specific manner.