|
From: Erik de C. L. <ml...@me...> - 2008-12-16 00:29:51
|
Tor Lillqvist wrote:
> The runtime, i.e. the Microsoft C library, in all its incarnations,
> and the underlying (NT-based) Windows operating systems, support large
> files just fine. You just have to look in the header files for the
> correct functions names and types to use.
While this is true, be very careful because while MS may have implemented
a bunch of POSIX system calls, their implementations are often buggy and
inconsistent.
For instance, I found a that fstat and stat have some very strange and
unexpected behaviour on all version of windows up to an including
Vista:
http://www.mega-nerd.com/erikd/Blog/Windiots/posix.html
Over the years I have found many other similar wierd inconsistencies
on various versions of windows.
My solution is to avoid MS's broken POSIX layer and instead write a
wrapper around the CreateFile/ReadFile/WriteFile/SetFilePointer win32
API and use that instead. With these functions, at least you have a
fair chance that MS has tested them and made sure they work.
HTH,
Erik
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"I'm too fucking busy, or vice versa" -- Dorothy Parker
|