summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-16 12:35:22 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-16 12:35:22 +0000
commit161fde4a43ba6f06abec13b28c82336f467eb6cf (patch)
tree474cd413611044b7d3cc80845f270db6d2c87b7b
parent54d8811ce66c27cd5af6341f58e482f0c4d8d79f (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--ChangeLog5
-rw-r--r--io.c12
-rw-r--r--version.h2
3 files changed, 18 insertions, 1 deletions
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 <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]
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