This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: Output of "uname -s" and "uname -o"
On Mon, 9 Jun 2008, Corinna Vinschen wrote:
> On Jun 9 09:54, Igor Peshansky wrote:
> > On Mon, 9 Jun 2008, Corinna Vinschen wrote:
> > > I don't think we can change this. The sysname field is the only one
> > > which you can use to identify the system. There's no other room for
> > > this.
> >
> > You're right, both release and version fields are pretty much filled to
> > capacity. I was somehow under the impression that the OS name was a field
> > returned by Cygwin -- I now see from the sources that it's a coreutils
> > invention.
> >
> > Technically, the version field would be the right place to store the
> > information about the underlying Windows version.
> >
> > I just looked at the Linux utsname.h, and it defines the length of all the
> > fields to be 65 characters. Is there a compelling reason for Cygwin to be
> > limited to 20?
>
> Old header files plus backward compatibility. The structure is exposed
> to applications. Every change here requires to check for the Cygwin
> version under which the application has been built. I cursed the short
> field length myself at onepoint, but the added complexity looks a bit
> questionable.
#define uname uname_long
#define utsname utsname_long
#define _UTSNAME_LENGTH 20
struct utsname_long {
char sysname[_UTSNAME_LENGTH];
char nodename[_UTSNAME_LENGTH];
char release[_UTSNAME_LENGTH];
char version[_UTSNAME_LENGTH];
char machine[_UTSNAME_LENGTH];
};
int uname_long (struct utsname_long *);
Or something along those lines...
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ 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