Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kaworu/7536490 to your computer and use it in GitHub Desktop.
Save kaworu/7536490 to your computer and use it in GitHub Desktop.
From beea9b340e1ca39cbe4ac1329b6e34831ca15ebc Mon Sep 17 00:00:00 2001
From: Alexandre Perrin <[email protected]>
Date: Mon, 18 Nov 2013 23:16:22 +0100
Subject: [PATCH] fix the INT64_C and INTMAX_C family macro for x86_64.
This patch fix the expanding type of both the INT64_C and the INTMAX_C
family macros to match their corresponding type:
- INT64_C(value) to `int_least64_t`
- UINT64_C(value) to `uint_least64_t`
- INTMAX_C(value) to `intmax_t`
- UINTMAX_C(value) to `uintmax_t`
---
sys/cpu/x86_64/include/int_const.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/cpu/x86_64/include/int_const.h b/sys/cpu/x86_64/include/int_const.h
index 2efe6ba..71dcbed 100644
--- a/sys/cpu/x86_64/include/int_const.h
+++ b/sys/cpu/x86_64/include/int_const.h
@@ -42,14 +42,14 @@
#define INT8_C(c) (c)
#define INT16_C(c) (c)
#define INT32_C(c) (c)
-#define INT64_C(c) (c ## LL)
+#define INT64_C(c) (c ## L)
#define UINT8_C(c) (c)
#define UINT16_C(c) (c)
#define UINT32_C(c) (c ## U)
-#define UINT64_C(c) (c ## ULL)
+#define UINT64_C(c) (c ## UL)
-#define INTMAX_C(c) (c ## LL)
-#define UINTMAX_C(c) (c ## ULL)
+#define INTMAX_C(c) (c ## L)
+#define UINTMAX_C(c) (c ## UL)
#endif
--
1.8.4.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment