Mail Archives: djgpp/1996/06/26/09:28:38
On Wed, 26 Jun 1996, Tom Demmer wrote:
> > Why would you want to call `_close'? After all, `fd' is not a file
> > handle, so why call a function that only knows about true file handles?
> >
> Because fd _IS_ a true filehandle for DOS. Connected to "NUL".
Who did connect it to "NUL" and why? I don't think this is necessary for
the operation of filesystem extensions to have a true file handle, it can
be just an int.
Anyway, if for some reason I don't get `fd' *must* be a file handle, you
should just call DOS function 3Eh via `__dpmi_int' instead of calling
`_close'.
> For the second problem, Alexander Lukyanov proposed to add ioctl()
> to libc. Well, let's see.
I'm not sure this is such a good idea. Under MS-DOS, `ioctl' means a
totally different thing, so it might be a source of subtle bugs (if
somebody tries to compile a program that comes from BC, say, and uses
`ioctl'). I remember some discussion about this about a year ago. Maybe
its worthwhile to ask DJ.
- Raw text -