diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-22 07:26:42 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-22 07:26:42 +0000 |
commit | 2bd0c2bf73acd0841619f67e3448573e5b6e3064 (patch) | |
tree | 8d1f8bb30c4092ea1c809a0f7bfe65bb0cd94d66 /io.c | |
parent | 890521d11783ac21503052e2a5f86c4ddfc6a9d8 (diff) |
* the VMS support patch submitted by Akiyoshi, Masamichi
<Masamichi.Akiyoshi@jp.compaq.com> is merged.
* eval.c (exec_under): changing ruby_class is OK, but should not
alter cbase.
* eval.c (yield_under_i): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -12,6 +12,11 @@ **********************************************************************/ +#if defined(__VMS) +#define _XOPEN_SOURCE +#define _POSIX_C_SOURCE 2 +#endif + #include "ruby.h" #include "rubyio.h" #include "rubysig.h" @@ -131,6 +136,8 @@ static VALUE lineno; # define READ_DATA_PENDING(fp) (fp->_state._eof == 0) #elif defined(__UCLIBC__) # define READ_DATA_PENDING(fp) ((fp)->bufpos < (fp)->bufend) +#elif defined(__VMS) +# define READ_DATA_PENDING(fp) (((unsigned int)((*(fp))->_flag) & _IOEOF) == 0) #else /* requires systems own version of the ReadDataPending() */ extern int ReadDataPending(); @@ -1643,7 +1650,7 @@ rb_file_sysopen(fname, flags, mode) return rb_file_sysopen_internal(io, fname, flags, mode); } -#if defined (NT) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) +#if defined (NT) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__VMS) static struct pipe_list { OpenFile *fptr; struct pipe_list *next; @@ -1685,7 +1692,7 @@ pipe_del_fptr(fptr) } } -#if defined (NT) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) +#if defined (NT) || defined(DJGPP) || defined(__CYGWIN__) || defined(__human68k__) || defined(__VMS) static void pipe_atexit _((void)) { @@ -1748,7 +1755,7 @@ pipe_open(pname, mode) int modef = rb_io_mode_flags(mode); OpenFile *fptr; -#if defined(NT) || defined(DJGPP) || defined(__human68k__) +#if defined(NT) || defined(DJGPP) || defined(__human68k__) || defined(__VMS) FILE *f = popen(pname, mode); if (!f) rb_sys_fail(pname); |