delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/12/31/13:35:23

Date: Sun, 31 Dec 2000 20:33:41 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
Message-Id: <7443-Sun31Dec2000203340+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp-workers AT delorie DOT com
In-reply-to: <NEBBIOJNGMKPNOBKHCGHKECMCAAA.tim.van.holder@pandora.be>
Subject: Re: Ribust shell-based test for DJGPP?
References: <NEBBIOJNGMKPNOBKHCGHKECMCAAA DOT tim DOT van DOT holder AT pandora DOT be>
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

> From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> Date: Sun, 31 Dec 2000 15:32:29 +0100
> 
> > Why do you need to run dtou?  It shouldn't be required with Bash 2.03
> > and later (and you are going to require the latesrt Bash to support
> > /dev/env anyway).
> Two reasons:
> a) I don't think anything stops people from using an earlier bash,
>    compiled with 2.03. They'd have /dev support, but not mixed EOL
>    handling.

I don't think anyone in their right mind will try to build Bash 1.14.7
with DJGPP v2.03 on their own...

> > > if test -d /dev/env/DJDIR -a -n "$DJGPP" -a -f "$DJGPP"; then
> > >   # Hooray! DJGPP!
> > > fi
> > Is the DJGPP variable set in the case when you are cross-compiling?
> It shouldn't matter - the changes should not affect the configuration
> process itself they only work around problems encountered when run
> under DOS. If using DJGPP as a cross-compilation platform, you'll
> still need to do so (and $DJGPP would definitely be set); and if
> cross-compiling to DJGPP, you'd be running a non-DJGPP system so the
> workarounds should not be enabled (and since you wouldn't have
> /dev/env then, they won't be).

Now I'm confused.  I think I don't understand what do you need this
test for.  The "# Hooray! DJGPP!" comment seemed to imply you want to
know this is a DJGPP build, but now it looks like you are using it for
something different?

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.

> 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?

- Raw text -


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