git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH jk/config-int-range-check] compat/mingw.h: define PRId64
Date: Thu, 19 Sep 2013 03:56:10 -0400	[thread overview]
Message-ID: <20130919075610.GB29773@sigill.intra.peff.net> (raw)
In-Reply-To: <523AA4F3.6010406@viscovery.net>

On Thu, Sep 19, 2013 at 09:17:07AM +0200, Johannes Sixt wrote:

> From: Johannes Sixt <j6t@kdbg.org>
> 
> Provide PRId64 alongside PRIuMAX.
> 
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>

Thanks. I had noticed this was the first use of PRId64, but I wasn't
sure what various implementations would want.

I notice that we also have a fallback PRIuMAX of "llu" in
git-compat-util.h, but I'm not sure which platforms need that, nor what
they would want for PRId64. By the explanation in 3efb1f3 and e326bce,
it looks like the strategy was to just use a "long long" and hope for
the best. So we might want:

diff --git a/git-compat-util.h b/git-compat-util.h
index 9549de6..4438e7c 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -239,6 +239,10 @@ extern char *gitbasename(char *);
 #define PRIuMAX "llu"
 #endif
 
+#ifndef PRId64
+#define PRId64 "lld"
+#endif
+
 #ifndef PRIu32
 #define PRIu32 "u"
 #endif

as well, but I think I'd rather wait until somebody with an actual
system that needs it reports in (and tells us what the right value for
their system is) as opposed to just guessing.

-Peff

      reply	other threads:[~2013-09-19  7:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19  7:17 [PATCH jk/config-int-range-check] compat/mingw.h: define PRId64 Johannes Sixt
2013-09-19  7:56 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130919075610.GB29773@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).