summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-17 09:14:34 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-17 09:14:34 +0000
commit7a5d128385b927b8b3a69d1f008b03c72c7dae60 (patch)
tree432880071f4b1d3adab18c3c756ddfee74296a43
parent4341d611c1b6f13f185da6bb9dc84a8b399c869f (diff)
* dir.c (sys_warning): should not call a vararg function
rb_sys_warning() indirectly. [ruby-core:07886] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--dir.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index aa901fc..0b8d4ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed May 17 17:55:26 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * dir.c (sys_warning): should not call a vararg function
+ rb_sys_warning() indirectly. [ruby-core:07886]
+
Wed May 17 08:17:15 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* util.c (ruby_strtod): try to reduce errors using powersOf10
diff --git a/dir.c b/dir.c
index 83feef9..266c4ec 100644
--- a/dir.c
+++ b/dir.c
@@ -799,9 +799,16 @@ dir_s_rmdir(obj, dir)
return INT2FIX(0);
}
+static void
+sys_warning_1(mesg)
+ const char* mesg;
+{
+ rb_sys_warning("%s", mesg);
+}
+
#define GLOB_VERBOSE (1 << (sizeof(int) * CHAR_BIT - 1))
#define sys_warning(val) \
- ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)_((VALUE)))rb_sys_warning, (VALUE)(val), 0))
+ ((flags & GLOB_VERBOSE) && rb_protect((VALUE (*)_((VALUE)))sys_warning_1, (VALUE)(val), 0))
/* Return nonzero if S has any special globbing chars in it. */
static int