Subject: bug#1171: #1171 - ns-version-string - Emacs bug report logs

From: Yavor Doganov <[email-masked]>
Date: Wed, 22 Oct 2008 13:53:17 +0300

Glenn Morris wrote:
> 
> If there is a meaningful version number for the external GNUstep/Mac
> components (analogous to gtk-version-string) against which Emacs was
> built, that could also be printed.

For GNUstep, that would be the Base and GUI versions.  Ideally, the
GSBackend should also be detected and reported, but that's more
complicated as it has to happen at runtime.

For Mac OS X I don't have a clue, really.

The attached patch works for me, although it might not be entirely
correct.

2008-10-22  Yavor Doganov  <[email-masked]>  (tiny change)

	* nsterm.m (syms_of_nsterm): Provide GNUstep Base/GUI versions as
	`ns-version-string'.

--- nsterm.m	21 окт 2008 15:50:42 +0300	1.32
+++ nsterm.m	22 окт 2008 13:17:21 +0300	
@@ -6382,7 +6382,22 @@
   /* TODO: try to move this back into lisp,  ns-win.el loaded too late
            right now */
   {
-    Lisp_Object args[3] = { intern ("ns-version-string"), build_string ("9.0"),
+#ifdef NS_IMPL_GNUSTEP
+  char gnustep_version[40];
+  snprintf (gnustep_version, sizeof (gnustep_version),
+	    "(GNUstep Base %u.%u.%u, GUI %u.%u.%u)",
+	    GNUSTEP_BASE_MAJOR_VERSION, GNUSTEP_BASE_MINOR_VERSION,
+	    GNUSTEP_BASE_SUBMINOR_VERSION,
+	    GNUSTEP_GUI_MAJOR_VERSION, GNUSTEP_GUI_MINOR_VERSION,
+	    GNUSTEP_GUI_SUBMINOR_VERSION);
+#endif
+    Lisp_Object args[3] = { intern ("ns-version-string"),
+#ifdef NS_IMPL_GNUSTEP
+			    build_string (gnustep_version),
+#else
+			    /* TODO: Something appropriate for Mac OS X.  */
+			    build_string ("9.0"),
+#endif
                     build_string ("NS Window system port version number.") };
     Fdefconst (Flist (3, args));
   }