Use the configure output to select an lstat, and to select a method
[sgt/agedu] / agedu.c
diff --git a/agedu.c b/agedu.c
index 8a6affb..c3ac6a7 100644 (file)
--- a/agedu.c
+++ b/agedu.c
@@ -82,7 +82,7 @@ static void dump_line(const char *pathname, const struct trie_file *tf)
     putchar('\n');
 }
 
-static int gotdata(void *vctx, const char *pathname, const struct stat64 *st)
+static int gotdata(void *vctx, const char *pathname, const STRUCT_STAT *st)
 {
     struct ctx *ctx = (struct ctx *)vctx;
     struct trie_file file;
@@ -616,7 +616,12 @@ int main(int argc, char **argv)
                    usage(stdout);
                    return 0;
                  case OPT_VERSION:
-                   printf("FIXME: version();\n");
+#ifdef PACKAGE_VERSION
+                   printf("%s, revision %s\n", PNAME, PACKAGE_VERSION);
+#else
+                   printf("%s: version number not available when not built"
+                          " via automake\n", PNAME);
+#endif
                    return 0;
                  case OPT_LICENCE:
                    {