delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/01/01/01:31:41

Date: Mon, 1 Jan 2001 08:30:03 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Tim Van Holder <tim DOT van DOT holder AT pandora DOT be>
cc: djgpp-workers AT delorie DOT com
Subject: RE: Ribust shell-based test for DJGPP?
In-Reply-To: <NEBBIOJNGMKPNOBKHCGHMEDBCAAA.tim.van.holder@pandora.be>
Message-ID: <Pine.SUN.3.91.1010101082826.3587J-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019