* 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
This commit is contained in:
parent
3bda122ab9
commit
fb34a26003
@ -1,3 +1,8 @@
|
|||||||
|
Thu Mar 14 14:12:34 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* file.c (rb_sys_fail_path): use rb_sys_fail_path0 only on GCC.
|
||||||
|
__func__ is C99 feature.
|
||||||
|
|
||||||
Thu Mar 14 12:59:59 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
Thu Mar 14 12:59:59 2013 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* file.c (rb_sys_fail_path0): add to append the name of called function
|
* file.c (rb_sys_fail_path0): add to append the name of called function
|
||||||
|
7
file.c
7
file.c
@ -102,8 +102,8 @@ int flock(int, int);
|
|||||||
#define STAT(p, s) stat((p), (s))
|
#define STAT(p, s) stat((p), (s))
|
||||||
#endif
|
#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));
|
NORETURN(static void rb_sys_fail_path0(const char *,VALUE));
|
||||||
static void
|
static void
|
||||||
rb_sys_fail_path0(const char *func_name, VALUE path)
|
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_str_buf_append(mesg, path);
|
||||||
rb_sys_fail_str(mesg);
|
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 */
|
#if defined(__BEOS__) || defined(__HAIKU__) /* should not change ID if -1 */
|
||||||
static int
|
static int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user