Mail Archives: djgpp/1998/03/30/12:13:00
On 30 Mar 1998, Ruiter de M wrote:
> Is `\DEV' used in DOS itself? I read the DOS-special devices (CON,
> NUL, etc) exist in \DEV even if \DEV doesn't exist. Is this documented
> behaviour?
It is a documented fact that all DOS devices behave as if they lived in
every directory, and also in a directory \DEV even if that doesn't exist.
But DOS doesn't prevent you from actually having such a directory.
DJGPP adds a quirk that makes many DJGPP programs fail or behave
erratically on files in a directory by that name. The reasons are
complex, but in a nutshell, this is because DJGPP's libc tries to pretend
that even non-existent devices like /dev/null and /dev/tty exist, to
support Unix programs which assume this without checking, and the library
further tries to make all DOS calls to devices work the same regardless
of the fact whether they do or don't include the "/dev/" prefix (many DOS
calls work inconsistently in such cases).
- Raw text -