ruby-changes:28109
From: ngoto <ko1@a...>
Date: Sat, 6 Apr 2013 23:45:16 +0900 (JST)
Subject: [ruby-changes:28109] ngoto:r40161 (trunk): * addr2line.c: quad_t and u_quad_t is not available on Solaris.
ngoto 2013-04-06 23:45:06 +0900 (Sat, 06 Apr 2013) New Revision: 40161 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40161 Log: * addr2line.c: quad_t and u_quad_t is not available on Solaris. __inline is not available with old compilers on Solaris. [ruby-dev:47229] [Bug #8227] Modified files: trunk/ChangeLog trunk/addr2line.c Index: ChangeLog =================================================================== --- ChangeLog (revision 40160) +++ ChangeLog (revision 40161) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Apr 6 23:38:09 2013 Naohisa Goto <ngotogenome@g...> + + * addr2line.c: quad_t and u_quad_t is not available on Solaris. + __inline is not available with old compilers on Solaris. + [ruby-dev:47229] [Bug #8227] + Sat Apr 6 23:31:38 2013 Tanaka Akira <akr@f...> * lib/resolv.rb: Add one-shot multicast DNS support. Index: addr2line.c =================================================================== --- addr2line.c (revision 40160) +++ addr2line.c (revision 40161) @@ -646,6 +646,19 @@ rb_dump_backtrace_with_lines(int num_tra https://github.com/ruby/ruby/blob/trunk/addr2line.c#L646 free(lines); } +#if defined(__sun) +/* Solaris has different quad_t and does not have u_quad_t */ +# include "ruby/defines.h" +# define quad_t LONG_LONG +# define u_quad_t unsigned LONG_LONG +/* __inline can only be used with GCC or Sun Studio 12 Update 1 or later */ +# if defined(__GNUC__) +# elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) +# else +# define __inline inline +# endif +#endif /* defined(__sun) */ + /* From FreeBSD's lib/libstand/printf.c */ /*- * Copyright (c) 1986, 1988, 1991, 1993 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/