summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */