Mail Archives: djgpp-workers/2002/01/29/05:14:53
On Mon, Jan 28, 2002 at 01:50:41PM +0200, Eli Zaretskii wrote:
> Write a DJGPP-specific functions which returns the open mode based on the
> stream's _flag member of struct FILE, and use that instead of fcntl.
Hmm, I tried this, and it seems to work, thanks. Unfortunately this
_flag member does not store information about the text/binary mode of
the stream, but I found the necessary information in another structure
(__file_handles I think). On the other hand the _IOAPPEND flag seems to
be not used in the sources of libc, so I guess this information is lost
for me...
> Or fix the FIXME in fcntl.c that would make F_GETFL something other than
> a no-op, and then use the fixed version to build Perl ;-)
Well, sounds tricky. I'm not sure how to get the necessary information
from DOS. And I would like to use the plain 2.03 libc...
> Btw, I think that the code in Perl you showed is non-portable: no one
True. In fact in the latest development version of perl most of the
ports are already switched to perl's own "stdio" implementation (called
PerlIO) which solves this problem portably. Too bad it did not work
at all with DJGPP when I tried...
Laszlo
- Raw text -