From d55a7d946b4efccaefdfb5b3ffc9cab270d4502b Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 1 Feb 2019 09:29:39 +0100 Subject: [PATCH] lib: Support gcc-4.6.4: Add stdint [U]SHRT macros. * include/stdint.h (SHRT_MAX, SHRT_MIN, USHRT_MAX, USHRT_MIN): New macro. --- include/stdint.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/stdint.h b/include/stdint.h index 0ab0a8e3..327042be 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright © 2017,2020 Jan (janneke) Nieuwenhuizen + * Copyright © 2017,2020,2022 Jan (janneke) Nieuwenhuizen * Copyright © 2018 Peter De Wachter * * This file is part of GNU Mes. @@ -105,6 +105,12 @@ typedef long uintptr_t; #define INT_MIN -2147483648 #define INT_MAX 2147483647 + +#define SHRT_MAX INT16_MAX +#define SHRT_MIN INT16_MIN +#define USHRT_MAX UINT16_MAX +#define USHRT_MIN UINT16_MIN + #if __i386__ || __arm__ #define LONG_MIN INT_MIN #define LONG_MAX INT_MAX