From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113934 invoked by alias); 19 Jul 2017 13:50:04 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 113791 invoked by uid 89); 19 Jul 2017 13:50:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Hx-languages-length:1739, Joseph, hear, joseph X-HELO: homiemail-a52.g.dreamhost.com Subject: Re: libc-2.25.90.pot To: Adhemerval Zanella , Benno Schulenberg , libc-alpha@sourceware.org, Paul Eggert References: <8b9b4e60-f580-e56a-26bc-adb7192ba779@sourceware.org> <6e7f7602-3536-2edb-0cf4-e66a948fdb71@translationproject.org> From: Siddhesh Poyarekar Message-ID: Date: Wed, 19 Jul 2017 13:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-07/txt/msg00679.txt.bz2 On Wednesday 19 July 2017 06:58 PM, Adhemerval Zanella wrote: > I think for glibc, since we support C99 intmax_t printf format, we can > just use %jd instead: > > * timezone/zic.c (PRIdLINENO): Remove macro. > (verror): Use %jd instead of PRIdLINENO. Fine with me, but I'd like to hear from Joseph/Paul too if they have any context from the tz project that may make this a bad idea. Siddhesh > --- > ChangeLog | 5 +++++ > timezone/zic.c | 7 +++---- > 2 files changed, 8 insertions(+), 4 deletions(-) > > diff --git a/timezone/zic.c b/timezone/zic.c > index 068fb43..aaef06b 100644 > --- a/timezone/zic.c > +++ b/timezone/zic.c > @@ -48,7 +48,6 @@ static ptrdiff_t const PTRDIFF_MAX = MAXVAL(ptrdiff_t, TYPE_BIT(ptrdiff_t)); > > /* The type and printf format for line numbers. */ > typedef intmax_t lineno; > -#define PRIdLINENO PRIdMAX > > struct rule { > const char * r_filename; > @@ -484,10 +483,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 %jd: "), filename, linenum); > vfprintf(stderr, string, args); > if (rfilename != NULL) > - fprintf(stderr, _(" (rule from \"%s\", line %"PRIdLINENO")"), > + fprintf(stderr, _(" (rule from \"%s\", line %jd)"), > rfilename, rlinenum); > fprintf(stderr, "\n"); > } > @@ -1250,7 +1249,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 %jd)"), > fields[ZF_NAME], > zones[i].z_filename, > zones[i].z_linenum); >