From: Eric Botcazou Date: Sun, 31 Jan 2021 22:23:31 +0000 (+0100) Subject: Add missing definition of SIZE_MAX X-Git-Tag: releases/gcc-10.3.0~337 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b051aa35005b1089ab0ceba93568f388b9132b92;p=thirdparty%2Fgcc.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 544f7ba427fe..263070169abb 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -528,6 +528,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