[procps] [PATCH 5/5] watch.c: fix version printing

  • From: Sami Kerola <kerolasa@xxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Sun, 24 Apr 2011 19:55:06 +0200

Print same style version string as other procps utilities. Also
the number makes now more sense, when it's coming from autotools
config.h

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 watch.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/watch.c b/watch.c
index 5841168..1e050dc 100644
--- a/watch.c
+++ b/watch.c
@@ -10,8 +10,6 @@
  * Changes by Albert Cahalan, 2002-2003.
  */
 
-#define VERSION "0.2.0"
-
 #include <ctype.h>
 #include <getopt.h>
 #include <signal.h>
@@ -25,6 +23,7 @@
 #include <termios.h>
 #include <locale.h>
 #include "proc/procps.h"
+#include "config.h"
 
 #ifdef FORCE_8BIT
 #undef isprint
@@ -184,7 +183,7 @@ main(int argc, char *argv[])
        }
 
        if (option_version) {
-               fprintf(stderr, "%s\n", VERSION);
+               fprintf(stderr, "%s\n", PACKAGE_NAME " version " 
PACKAGE_VERSION);
                if (!option_help)
                        exit(0);
        }
-- 
1.7.4.4


Other related posts:

  • » [procps] [PATCH 5/5] watch.c: fix version printing - Sami Kerola