1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2007-11-26 01:44:23 +00:00
parent 691df99d6a
commit cf74bde83c
2 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Mon Nov 26 10:44:20 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (rb_read_internal, rb_sysopen_internal): remove C99 dependency.
Sun Nov 25 22:21:35 2007 Tanaka Akira <akr@fsij.org> Sun Nov 25 22:21:35 2007 Tanaka Akira <akr@fsij.org>
* include/ruby/encoding.h (rb_enc_str_asciionly_p): declared. * include/ruby/encoding.h (rb_enc_str_asciionly_p): declared.

10
io.c
View file

@ -919,7 +919,10 @@ read_func(void *ptr)
static int static int
rb_read_internal(int fd, void *buf, size_t count) 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); return rb_thread_blocking_region(read_func, &rs, RB_UBF_DFL, 0);
} }
@ -3049,7 +3052,10 @@ sysopen_func(void *ptr)
static int static int
rb_sysopen_internal(char *fname, int flags, unsigned int mode) 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); return (int)rb_thread_blocking_region(sysopen_func, &data, RB_UBF_DFL, 0);
} }