Date: Mon, 1 Jan 2001 08:30:03 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Tim Van Holder cc: djgpp-workers AT delorie DOT com Subject: RE: Ribust shell-based test for DJGPP? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.