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:
parent
691df99d6a
commit
cf74bde83c
2 changed files with 12 additions and 2 deletions
|
@ -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>
|
||||
|
||||
* include/ruby/encoding.h (rb_enc_str_asciionly_p): declared.
|
||||
|
|
10
io.c
10
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue