X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/blobdiff_plain/5a830bf80878bd1521a71017ce19882caa755d80..50e82fdc62d1e7c0747bdc8c17d7ef7b863e1460:/agedu.c diff --git a/agedu.c b/agedu.c index c3ac6a7..1a68eb4 100644 --- a/agedu.c +++ b/agedu.c @@ -2,25 +2,8 @@ * Main program for agedu. */ -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - #include "agedu.h" + #include "du.h" #include "trie.h" #include "index.h" @@ -1033,8 +1016,8 @@ int main(int argc, char **argv) return 1; } - printf("Built pathname index, %d entries, %ju bytes\n", count, - (intmax_t)st.st_size); + printf("Built pathname index, %d entries, %llu bytes\n", count, + (unsigned long long)st.st_size); totalsize = index_compute_size(st.st_size, count); @@ -1047,8 +1030,8 @@ int main(int argc, char **argv) return 1; } - printf("Upper bound on index file size = %ju bytes\n", - (intmax_t)totalsize); + printf("Upper bound on index file size = %llu bytes\n", + (unsigned long long)totalsize); mappedfile = mmap(NULL, totalsize, PROT_READ|PROT_WRITE,MAP_SHARED, fd, 0); if (!mappedfile) { @@ -1073,7 +1056,8 @@ int main(int argc, char **argv) munmap(mappedfile, totalsize); ftruncate(fd, realsize); close(fd); - printf("Actual index file size = %ju bytes\n", (intmax_t)realsize); + printf("Actual index file size = %llu bytes\n", + (unsigned long long)realsize); } } else if (mode == TEXT) { char *querydir = actions[action].arg;