summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-14 05:59:53 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-14 05:59:53 +0000
commitfb34a2600326f6ba3ba116c35d1395e90d10fd00 (patch)
tree18bbcc7aa48b7493bb8f4491c33c74589d587403 /file.c
parent3bda122ab9387b05f99808e6f3415a7346ecb80a (diff)
* file.c (rb_sys_fail_path): use rb_sys_fail_path0 only on GCC.
__func__ is C99 feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/file.c b/file.c
index 3ee68f561f..14636d34c9 100644
--- a/file.c
+++ b/file.c
@@ -102,8 +102,8 @@ int flock(int, int);
#define STAT(p, s) stat((p), (s))
#endif
-#define rb_sys_fail_path(path) rb_sys_fail_path0(__func__, path)
-
+#ifdef __GNUC__
+# 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)
@@ -112,6 +112,9 @@ rb_sys_fail_path0(const char *func_name, VALUE path)
rb_str_buf_append(mesg, path);
rb_sys_fail_str(mesg);
}
+#else
+# define rb_sys_fail_path(path) rb_sys_fail_str(path)
+#endif
#if defined(__BEOS__) || defined(__HAIKU__) /* should not change ID if -1 */
static int