summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-14 04:01:39 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-14 04:01:39 +0000
commit3bda122ab9387b05f99808e6f3415a7346ecb80a (patch)
tree9d86689e7f94a485251ca3f96c0d37c1241f5ad8 /file.c
parent2caf0bc820b4be3956b8f26a81d279d815eaea2d (diff)
* file.c (rb_sys_fail_path0): add to append the name of called function
to ease debugging for example blow umask_spec failure. http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20130309T010202Z.diff.html.gz * file.c (rb_sys_fail_path): use rb_sys_fail_path0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/file.c b/file.c
index d5abe304cf..3ee68f561f 100644
--- a/file.c
+++ b/file.c
@@ -102,7 +102,16 @@ int flock(int, int);
#define STAT(p, s) stat((p), (s))
#endif
-#define rb_sys_fail_path(path) rb_sys_fail_str(path)
+#define rb_sys_fail_path(path) rb_sys_fail_path0(__func__, path)
+
+NORETURN(static void rb_sys_fail_path0(const char *,VALUE));
+static void
+rb_sys_fail_path0(const char *func_name, VALUE path)
+{
+ VALUE mesg = rb_str_new_cstr(func_name);
+ rb_str_buf_append(mesg, path);
+ rb_sys_fail_str(mesg);
+}
#if defined(__BEOS__) || defined(__HAIKU__) /* should not change ID if -1 */
static int