Output of "uname -s" and "uname -o"

Igor Peshansky pechtcha@cs.nyu.edu
Thu Jun 5 04:08:00 GMT 2008


I know this came up before[1], but I don't think this was ever adequately
resolved (unless you consider "the thread died down so let's stop worrying
about it" an adequate resolution).  Also, while that thread listed some
reasons to change the output of uname, it did not really list reasons not
to, other than to preserve the status quo.

In my current situation, I'm trying to fix a GNU Makefile that works
across Linux and AIX to also work on Cygwin.  The top of the Makefile
contains the following: "include $(TOP)/config/Make.$(shell uname -s)".
The config directory contains Make.Linux and Make.AIX.

Of course, with the current uname output, make goes to look for
config/Make.CYGWIN_NT-5.1 (on my machine).  This is no longer the case of
pattern matching, as in the previous thread.  The output of "uname -o" is
a nice generic "Cygwin", but on Linux it returns "GNU/Linux" (obviously
problematic), and uname on AIX doesn't even recognize "-o".

Now, I could hack the Makefile to invoke the appropriate sed commands to
transform the output of uname, but I figured might as well ask the
following: would there be objections to switching the outputs of "uname
-s" and "uname -o"?  Granted, it'd break the current *-config scripts
(e.g., ssh-host-config), and we would also need to change /etc/profile and
the base-files postinstall scripts, but would it be worth the bother?

[1] http://cygwin.com/ml/cygwin-developers/2001-02/msg00094.html
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"That which is hateful to you, do not do to your neighbor.  That is the whole
Torah; the rest is commentary.  Go and study it." -- Rabbi Hillel

More information about the Cygwin-developers mailing list