[BACK]Return to stdio.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / stdio

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/stdio/stdio.c between version 1.13 and 1.14

version 1.13, 2003/08/07 16:43:33 version 1.14, 2008/03/13 15:40:00
Line 68  __sread(cookie, buf, n)
Line 68  __sread(cookie, buf, n)
         _DIAGASSERT(fp != NULL);          _DIAGASSERT(fp != NULL);
         _DIAGASSERT(buf != NULL);          _DIAGASSERT(buf != NULL);
   
         ret = read(fp->_file, buf, (size_t)n);          ret = read(__sfileno(fp), buf, (size_t)n);
         /* if the read succeeded, update the current offset */          /* if the read succeeded, update the current offset */
         if (ret >= 0)          if (ret >= 0)
                 fp->_offset += ret;                  fp->_offset += ret;
Line 89  __swrite(cookie, buf, n)
Line 89  __swrite(cookie, buf, n)
         _DIAGASSERT(buf != NULL);          _DIAGASSERT(buf != NULL);
   
         if (fp->_flags & __SAPP)          if (fp->_flags & __SAPP)
                 (void) lseek(fp->_file, (off_t)0, SEEK_END);                  (void) lseek(__sfileno(fp), (off_t)0, SEEK_END);
         fp->_flags &= ~__SOFF;  /* in case FAPPEND mode is set */          fp->_flags &= ~__SOFF;  /* in case FAPPEND mode is set */
         return (write(fp->_file, buf, (size_t)n));          return write(__sfileno(fp), buf, (size_t)n);
 }  }
   
 fpos_t  fpos_t
Line 105  __sseek(cookie, offset, whence)
Line 105  __sseek(cookie, offset, whence)
   
         _DIAGASSERT(fp != NULL);          _DIAGASSERT(fp != NULL);
   
         ret = lseek(fp->_file, (off_t)offset, whence);          ret = lseek(__sfileno(fp), (off_t)offset, whence);
         if (ret == -1L)          if (ret == -1L)
                 fp->_flags &= ~__SOFF;                  fp->_flags &= ~__SOFF;
         else {          else {
Line 122  __sclose(cookie)
Line 122  __sclose(cookie)
   
         _DIAGASSERT(cookie != NULL);          _DIAGASSERT(cookie != NULL);
   
         return (close(((FILE *)cookie)->_file));          return close(__sfileno((FILE *)cookie));
 }  }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

CVSweb <webmaster@jp.NetBSD.org>