[前][次][番号順一覧][スレッド一覧]

ruby-changes:64830

From: Nobuyoshi <ko1@a...>
Date: Mon, 11 Jan 2021 21:14:03 +0900 (JST)
Subject: [ruby-changes:64830] 66a844fd07 (master): Define printf qualifier prefix fallbacks

https://git.ruby-lang.org/ruby.git/commit/?id=66a844fd07

From 66a844fd07ca0fd652a20a1973ea242422d4ae6d Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 11 Jan 2021 19:12:16 +0900
Subject: Define printf qualifier prefix fallbacks


diff --git a/include/ruby/internal/arithmetic/gid_t.h b/include/ruby/internal/arithmetic/gid_t.h
index 32e3578..094fc63 100644
--- a/include/ruby/internal/arithmetic/gid_t.h
+++ b/include/ruby/internal/arithmetic/gid_t.h
@@ -31,4 +31,8 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/arithmetic/gid_t.h#L31
 # 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 ee47eb8..46e41f7 100644
--- a/include/ruby/internal/arithmetic/mode_t.h
+++ b/include/ruby/internal/arithmetic/mode_t.h
@@ -31,4 +31,8 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/arithmetic/mode_t.h#L31
 # 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 84ec807..c1959c6 100644
--- a/include/ruby/internal/arithmetic/off_t.h
+++ b/include/ruby/internal/arithmetic/off_t.h
@@ -46,4 +46,14 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/arithmetic/off_t.h#L46
 # 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 eaca402..86373eb 100644
--- a/include/ruby/internal/arithmetic/pid_t.h
+++ b/include/ruby/internal/arithmetic/pid_t.h
@@ -31,4 +31,8 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/arithmetic/pid_t.h#L31
 # 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 bdcf42f..a990b2f 100644
--- a/include/ruby/internal/arithmetic/uid_t.h
+++ b/include/ruby/internal/arithmetic/uid_t.h
@@ -31,4 +31,8 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/arithmetic/uid_t.h#L31
 # define NUM2UIDT RB_NUM2LONG
 #endif
 
+#ifndef PRI_UIDT_PREFIX
+# define PRI_UIDT_PREFIX PRI_LONG_PREFIX
+#endif
+
 #endif /* RBIMPL_ARITHMETIC_UID_T_H */
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]