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); }