Skip to content

Commit

Permalink
Cygwin: uname: allow to specify external release info
Browse files Browse the repository at this point in the history
When creating regular Cygwin test releases we need a way to
automate unambiguous version information based on the output
of `git describe'.  Allow to inject a release string via a
preprocessor macro CYGPORT__RELEASE_INFO.  Change the default
release info to recognize a local, non-distro build.

Signed-off-by: Corinna Vinschen <[email protected]>
  • Loading branch information
github-cygwin committed Nov 24, 2022
1 parent 244be41 commit afa957a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion winsup/cygwin/uname.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ uname_x (struct utsname *name)
cygwin_gethostname (buf, sizeof buf - 1);
strncat (name->nodename, buf, sizeof (name->nodename) - 1);
/* release */
__small_sprintf (name->release, "%d.%d.%d-%d.",
#ifdef CYGPORT_RELEASE_INFO
stpcpy (name->release, __XSTRING (CYGPORT_RELEASE_INFO));
#else
__small_sprintf (name->release, "%d.%d.%d-0.%d.local.",
cygwin_version.dll_major / 1000,
cygwin_version.dll_major % 1000,
cygwin_version.dll_minor,
cygwin_version.api_minor);
#endif
/* version */
stpcpy (name->version, cygwin_version.dll_build_date);
strcat (name->version, " UTC");
Expand Down

0 comments on commit afa957a

Please sign in to comment.