On Wed, 16 Jun 2010 13:03:09 -0400, Steven Schveighoffer
<schvei...@yahoo.com> wrote:
I'm running into some issues while trying to make portable code for
Phobos.
One of the issues is the open system call. Apparently, it's defined in
core.sys.posix.fcntl. However DMC supports it (via the io.h header), so
does anyone know where I can find it? Do I have to add it? Can I
safely import any posix files on Windows?
I really have to say that depending on DMC and the standard C library in
general is rather annoying...
OK, I found some DMC support in here: std.c.stdio. Should I put my stuff
in there?
I plan to expose/implement the following functions:
open
close
_fdToHandle -> get the HANDLE that backs a file descriptor
_handleToFd -> create a file descriptor for a given handle.
I need this because DMC doesn't really allow unbuffered I/O through libc,
and the ability to use HANDLEs from Win32 functions is extremely limited.
I'll put it in std.c.stdio for now, and if someone comes up with a better
place, we can move it.
-Steve