[Mono-devel-list] PosixStream

Miguel de Icaza miguel at ximian.com
Tue Sep 21 12:20:40 EDT 2004


Hello,

> Is it safe to assume that the convention that STDIN_FILENO=0,
> STDOUT_FILENO=1, and STDERR_FILENO=2 be a universal convention, or
> should those values be mapped?

Those you can assume.

> What about SEEK_SET, SEEK_CUR, SEEK_END?

Those are probably fine in most OSes, but I might be wrong.

> How do I tell if O_ASYNC has been set on the file descriptor?  It would
> be nice to automatically detect this and then implement the Begin*
> methods in terms of POSIX asynchronous I/O.

I think you need to use fcntl.

> What about 64-bit support?  I'm currently using the non-64 APIs
> (fstat(2) instead of fstat64, etc), which limits file sizes to 2GB. 
> This is non-desirable, I'm sure.  Should Mono.Posix export the 64-bit
> APIs as well, or should we increase the work of libMonoPosixHelper so
> that it exports the "flexible" POSIX APIs, so that we can have a
> configure check for the extended functions and use them if possible,

I think we should use the configure trick, so we always expose a 64-bit
interface, and the C code maps that to the proper setup.

Miguel



More information about the Mono-devel-list mailing list