summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-07-22 11:25:48 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-07-22 15:41:42 +0900
commit75f60e5a460b96b3130fbc941ddcce86df0fc2da (patch)
treef4b3bbd9bd3cc46ccdd957870f54c62e78e38a3c /sprintf.c
parentfc50b2eae5b1f73d7be790e7e864f810d2bebdc9 (diff)
downloadruby-75f60e5a460b96b3130fbc941ddcce86df0fc2da.tar.gz
Sort out quad_t related macros
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sprintf.c b/sprintf.c
index 62b7503d98..f54336fca5 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -974,14 +974,12 @@ fmt_setup(char *buf, size_t size, int c, int flags, int width, int prec)
#undef ferror
#undef clearerr
#undef fileno
-#if SIZEOF_LONG < SIZEOF_VOIDP
-# if SIZEOF_LONG_LONG == SIZEOF_VOIDP
-# define _HAVE_SANE_QUAD_
-# define _HAVE_LLP64_
-# define quad_t LONG_LONG
-# define u_quad_t unsigned LONG_LONG
+#if SIZEOF_LONG < SIZEOF_LONG_LONG
+# if SIZEOF_LONG_LONG == SIZEOF_VOIDP
+/* actually this doesn't mean a pointer is strictly 64bit, but just
+ * quad_t size */
+# define _HAVE_LLP64_
# endif
-#elif SIZEOF_LONG != SIZEOF_LONG_LONG && SIZEOF_LONG_LONG == 8
# define _HAVE_SANE_QUAD_
# define quad_t LONG_LONG
# define u_quad_t unsigned LONG_LONG