summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-11 19:12:16 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-11 21:13:45 +0900
commit66a844fd07ca0fd652a20a1973ea242422d4ae6d (patch)
treeb2299132d3e53274abb756e2a3eaa517676e7cbb /include
parent72549cfe98a16097bb34256a8b6e75845027345b (diff)
Define printf qualifier prefix fallbacks
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4050
Diffstat (limited to 'include')
-rw-r--r--include/ruby/internal/arithmetic/gid_t.h4
-rw-r--r--include/ruby/internal/arithmetic/mode_t.h4
-rw-r--r--include/ruby/internal/arithmetic/off_t.h10
-rw-r--r--include/ruby/internal/arithmetic/pid_t.h4
-rw-r--r--include/ruby/internal/arithmetic/uid_t.h4
5 files changed, 26 insertions, 0 deletions
diff --git a/include/ruby/internal/arithmetic/gid_t.h b/include/ruby/internal/arithmetic/gid_t.h
index 32e3578bd2..094fc63092 100644
--- a/include/ruby/internal/arithmetic/gid_t.h
+++ b/include/ruby/internal/arithmetic/gid_t.h
@@ -31,4 +31,8 @@
# define NUM2GIDT RB_NUM2LONG
#endif
+#ifndef PRI_GIDT_PREFIX
+# define PRI_GIDT_PREFIX PRI_LONG_PREFIX
+#endif
+
#endif /* RBIMPL_ARITHMETIC_GID_T_H */
diff --git a/include/ruby/internal/arithmetic/mode_t.h b/include/ruby/internal/arithmetic/mode_t.h
index ee47eb8221..46e41f7ef9 100644
--- a/include/ruby/internal/arithmetic/mode_t.h
+++ b/include/ruby/internal/arithmetic/mode_t.h
@@ -31,4 +31,8 @@
# define MODET2NUM RB_INT2NUM
#endif
+#ifndef PRI_MODET_PREFIX
+# define PRI_MODET_PREFIX PRI_INT_PREFIX
+#endif
+
#endif /* RBIMPL_ARITHMETIC_MODE_T_H */
diff --git a/include/ruby/internal/arithmetic/off_t.h b/include/ruby/internal/arithmetic/off_t.h
index 84ec807e3d..c1959c61a1 100644
--- a/include/ruby/internal/arithmetic/off_t.h
+++ b/include/ruby/internal/arithmetic/off_t.h
@@ -46,4 +46,14 @@
# define NUM2OFFT RB_NUM2INT
#endif
+#ifdef PRI_OFFT_PREFIX
+# /* take that. */
+#elif SIZEOF_OFF_T == SIZEOF_LONG_LONG
+# define PRI_OFFT_PREFIX PRI_LL_PREFIX
+#elif SIZEOF_OFF_T == SIZEOF_LONG
+# define PRI_OFFT_PREFIX PRI_LONG_PREFIX
+#else
+# define PRI_OFFT_PREFIX PRI_INT_PREFIX
+#endif
+
#endif /* RBIMPL_ARITHMETIC_OFF_T_H */
diff --git a/include/ruby/internal/arithmetic/pid_t.h b/include/ruby/internal/arithmetic/pid_t.h
index eaca402776..86373ebfde 100644
--- a/include/ruby/internal/arithmetic/pid_t.h
+++ b/include/ruby/internal/arithmetic/pid_t.h
@@ -31,4 +31,8 @@
# define NUM2PIDT RB_NUM2LONG
#endif
+#ifndef PRI_PIDT_PREFIX
+# define PRI_PIDT_PREFIX PRI_LONG_PREFIX
+#endif
+
#endif /* RBIMPL_ARITHMETIC_PID_T_H */
diff --git a/include/ruby/internal/arithmetic/uid_t.h b/include/ruby/internal/arithmetic/uid_t.h
index bdcf42f049..a990b2f480 100644
--- a/include/ruby/internal/arithmetic/uid_t.h
+++ b/include/ruby/internal/arithmetic/uid_t.h
@@ -31,4 +31,8 @@
# define NUM2UIDT RB_NUM2LONG
#endif
+#ifndef PRI_UIDT_PREFIX
+# define PRI_UIDT_PREFIX PRI_LONG_PREFIX
+#endif
+
#endif /* RBIMPL_ARITHMETIC_UID_T_H */