From 1411022cf23d81bac8176b06008898439a2c1a59 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Tue, 30 Oct 2012 02:12:23 +0000 Subject: build: don't rely on support for '%j' printf format * src/factor.c (print_uintmaxes): Replace with PRIuMAX. * src/join.c (check_order): Likewise. * cfg.mk (sc_check-j-printf-format): Add a syntax-check rule to flag new cases of this. --- src/factor.c | 2 +- src/join.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/factor.c b/src/factor.c index 4c2af9811..be5a36cd5 100644 --- a/src/factor.c +++ b/src/factor.c @@ -2313,7 +2313,7 @@ print_uintmaxes (uintmax_t t1, uintmax_t t0) uintmax_t q, r; if (t1 == 0) - printf ("%ju", t0); + printf ("%"PRIuMAX, t0); else { /* Use very plain code here since it seems hard to write fast code diff --git a/src/join.c b/src/join.c index e39ed8725..eb87301c7 100644 --- a/src/join.c +++ b/src/join.c @@ -400,7 +400,7 @@ check_order (const struct line *prev, error ((check_input_order == CHECK_ORDER_ENABLED ? EXIT_FAILURE : 0), - 0, _("%s:%ju: is not sorted: %.*s"), + 0, _("%s:%"PRIuMAX": is not sorted: %.*s"), g_names[whatfile - 1], line_no[whatfile - 1], (int) len, current->buf.buffer); -- cgit v1.2.3-54-g00ecf