Mail Archives: djgpp-workers/2001/01/01/01:31:41
On Mon, 1 Jan 2001, Tim Van Holder wrote:
> > If you want to test whether you are running on DOS/Windows,
> > /dev/env/DJDIR is not safe enough, I think. In general, it's always
> > better to test exactly what you want to know, as opposed to testing
> > something that is only a circumstantial evidence. If you want to know
> > whether you are running on DOS/Windows, try some feature that will
> > tell you unequivocally that you are on DOS.
> Usually, I need specific DJGPP behaviour or tools (eg dtou), so I test
> for DJGPP. Otherwise, I could just use test -n "$COMSPEC$ComSpec" to
> detect DOS/Win/WinNT.
You could always augment a test for DOS with a test of dtou.exe being
available somewhere along the PATH.
> > > Currently, I use this test at each point I added DJGPP-specific code.
> > What DJGPP-specific code is that, and why did you need to add it?
> 'Code' is a bit misleading here I guess, since it's usually shell
> commands; for a list of the places where I use the test (and why), see
> my mail of 2000/12/29 18:55.
That mail is why I became confused; I reply to it separately.
- Raw text -