summaryrefslogtreecommitdiff
path: root/timezone
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2017-07-25 12:34:14 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2017-07-25 12:34:14 +0530
commit94955362ddf7db640597c8c6406456828d9332f3 (patch)
tree29bf60d051a39053befaa09765f81ac2ff0c82b8 /timezone
parent95a73392580761abc62fc9b1386d232cd55878e9 (diff)
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.
Diffstat (limited to 'timezone')
-rw-r--r--timezone/zic.c11
1 files changed, 6 insertions, 5 deletions
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);