cURL / Mailing Lists / curl-library / Single Mail


Re: FILE * => fd ?

From: Sterling Hughes <>
Date: Fri, 10 Aug 2001 11:19:41 -0400 (EDT)

On Fri, 10 Aug 2001, SM wrote:

> At 22:04 09-08-2001 +0800, Andrew Francis wrote:
> >Win32 has it's own native file routines - CreateFile, WriteFile, etc.. the
> >stdio functions are just implemented by the standard C library you happen
> >to link against.
> It is more efficient to use CreateFile and WriteFile, etc under Win32.

    Yes, it definitely is.

> >Win16 used to provide <io.h> style I/O routines (open, close etc..)
> >and these functions are still available to me in Visual C++ - I'm not sure
> >whether they're implemented by the C library or in the actual Win32
> >system, though. In either case, I suspect they would also be a thin
> >wrapper around the CreateFile-style functions.
> These routines are implemented in the MS VC Runtime library. cURL does not
> do that much file I/O for this to affect performance. I don't have any
> benchmarks btw.

    true enough -- however when your talking about file uploads, you'll
    feel the performance hit (actually, come to think of it, file
    uploads should just mmap() the file, no?)


Curl-library mailing list
Received on 2001-08-10