This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/2] Provide __intmax_t and __uintmax_t


Provide __intmax_t and __uintmax_t via <machine/_default_types> for
FreeBSD compatibility.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
 newlib/libc/include/machine/_default_types.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/newlib/libc/include/machine/_default_types.h b/newlib/libc/include/machine/_default_types.h
index ffc646d..eaa6cec 100644
--- a/newlib/libc/include/machine/_default_types.h
+++ b/newlib/libc/include/machine/_default_types.h
@@ -211,6 +211,15 @@ typedef long __intptr_t;
 typedef unsigned long __uintptr_t;
 #endif
 
+#ifdef __INTMAX_TYPE__
+typedef __INTMAX_TYPE__ __intmax_t;
+#ifdef __UINTMAX_TYPE__
+typedef __UINTMAX_TYPE__ __uintmax_t;
+#else
+typedef unsigned __INTMAX_TYPE__ __uintmax_t;
+#endif
+#endif
+
 #undef __EXP
 
 #ifdef __cplusplus
-- 
1.8.4.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]