From cf74bde83c9197fec51836bba6d0e81f1ee10f19 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 26 Nov 2007 01:44:23 +0000 Subject: [PATCH] * io.c (rb_read_internal, rb_sysopen_internal): remove C99 dependency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ io.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61691ba939..f312ea69f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Nov 26 10:44:20 2007 Nobuyoshi Nakada + + * io.c (rb_read_internal, rb_sysopen_internal): remove C99 dependency. + Sun Nov 25 22:21:35 2007 Tanaka Akira * include/ruby/encoding.h (rb_enc_str_asciionly_p): declared. diff --git a/io.c b/io.c index 1bc8064700..ce1472ece0 100644 --- a/io.c +++ b/io.c @@ -919,7 +919,10 @@ read_func(void *ptr) static int rb_read_internal(int fd, void *buf, size_t count) { - struct read_struct rs = {fd, buf, count}; + struct read_struct rs; + rs.fd = fd; + rs.buf = buf; + rs.capa = count; return rb_thread_blocking_region(read_func, &rs, RB_UBF_DFL, 0); } @@ -3049,7 +3052,10 @@ sysopen_func(void *ptr) static int rb_sysopen_internal(char *fname, int flags, unsigned int mode) { - struct sysopen_struct data = {fname, flags, mode}; + struct sysopen_struct data; + data.fname = fname; + data.flag = flags; + data.mode = mode; return (int)rb_thread_blocking_region(sysopen_func, &data, RB_UBF_DFL, 0); }