Something I find useful : adds the glibc version to the "--version" display.
Requires AC_CHECK_HEADERS(gnu/libc-version.h) in configure.ac

adj


--- old-version-etc.c   Wed May 29 11:30:01 2002
+++ version-etc.c       Wed May 29 10:38:07 2002
@@ -32,6 +32,12 @@
  # define _(Text) Text
  #endif

+#ifdef HAVE_GNU_LIBC_VERSION_H
+#include <gnu/libc-version.h>
+#else
+const char * gnu_get_libc_version() {return "not used.";}
+#endif
+
  /* Default copyright goes to the FSF. */

  char* version_etc_copyright =
@@ -55,9 +61,9 @@
              const char *version, const char *authors)
  {
    if (command_name)
-    fprintf (stream, "%s (%s) %s\n", command_name, package, version);
+    fprintf (stream, "%s (%s) %s (glibc %s)\n", command_name, 
package, version, gnu_get_libc_version());
    else
-    fprintf (stream, "%s %s\n", package, version);
+    fprintf (stream, "%s %s (glibc %s)\n", package, version, 
gnu_get_libc_version());
    fprintf (stream, _("Written by %s.\n"), authors);
    putc ('\n', stream);

_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to