open, close, dup, dup2, lseek, read, write, fileno, etc.

Janice Caron caron800 at googlemail.com
Fri Feb 8 04:37:17 PST 2008


open, close, dup, dup2, lseek, read, write, fileno, etc....

Is there any good reason why these functions are available in Phobos
for the Linux version of D only, but not for the Windows version?

These functions certainly do exists on Windows (albeit with names
preceeded by a single underscore). In C and C++, you just have to
#include <io.h>

I looked at the source code for std.streams, just to end my confusion
about what File does, and it turns out it's full of lots of
conditional code, with Windows using Windowsy functions like
CreateFileW() and CreateFileA(). I'm sure there's probably a good
reason for this - I just don't know what it is. Can anyone explain?

Thanks.



More information about the Digitalmars-d mailing list