summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 15:03:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-12 15:03:51 +0000
commitcea3919ae61ae16e04a5ee5c5394970c3960a0af (patch)
tree41c74b4c9bc624cc96691bf759a7d177f3345171 /ext
parent150b4efa5510d77fdde7b9692b3c391fbde6ac19 (diff)
* configure.in (RUBY_CHECK_PRINTF_PREFIX): check for printf format
specifier if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dl/cfunc.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c
index f5ad3ddd63..33ac78490f 100644
--- a/ext/dl/cfunc.c
+++ b/ext/dl/cfunc.c
@@ -566,13 +566,15 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
}
#endif
else{
- rb_raise(rb_eDLError,
-#ifndef LONG_LONG_VALUE
- "unsupported call type: %lx",
-#else
- "unsupported call type: %llx",
-#endif
- cfunc->calltype);
+ const char *name = rb_id2name(cfunc->calltype);
+ if( name ){
+ rb_raise(rb_eDLError, "unsupported call type: %s",
+ name);
+ }
+ else{
+ rb_raise(rb_eDLError, "unsupported call type: %"PRIxVALUE,
+ cfunc->calltype);
+ }
}
rb_dl_set_last_error(self, INT2NUM(errno));