diff options
author | Christopher Faylor <me@cgf.cx> | 2000-05-23 05:18:48 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-05-23 05:18:48 +0000 |
commit | 8a06cd1b8718dffe2ede4f8b41b8a8c4afe06406 (patch) | |
tree | 079b0e3a58f726d748769a8a5b0b741f1d3fa03c /winsup/cygwin/uname.cc | |
parent | d4d0896b7d13dfcf40e73657c0e6a2c447eb0395 (diff) | |
download | newlib-8a06cd1b8718dffe2ede4f8b41b8a8c4afe06406.zip newlib-8a06cd1b8718dffe2ede4f8b41b8a8c4afe06406.tar.gz newlib-8a06cd1b8718dffe2ede4f8b41b8a8c4afe06406.tar.bz2 |
* mkvers.sh: Use snapshot date as build date since it is more interesting.
* uname.cc (uname): Detect if this is a snapshot build and add an "S" to the
version number. Report the snapshot date as the release date.
Diffstat (limited to 'winsup/cygwin/uname.cc')
-rw-r--r-- | winsup/cygwin/uname.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc index 330115d..3ff4d9a 100644 --- a/winsup/cygwin/uname.cc +++ b/winsup/cygwin/uname.cc @@ -21,6 +21,7 @@ uname (struct utsname *name) DWORD len; SYSTEM_INFO sysinfo; extern char osname[]; + char *snp = strstr (cygwin_version.dll_build_date, "SNP"); memset (name, 0, sizeof (*name)); __small_sprintf (name->sysname, "CYGWIN_%s", osname); @@ -32,10 +33,11 @@ uname (struct utsname *name) GetComputerNameA (name->nodename, &len); /* Cygwin dll release */ - __small_sprintf (name->release, "%d.%d.%d(%d.%d/%d/%d)", + __small_sprintf (name->release, "%d.%d.%d%s(%d.%d/%d/%d)", cygwin_version.dll_major / 1000, cygwin_version.dll_major % 1000, cygwin_version.dll_minor, + snp ? "S" : "", cygwin_version.api_major, cygwin_version.api_minor, cygwin_version.shared_data, @@ -43,6 +45,8 @@ uname (struct utsname *name) /* Cygwin "version" aka build date */ strcpy (name->version, cygwin_version.dll_build_date); + if (snp) + name->version[snp - cygwin_version.dll_build_date] = '\0'; /* CPU type */ switch (sysinfo.wProcessorArchitecture) |