[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
better --version in textutils
From: |
Andrew D Jewell |
Subject: |
better --version in textutils |
Date: |
Wed, 29 May 2002 14:34:00 -0400 |
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);
- sort bug?, stefano federici, 2002/05/26
- Re: sort bug?, Jim Meyering, 2002/05/28
- better --version in textutils,
Andrew D Jewell <=