{"thread":{"id":"34965","subject":"[PATCH jk/config-int-range-check] compat/mingw.h: define PRId64","startedAt":"2013-09-19T07:17:07Z","lastAt":"2013-09-19T07:56:10Z","messageCount":2,"participants":["Johannes Sixt","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"227872","messageId":"523AA4F3.6010406@viscovery.net","threadId":"34965","inReplyTo":null,"subject":"[PATCH jk/config-int-range-check] compat/mingw.h: define PRId64","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2013-09-19T07:17:07Z","receivedAt":"2013-09-19T07:17:07Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nProvide PRId64 alongside PRIuMAX.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n I thought I had compiled 'next' on Windows recently...\n\n This is an emergency fix for a compile error in 'master'.\n\n compat/mingw.h | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex bd0a88b..9eb3b17 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -322,6 +322,7 @@ static inline char *mingw_find_last_dir_sep(const char *path)\n #define find_last_dir_sep mingw_find_last_dir_sep\n #define PATH_SEP ';'\n #define PRIuMAX \"I64u\"\n+#define PRId64 \"I64d\"\n \n void mingw_open_html(const char *path);\n #define open_html mingw_open_html\n-- \n1.8.4.1573.g0cbe1bc\n"},{"id":"227875","messageId":"20130919075610.GB29773@sigill.intra.peff.net","threadId":"34965","inReplyTo":"523AA4F3.6010406@viscovery.net","subject":"Re: [PATCH jk/config-int-range-check] compat/mingw.h: define PRId64","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-09-19T07:56:10Z","receivedAt":"2013-09-19T07:56:10Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Sep 19, 2013 at 09:17:07AM +0200, Johannes Sixt wrote:\n\n> From: Johannes Sixt <j6t@kdbg.org>\n> \n> Provide PRId64 alongside PRIuMAX.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n\nThanks. I had noticed this was the first use of PRId64, but I wasn't\nsure what various implementations would want.\n\nI notice that we also have a fallback PRIuMAX of \"llu\" in\ngit-compat-util.h, but I'm not sure which platforms need that, nor what\nthey would want for PRId64. By the explanation in 3efb1f3 and e326bce,\nit looks like the strategy was to just use a \"long long\" and hope for\nthe best. So we might want:\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex 9549de6..4438e7c 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -239,6 +239,10 @@ extern char *gitbasename(char *);\n #define PRIuMAX \"llu\"\n #endif\n \n+#ifndef PRId64\n+#define PRId64 \"lld\"\n+#endif\n+\n #ifndef PRIu32\n #define PRIu32 \"u\"\n #endif\n\nas well, but I think I'd rather wait until somebody with an actual\nsystem that needs it reports in (and tells us what the right value for\ntheir system is) as opposed to just guessing.\n\n-Peff\n"}]}