summaryrefslogtreecommitdiff
path: root/include/stdlib/machine/_stdint.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stdlib/machine/_stdint.h')
-rw-r--r--include/stdlib/machine/_stdint.h41
1 files changed, 32 insertions, 9 deletions
diff --git a/include/stdlib/machine/_stdint.h b/include/stdlib/machine/_stdint.h
index 9a4f35f..d8f38ff 100644
--- a/include/stdlib/machine/_stdint.h
+++ b/include/stdlib/machine/_stdint.h
@@ -122,7 +122,15 @@
#define UINT_FAST16_MAX UINT32_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.5 Limits of greatest-width integer types
+ */
+#define INTMAX_MIN INT64_MIN
+#define INTMAX_MAX INT64_MAX
+#define UINTMAX_MAX UINT64_MAX
+#ifdef AARCH64
/*
* ISO/IEC 9899:1999
* 7.18.2.4 Limits of integer types capable of holding object pointers
@@ -133,27 +141,42 @@
/*
* ISO/IEC 9899:1999
- * 7.18.2.5 Limits of greatest-width integer types
+ * 7.18.3 Limits of other integer types
*/
-#define INTMAX_MIN INT64_MIN
-#define INTMAX_MAX INT64_MAX
-#define UINTMAX_MAX UINT64_MAX
+/* Limits of ptrdiff_t. */
+#define PTRDIFF_MIN INT64_MIN
+#define PTRDIFF_MAX INT64_MAX
+
+/* Limit of size_t. */
+#define SIZE_MAX UINT64_MAX
+
+#else /* AARCH32 */
+/*
+ * ISO/IEC 9899:1999
+ * 7.18.2.4 Limits of integer types capable of holding object pointers
+ */
+#define INTPTR_MIN INT32_MIN
+#define INTPTR_MAX INT32_MAX
+#define UINTPTR_MAX UINT32_MAX
/*
* ISO/IEC 9899:1999
* 7.18.3 Limits of other integer types
*/
/* Limits of ptrdiff_t. */
-#define PTRDIFF_MIN INT64_MIN
-#define PTRDIFF_MAX INT64_MAX
+#define PTRDIFF_MIN INT32_MIN
+#define PTRDIFF_MAX INT32_MAX
+
+/* Limit of size_t. */
+#define SIZE_MAX UINT32_MAX
+
+#endif /* AARCH64 */
+
/* Limits of sig_atomic_t. */
#define SIG_ATOMIC_MIN INT32_MIN
#define SIG_ATOMIC_MAX INT32_MAX
-/* Limit of size_t. */
-#define SIZE_MAX UINT64_MAX
-
#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */
/* Limits of wchar_t. */
#define WCHAR_MIN INT32_MIN