diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2021-01-31 23:23:31 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2021-01-31 23:25:56 +0100 |
commit | 2b5af1034829f69be5e91fc39c10cea267a93025 (patch) | |
tree | ce767066cbcb2f79bc8a2e6d0ad1823bd7296cb5 | |
parent | 98342bdd2b7085c9e7e4c9fbb07c3917a0013515 (diff) | |
download | gcc-2b5af1034829f69be5e91fc39c10cea267a93025.zip gcc-2b5af1034829f69be5e91fc39c10cea267a93025.tar.gz gcc-2b5af1034829f69be5e91fc39c10cea267a93025.tar.bz2 |
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.
-rw-r--r-- | gcc/system.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h index 5dd1c34..a3f5948 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -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 |