public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: uname: allow to specify external release info
@ 2022-11-24 19:51 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2022-11-24 19:51 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=afa957ae5b8187996e0c7c500e2b747cd55347e9

commit afa957ae5b8187996e0c7c500e2b747cd55347e9
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Thu Nov 24 12:23:09 2022 +0100

    Cygwin: uname: allow to specify external release info
    
    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 <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/uname.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc
index 7e0d8849b..e893660c6 100644
--- a/winsup/cygwin/uname.cc
+++ b/winsup/cygwin/uname.cc
@@ -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");

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-24 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24 19:51 [newlib-cygwin] Cygwin: uname: allow to specify external release info Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).