accomodate excessively old gcc versions for raspbian mpy-cross cross-build
This commit is contained in:
parent
a43a19728c
commit
d9e0742a07
|
@ -34,6 +34,11 @@
|
|||
|
||||
#define SWAP(type, var1, var2) { type t = var2; var2 = var1; var1 = t; }
|
||||
|
||||
#if __GNUC__ < 5
|
||||
// n.b. does not actually detect overflow!
|
||||
#define __builtin_mul_overflow(a, b, x) (*(x) = (a) * (b), false)
|
||||
#endif
|
||||
|
||||
// Detect when a multiply causes an overflow.
|
||||
size_t mp_seq_multiply_len(size_t item_sz, size_t len) {
|
||||
size_t new_len;
|
||||
|
|
Loading…
Reference in New Issue