diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-16 12:35:22 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-16 12:35:22 +0000 |
commit | 161fde4a43ba6f06abec13b28c82336f467eb6cf (patch) | |
tree | 474cd413611044b7d3cc80845f270db6d2c87b7b | |
parent | 54d8811ce66c27cd5af6341f58e482f0c4d8d79f (diff) |
merges r30525 from trunk into ruby_1_9_2.
--
* io.c (rb_f_syscall): Add 64bit Linux support. Some syscall takes
long type arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | io.c | 12 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 18 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Jan 12 23:55:48 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> + + * io.c (rb_f_syscall): Add 64bit Linux support. Some syscall takes + long type arguments. + Thu Jan 13 00:06:38 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> * io.c (rb_f_syscall): Add warning messages. [ruby-core:34062] @@ -7555,6 +7555,18 @@ rb_f_syscall(int argc, VALUE *argv) # else # error ---->> it is asserted that __syscall takes the first argument and returns retval in 64bit signed integer. <<---- # endif +#elif defined linux +# define SYSCALL syscall +# define NUM2SYSCALLID(x) NUM2LONG(x) +# define RETVAL2NUM(x) LONG2NUM(x) + /* + * Linux man page says, syscall(2) function prototype is below. + * + * int syscall(int number, ...); + * + * But, it's incorrect. Actual one takes and returned long. (see unistd.h) + */ + long num, retval = -1; #else # define SYSCALL syscall # define NUM2SYSCALLID(x) NUM2INT(x) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 153 +#define RUBY_PATCHLEVEL 154 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 |