summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ruppert <idl0r@gentoo.org>2010-05-05 14:09:06 +0200
committerChristian Ruppert <idl0r@gentoo.org>2010-05-05 14:09:06 +0200
commit222570f1c20061854c45c0d618feab37df3e2a2c (patch)
tree2c064491fa881eb9f1d712f626bff33d77934e14
parentFix previous commit. Improvements. (diff)
downloadfifo-cronolog-222570f1c20061854c45c0d618feab37df3e2a2c.tar.gz
fifo-cronolog-222570f1c20061854c45c0d618feab37df3e2a2c.tar.bz2
fifo-cronolog-222570f1c20061854c45c0d618feab37df3e2a2c.zip
Add VERSION constant and print it if no arguments are given.
-rw-r--r--squid-cronolog.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/squid-cronolog.c b/squid-cronolog.c
index c24ffc9..781504b 100644
--- a/squid-cronolog.c
+++ b/squid-cronolog.c
@@ -9,6 +9,8 @@
#include <errno.h>
#include <string.h>
+#define VERSION "1.0"
+
char *pidfile;
char *get_cronolog(void) {
@@ -67,6 +69,7 @@ int main(int argc, char *argv[]) {
if (argc != 4) {
fprintf(stderr, "Usage: %s /path/to/pidfile /path/to/fifo"
" /path/to/logs/%%Y%%m%%d.log\n", argv[0]);
+ fprintf(stderr, "squid-cronolog version: %s\n", VERSION);
exit(1);
}