public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* bash-2.05a-1: OSTYPE is empty
@ 2001-11-11  8:26 Daniel Steinmann
  2001-11-11  8:26 ` Mader, Alexander
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Steinmann @ 2001-11-11  8:26 UTC (permalink / raw)
  To: cygwin


Today I upgraded to bash-2.05a-1 and noticed that the variable
OSTYPE is empty. Other variables like OS are still ok. So I rolled
back to bash-2.05-8; in this version I get the expected value
'cygwin'.

Is this just my machine (Win2k prof, cygwin-1.3.5) or has anybody
else noticed the same problem?

Daniel.

-- 
Daniel Steinmann, Insonic AG, Zuerich, Switzerland
daniel.steinmann@insonic.com, +41 1 456 50 00, fax: +41 1 456 50 01

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: bash-2.05a-1: OSTYPE is empty
@ 2001-11-11  8:26 Troy Noble
  0 siblings, 0 replies; 5+ messages in thread
From: Troy Noble @ 2001-11-11  8:26 UTC (permalink / raw)
  To: 'Daniel Steinmann', cygwin

Instead you can safely use the following across platforms (works on Unix in
other words):

case `uname` in
   CYGWIN*) # cygwin-specific stuff here such as OSTYPE=cygwin ;->
            ;;
         *) # non-cygwin stuff here
            ;;
esac

To ease maintainability, be sure not to use CYGWIN_NT* or
CYGWIN_NT-5* if possible.  Or has that been changed now?  I
remember talk of it on the list a couple months back.

I suspect others are going to experience the same Makefile and
shell script breakage if they were relying on OSTYPE & friends.
The uname thing is more stable since it doesn't rely on any
feature of bash per se.

Troy

-----Original Message-----
From: Daniel Steinmann [mailto:daniel.steinmann@insonic.com]
Sent: Friday, November 16, 2001 6:46 AM
To: cygwin@cygwin.com
Subject: Re: bash-2.05a-1: OSTYPE is empty



Corinna Vinschen wrote:
> However, the following is given in the ChangeLog:
> 
> x.  Bash no longer auto-exports HOSTNAME, HOSTTYPE, MACHTYPE, or OSTYPE,
>     even if it assigns them default values.

Obviously I did not read the bash ChangeLog, sorry. 

Now it is clear why in my Makefile the check for OSTYPE does not
work anymore. 

Thank you for your help,
Daniel.

-- 
Daniel Steinmann, Insonic AG, Zuerich, Switzerland
daniel.steinmann@insonic.com, +41 1 456 50 00, fax: +41 1 456 50 01

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-11-16 16:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-11  8:26 bash-2.05a-1: OSTYPE is empty Daniel Steinmann
2001-11-11  8:26 ` Mader, Alexander
2001-11-11  8:26   ` Corinna Vinschen
2001-11-11  8:26     ` Daniel Steinmann
  -- strict thread matches above, loose matches on Subject: below --
2001-11-11  8:26 Troy Noble

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).