From 8a06cd1b8718dffe2ede4f8b41b8a8c4afe06406 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 23 May 2000 05:18:48 +0000 Subject: * 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. --- winsup/cygwin/uname.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/uname.cc') 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) -- cgit v1.1