This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: $OS vs `uname -s` [Attn: base-files maintainer]


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

PLEASE fix your mailer to send valid mail.  It was difficult to see what
you were asking, because your MIME settings are incorrect, and correct
mailers only saw a blank message.

According to Michael Richardson on 8/14/2005 2:28 PM:
> I noticed that my cygwin bash shell has $OS defined already, as
> "Windows_NT"
> while uname -s produces CYGWIN_NT-5.0.
>
> Normally, I expect `uname -r` to say "5.0", but it gives another number,
> presumeably a cygwin version.

Yes, uname -r is the cygwin .dll version.

>
> bash-3.00$ uname -s
> CYGWIN_NT-5.0
> bash-3.00$ echo $OS
> Windows_NT
>
> I only ask because my Makefiles from Unix would prefer to have $OS
> either not
> set, or be equal to uname -s. Is there a reason why these things differ?
> (My Makefile's will get changed to cope...)

If your setup is like mine, OS is an inherited environment variable, set
by Windows before bash is even started.  You can set it to whatever you
like.  Meanwhile, uname -s is not affected by the environment (you really
don't want an environment variable changing the uname output).  Hmm, maybe
we should update /etc/profile to do OS=`uname -s`.  Thoughts?

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDAIFR84KuGfSFAYARAlhQAJ9mEPk9s9TveH7E9D3a3qzpA4uVuwCgoNGd
g1wm2bucahTaIyHir06Q4I4=
=UknZ
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]