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.
This commit is contained in:
Eric Botcazou 2021-01-31 23:23:31 +01:00
parent 98342bdd2b
commit 2b5af10348
1 changed files with 4 additions and 0 deletions

View File

@ -535,6 +535,10 @@ extern void *realloc (void *, size_t);
#include <inttypes.h>
#endif
#ifndef SIZE_MAX
# define SIZE_MAX INTTYPE_MAXIMUM (size_t)
#endif
#ifdef __cplusplus
extern "C" {
#endif