diff options
author | pixel <pixel> | 2004-04-30 08:21:36 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-04-30 08:21:36 +0000 |
commit | ee584fefbfc67549ae0a8bf6f421b6840cf455de (patch) | |
tree | 0203c89cad4b1e8d37986c82d5b92c371af7fe62 /lib/Handle.cc | |
parent | 3ae5cc3f93a80232a7d173105ff95a212f03d978 (diff) |
WHOOPS
Diffstat (limited to 'lib/Handle.cc')
-rw-r--r-- | lib/Handle.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc index 199aa4b..fe58b48 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Handle.cc,v 1.68 2003-12-27 13:36:48 pixel Exp $ */ +/* $Id: Handle.cc,v 1.69 2004-04-30 08:21:36 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -423,6 +423,15 @@ ssize_t Handle::uread(void * buf, size_t count) { itell += err; return err; } else { +#if defined (_WIN32) && !defined (NO_HFILE) + if (hFile) { + DWORD rcount; + if (!ReadFile(hFile, buf, count, &rcount, 0)) { + // Error.. + } + itell += count = rcount; + } else +#endif itell += count = ::read(h, buf, count); return count; } |