Mail Archives: djgpp-workers/1996/07/31/09:17:46
On Tue, 30 Jul 1996, Tom Demmer wrote:
> the DOS part is more or less stable right now, the names for the various
> commands are negotiable, any ideas are welcome. For the UNIX part I am not
> sure what to keep and what to drop. Anyway, it cannot remain like this
> because most of it is taken from the IBM AIX compiler.
First impressions:
1) The header should be <sys/ioctl.h>, not <ioctl.h>, since that
is where it is found on other systems (even in BC++).
2) I'd recommend to change all "DOS_blabla" constants into
"_DOS_blabla" (or even "__DOS"), because these are DJGPP-specific. If
memory serves, names that begin with a `_' are reserved, and this
minimizes the possibility of a clash with some application code that uses
the same names.
3) The Unix part defines all kind of symbols that aren't supported
(and probably won't ever be supported) by DJGPP. Examples are FIONREAD
and the TIOCxxx macros. Many programs (e.g. GNU packages) test for these
symbols and if they are defined, assume support for certain features, even
if they aren't really connected with these symbols per se. For instance,
`cat' from GNU Textutils assumes that values of errno such as `ENOTTY' and
`EOPNOTSUPP' are defined if FIONREAD is. This will certainly break DJGPP
ports of many programs. I suggest that the Unix part be ifdefed away for
now, and only those parts are to be activated for which we have full
support (tested by building the programs which use these symbols).
- Raw text -