From: Eric Botcazou Date: Sun, 31 Jan 2021 22:23:31 +0000 (+0100) Subject: Add missing definition of SIZE_MAX X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2b5af1034829f69be5e91fc39c10cea267a93025;p=gcc.git Add missing definition of SIZE_MAX If the stdint.h system file follows the ISO C99 specification, it might not define SIZE_MAX in C++ by default, so provide a local fallback. gcc/ * system.h (SIZE_MAX): Define if not already defined. --- diff --git a/gcc/system.h b/gcc/system.h index 5dd1c34c3a3..a3f5948aaee 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -535,6 +535,10 @@ extern void *realloc (void *, size_t); #include #endif +#ifndef SIZE_MAX +# define SIZE_MAX INTTYPE_MAXIMUM (size_t) +#endif + #ifdef __cplusplus extern "C" { #endif