* 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.
This commit is contained in:
		| @@ -1,3 +1,10 @@ | |||||||
|  | Tue May 23 01:13:33 2000  Christopher Faylor <cgf@cygnus.com> | ||||||
|  |  | ||||||
|  | 	* 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. | ||||||
|  |  | ||||||
| Mon May 22 17:11:25 2000  Christopher Faylor <cgf@cygnus.com> | Mon May 22 17:11:25 2000  Christopher Faylor <cgf@cygnus.com> | ||||||
|  |  | ||||||
| 	* environ.cc (regopt): Scan HKLM if HKCU scan fails. | 	* environ.cc (regopt): Scan HKLM if HKCU scan fails. | ||||||
|   | |||||||
| @@ -51,10 +51,11 @@ if [ "$3" -le 10 ]; then | |||||||
| else | else | ||||||
|     d=$3 |     d=$3 | ||||||
| fi | fi | ||||||
|  | hhmm="`echo $4 | sed 's/:..$//'`" | ||||||
| # | # | ||||||
| # Set date into YYYY-MM-DD HH:MM:SS format | # Set date into YYYY-MM-DD HH:MM:SS format | ||||||
| # | # | ||||||
| builddate="${6-$5}-$m-$d $4" | builddate="${6-$5}-$m-$d $hhmm" | ||||||
|  |  | ||||||
| set -$- '' | set -$- '' | ||||||
|  |  | ||||||
| @@ -95,9 +96,9 @@ cvs_tag="`sed 's%^.\(.*\)%\1%' $dir/CVS/Tag 2>/dev/null`" | |||||||
| # | # | ||||||
| dir=`echo $dir | sed -e 's%/include/cygwin.*$%%' -e 's%include/cygwin.*$%.%'` | dir=`echo $dir | sed -e 's%/include/cygwin.*$%%' -e 's%include/cygwin.*$%.%'` | ||||||
| if [ -r "$dir/.snapshot-date" ]; then | if [ -r "$dir/.snapshot-date" ]; then | ||||||
|     read snapshot < "$dir/.snapshot-date" |     read snapshotdate < "$dir/.snapshot-date" | ||||||
|     snapshot="snapshot date |     snapshot="snapshot date | ||||||
| $snapshot" | $snapshotdate" | ||||||
| fi | fi | ||||||
|  |  | ||||||
| # | # | ||||||
| @@ -122,6 +123,12 @@ done | tee /tmp/mkvers.$$ 1>&9 | |||||||
|  |  | ||||||
| trap "rm -f /tmp/mkvers.$$" 0 1 2 15 | trap "rm -f /tmp/mkvers.$$" 0 1 2 15 | ||||||
|  |  | ||||||
|  | if [ -n "$snapshotdate" ]; then | ||||||
|  |   usedate="`echo $snapshotdate | sed 's/-\\(..:..[^-]*\\).*$/ \1SNP/'`" | ||||||
|  | else | ||||||
|  |   usedate="$builddate" | ||||||
|  | fi | ||||||
|  |  | ||||||
| # | # | ||||||
| # Finally, output the shared ID and set up the cygwin_version structure | # Finally, output the shared ID and set up the cygwin_version structure | ||||||
| # for use by Cygwin itself. | # for use by Cygwin itself. | ||||||
| @@ -133,14 +140,13 @@ cat <<EOF 1>&9 | |||||||
|   "%%% Cygwin shared id: " CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "\n" |   "%%% Cygwin shared id: " CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "\n" | ||||||
| #endif | #endif | ||||||
|   "END_CYGWIN_VERSION_INFO\n\0"; |   "END_CYGWIN_VERSION_INFO\n\0"; | ||||||
|  |  | ||||||
| cygwin_version_info cygwin_version = | cygwin_version_info cygwin_version = | ||||||
| { | { | ||||||
|   CYGWIN_VERSION_API_MAJOR, CYGWIN_VERSION_API_MINOR, |   CYGWIN_VERSION_API_MAJOR, CYGWIN_VERSION_API_MINOR, | ||||||
|   CYGWIN_VERSION_DLL_MAJOR, CYGWIN_VERSION_DLL_MINOR, |   CYGWIN_VERSION_DLL_MAJOR, CYGWIN_VERSION_DLL_MINOR, | ||||||
|   CYGWIN_VERSION_SHARED_DATA, |   CYGWIN_VERSION_SHARED_DATA, | ||||||
|   CYGWIN_VERSION_MOUNT_REGISTRY, |   CYGWIN_VERSION_MOUNT_REGISTRY, | ||||||
|   "$builddate", |   "$usedate", | ||||||
| #ifdef DEBUGGING | #ifdef DEBUGGING | ||||||
|   CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "-$builddate" |   CYGWIN_VERSION_DLL_IDENTIFIER "S" shared_data_version "-$builddate" | ||||||
| #else | #else | ||||||
|   | |||||||
| @@ -21,6 +21,7 @@ uname (struct utsname *name) | |||||||
|   DWORD len; |   DWORD len; | ||||||
|   SYSTEM_INFO sysinfo; |   SYSTEM_INFO sysinfo; | ||||||
|   extern char osname[]; |   extern char osname[]; | ||||||
|  |   char *snp = strstr  (cygwin_version.dll_build_date, "SNP"); | ||||||
|  |  | ||||||
|   memset (name, 0, sizeof (*name)); |   memset (name, 0, sizeof (*name)); | ||||||
|   __small_sprintf (name->sysname, "CYGWIN_%s", osname); |   __small_sprintf (name->sysname, "CYGWIN_%s", osname); | ||||||
| @@ -32,10 +33,11 @@ uname (struct utsname *name) | |||||||
|   GetComputerNameA (name->nodename, &len); |   GetComputerNameA (name->nodename, &len); | ||||||
|  |  | ||||||
|   /* Cygwin dll release */ |   /* 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_major % 1000, | 		   cygwin_version.dll_major % 1000, | ||||||
| 		   cygwin_version.dll_minor, | 		   cygwin_version.dll_minor, | ||||||
|  | 		   snp ? "S" : "", | ||||||
| 		   cygwin_version.api_major, | 		   cygwin_version.api_major, | ||||||
| 		   cygwin_version.api_minor, | 		   cygwin_version.api_minor, | ||||||
| 		   cygwin_version.shared_data, | 		   cygwin_version.shared_data, | ||||||
| @@ -43,6 +45,8 @@ uname (struct utsname *name) | |||||||
|  |  | ||||||
|   /* Cygwin "version" aka build date */ |   /* Cygwin "version" aka build date */ | ||||||
|   strcpy (name->version, cygwin_version.dll_build_date); |   strcpy (name->version, cygwin_version.dll_build_date); | ||||||
|  |   if (snp) | ||||||
|  |     name->version[snp - cygwin_version.dll_build_date] = '\0'; | ||||||
|  |  | ||||||
|   /* CPU type */ |   /* CPU type */ | ||||||
|   switch (sysinfo.wProcessorArchitecture) |   switch (sysinfo.wProcessorArchitecture) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user