From a23bc676658106e96a00bd294e64ce53249b1392 Mon Sep 17 00:00:00 2001 From: akiyoshi Date: Thu, 19 Aug 2004 02:09:51 +0000 Subject: Update for VMS ports. * dln.c (dln_load): Modify to call lib$find_image_symbol for VMS. * io.c (rb_io_fwrite): Use fputc() for VMS non-stream file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index 1556a86f73..09fbde48f9 100644 --- a/io.c +++ b/io.c @@ -135,7 +135,9 @@ static VALUE lineno = INT2FIX(0); #elif defined(__BEOS__) # define READ_DATA_PENDING(fp) (fp->_state._eof == 0) #elif defined(__VMS) -# define READ_DATA_PENDING(fp) (((unsigned int)((*(fp))->_flag) & _IOEOF) == 0) +# define READ_DATA_PENDING_COUNT(fp) ((unsigned int)(*(fp))->_cnt) +# define READ_DATA_PENDING(fp) (((unsigned int)(*(fp))->_cnt) > 0) +# define READ_DATA_BUFFERED(fp) 0 #else /* requires systems own version of the ReadDataPending() */ extern int ReadDataPending(); @@ -385,7 +387,7 @@ rb_io_fwrite(ptr, len, f) long n, r; if ((n = len) <= 0) return n; -#ifdef __human68k__ +#if defined(__human68k__) || defined(__vms) do { if (fputc(*ptr++, f) == EOF) { if (ferror(f)) return -1L; -- cgit v1.2.3