From f4d6dff6b9b95cd198d81078fac054da9575cc49 Mon Sep 17 00:00:00 2001 From: NicJA Date: Mon, 10 Aug 2015 03:16:39 +0000 Subject: [PATCH] fix limits.h c++ usage of stdint.h git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@50998 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- compiler/stdc/include/aros/stdc/limits.h | 3 +++ compiler/stdc/include/aros/stdc/stdint.h | 14 ++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/compiler/stdc/include/aros/stdc/limits.h b/compiler/stdc/include/aros/stdc/limits.h index 567af34e50..ab747188a9 100644 --- a/compiler/stdc/include/aros/stdc/limits.h +++ b/compiler/stdc/include/aros/stdc/limits.h @@ -8,6 +8,9 @@ #ifndef _STDC_LIMITS_H_ #define _STDC_LIMITS_H_ +#ifdef __cplusplus +#define __STDC_LIMIT_MACROS +#endif #include /* Sizes of integer types */ diff --git a/compiler/stdc/include/aros/stdc/stdint.h b/compiler/stdc/include/aros/stdc/stdint.h index 86630050e1..63144c152d 100644 --- a/compiler/stdc/include/aros/stdc/stdint.h +++ b/compiler/stdc/include/aros/stdc/stdint.h @@ -1,6 +1,3 @@ -#ifndef _STDC_STDINT_H_ -#define _STDC_STDINT_H_ - /* Copyright © 1995-2012, The AROS Development Team. All rights reserved. $Id$ @@ -18,7 +15,8 @@ #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) - +#ifndef _STDC_STDINT_H_LIMITMACROS +#define _STDC_STDINT_H_LIMITMACROS #define INT8_MIN (-128) #define INT16_MIN (-32767-1) #define INT32_MIN (-2147483647-1) @@ -95,8 +93,10 @@ #endif - +#endif /* _STDC_STDINT_H_LIMITMACROS */ #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS +#ifndef _STDC_STDINT_H_CONSTMACROS +#define _STDC_STDINT_H_CONSTMACROS /* Signed. */ # define INT8_C(c) c @@ -133,7 +133,5 @@ /* Maximal unsigned integer (unsigned long long) size */ # define UINTMAX_MAX UINT64_MAX - +#endif /* #endif /* _STDC_STDINT_H_CONSTMACROS */ */ #endif /* !__cplusplus || __STDC_CONSTANT_MACROS */ - -#endif /* _STDC_STDINT_H_ */ -- 2.11.4.GIT