This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH 1/2] Provide __intmax_t and __uintmax_t
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: newlib at sourceware dot org
- Cc: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Date: Mon, 10 Oct 2016 08:43:00 +0200
- Subject: [PATCH 1/2] Provide __intmax_t and __uintmax_t
- Authentication-results: sourceware.org; auth=none
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