aboutsummaryrefslogtreecommitdiff
path: root/src/lzma
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lzma/help.c13
-rw-r--r--src/lzmadec/lzmadec.c6
2 files changed, 11 insertions, 8 deletions
diff --git a/src/lzma/help.c b/src/lzma/help.c
index ad7dd861..f2a30ff6 100644
--- a/src/lzma/help.c
+++ b/src/lzma/help.c
@@ -140,13 +140,14 @@ These aren't implemented yet.
if (mem_limit == 0)
mem_limit = 1;
+ // We use PRIu64 instead of %zu to support pre-C99 libc.
puts(_("On this system and configuration, the tool will use"));
- printf(_(" * roughly %zu MiB of memory at maximum; and\n"),
- mem_limit);
- printf(N_(
- " * at maximum of one thread for (de)compression.\n\n",
- " * at maximum of %zu threads for (de)compression.\n\n",
- opt_threads), opt_threads);
+ printf(_(" * roughly %" PRIu64 " MiB of memory at maximum; and\n"),
+ (uint64_t)(mem_limit));
+ printf(N_(" * at maximum of one thread for (de)compression.\n\n",
+ " * at maximum of %" PRIu64
+ " threads for (de)compression.\n\n",
+ (uint64_t)(opt_threads)), (uint64_t)(opt_threads));
printf(_("Report bugs to <%s> (in English or Finnish).\n"),
PACKAGE_BUGREPORT);
diff --git a/src/lzmadec/lzmadec.c b/src/lzmadec/lzmadec.c
index 93eed090..fef49249 100644
--- a/src/lzmadec/lzmadec.c
+++ b/src/lzmadec/lzmadec.c
@@ -108,10 +108,12 @@ help(void)
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
"\n"
-"On this configuration, the tool will use about %zu MiB of memory at maximum.\n"
+"On this configuration, the tool will use about %" PRIu64
+ " MiB of memory at maximum.\n"
"\n"
"Report bugs to <" PACKAGE_BUGREPORT "> (in English or Finnish).\n",
- argv0, (mem_limit + 512 * 1024) / (1024 * 1024));
+ argv0, (uint64_t)((mem_limit + 512 * 1024) / (1024 * 1024)));
+ // Using PRIu64 above instead of %zu to support pre-C99 libc.
exit(0);
}