- 20 Jan, 2019 4 commits
-
-
Correct the documentation on the fallback add/multiply with overflow functions.
Edward Thomson committed -
Windows provides <intsafe.h> which provides "performant" add and multiply with overflow operations. Use them when possible.
Edward Thomson committed -
Edward Thomson committed
-
Use the smallest unsigned type that is equivalent to `size_t` to simplify the conditionals. Error if we're on a system that we believe offers builtins but we cannot determine which one to use.
Edward Thomson committed
-
- 10 Jan, 2019 1 commit
-
-
This change tweaks the macros for git__{add,multiply}_sizet_overflow so that GCC can use them. It also stops using the uadd,umul versions since the add,mul can handle way more cases.
lhchavez committed
-
- 09 Jan, 2019 1 commit
-
-
Less controversial changes together is better.
lhchavez committed
-
- 06 Jan, 2019 2 commits
-
-
It seems like MingW64's size_t is defined differently than in Linux.
lhchavez committed -
This change fixes a bunch of warnings that were discovered by compiling with `clang -target=i386-pc-linux-gnu`. It turned out that the intrinsics were not necessarily being used in all platforms! Especially in GCC, since it does not support __has_builtin. Some more warnings were gleaned from the Windows build, but I stopped when I saw that some third-party dependencies (e.g. zlib) have warnings of their own, so we might never be able to enable -Werror there.
lhchavez committed
-
- 01 Feb, 2018 1 commit
-
-
use consistent names for the #include / #define header guard pattern.
Edward Thomson committed
-
- 23 Jan, 2017 1 commit
-
-
Edward Thomson committed
-
- 20 Feb, 2015 1 commit
-
-
Jeff Hostetler committed
-
- 13 Feb, 2015 3 commits
-
-
gcc and clang support __builtin_add_overflow, use it whenever possible, falling back to our naive routines.
Edward Thomson committed -
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.
Edward Thomson committed -
Add some helper functions to check for overflow in a type-specific manner.
Edward Thomson committed
-