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

> From: Johannes Sixt <j...@kdbg.org>
> 
> Provide PRId64 alongside PRIuMAX.
> 
> Signed-off-by: Johannes Sixt <j...@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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to