ruby-changes:27701
From: naruse <ko1@a...>
Date: Thu, 14 Mar 2013 15:00:02 +0900 (JST)
Subject: [ruby-changes:27701] naruse:r39753 (trunk): * file.c (rb_sys_fail_path): use rb_sys_fail_path0 only on GCC.
naruse 2013-03-14 14:59:53 +0900 (Thu, 14 Mar 2013) New Revision: 39753 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39753 Log: * file.c (rb_sys_fail_path): use rb_sys_fail_path0 only on GCC. __func__ is C99 feature. Modified files: trunk/ChangeLog trunk/file.c Index: ChangeLog =================================================================== --- ChangeLog (revision 39752) +++ ChangeLog (revision 39753) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Mar 14 14:12:34 2013 NARUSE, Yui <naruse@r...> + + * 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@r...> * file.c (rb_sys_fail_path0): add to append the name of called function Index: file.c =================================================================== --- file.c (revision 39752) +++ file.c (revision 39753) @@ -102,8 +102,8 @@ int flock(int, int); https://github.com/ruby/ruby/blob/trunk/file.c#L102 #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, https://github.com/ruby/ruby/blob/trunk/file.c#L112 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/