Sync with Git 2.31.6

This commit is contained in:
Junio C Hamano
2022-12-13 21:09:40 +09:00
12 changed files with 403 additions and 82 deletions

View File

@ -929,6 +929,14 @@ static inline size_t st_sub(size_t a, size_t b)
return a - b;
}
static inline int cast_size_t_to_int(size_t a)
{
if (a > INT_MAX)
die("number too large to represent as int on this platform: %"PRIuMAX,
(uintmax_t)a);
return (int)a;
}
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
# define xalloca(size) (alloca(size))