From 94955362ddf7db640597c8c6406456828d9332f3 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Tue, 25 Jul 2017 12:34:14 +0530 Subject: zic: Use PRIdMAX to print line numbers The PRIdLINENUM abstraction is unnecessary and breaks libc.pot generation. * timezone.zic (PRIdLINENO): Remove. (verror): Use PRIdMAX. * po/libc.pot: Regenerate. --- timezone/zic.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'timezone') diff --git a/timezone/zic.c b/timezone/zic.c index 068fb43318..946bf6ff8e 100644 --- a/timezone/zic.c +++ b/timezone/zic.c @@ -46,9 +46,10 @@ typedef int_fast64_t zic_t; static ptrdiff_t const PTRDIFF_MAX = MAXVAL(ptrdiff_t, TYPE_BIT(ptrdiff_t)); #endif -/* The type and printf format for line numbers. */ +/* The type for line numbers. Use PRIdMAX to format them; formerly + there was also "#define PRIdLINENO PRIdMAX" and formats used + PRIdLINENO, but xgettext cannot grok that. */ typedef intmax_t lineno; -#define PRIdLINENO PRIdMAX struct rule { const char * r_filename; @@ -484,10 +485,10 @@ verror(const char *const string, va_list args) ** on BSD systems. */ if (filename) - fprintf(stderr, _("\"%s\", line %"PRIdLINENO": "), filename, linenum); + fprintf(stderr, _("\"%s\", line %"PRIdMAX": "), filename, linenum); vfprintf(stderr, string, args); if (rfilename != NULL) - fprintf(stderr, _(" (rule from \"%s\", line %"PRIdLINENO")"), + fprintf(stderr, _(" (rule from \"%s\", line %"PRIdMAX")"), rfilename, rlinenum); fprintf(stderr, "\n"); } @@ -1250,7 +1251,7 @@ _("\"Zone %s\" line and -p option are mutually exclusive"), if (zones[i].z_name != NULL && strcmp(zones[i].z_name, fields[ZF_NAME]) == 0) { error(_("duplicate zone name %s" - " (file \"%s\", line %"PRIdLINENO")"), + " (file \"%s\", line %"PRIdMAX")"), fields[ZF_NAME], zones[i].z_filename, zones[i].z_linenum); -- cgit 1.4.1