From 161fde4a43ba6f06abec13b28c82336f467eb6cf Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 16 Jan 2011 12:35:22 +0000 Subject: 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 --- ChangeLog | 5 +++++ io.c | 12 ++++++++++++ version.h | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c4e75f0587..c9bed54898 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jan 12 23:55:48 2011 KOSAKI Motohiro + + * io.c (rb_f_syscall): Add 64bit Linux support. Some syscall takes + long type arguments. + Thu Jan 13 00:06:38 2011 KOSAKI Motohiro * io.c (rb_f_syscall): Add warning messages. [ruby-core:34062] diff --git a/io.c b/io.c index 0a110f9ea2..099ad2c756 100644 --- a/io.c +++ b/io.c @@ -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) diff --git a/version.h b/version.h index d30bdd2a36..6a15475518 100644 --- a/version.h +++ b/version.h @@ -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 -- cgit v1.2.3