* [PATCH jk/config-int-range-check] compat/mingw.h: define PRId64
@ 2013-09-19 7:17 Johannes Sixt
2013-09-19 7:56 ` Jeff King
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Sixt @ 2013-09-19 7:17 UTC (permalink / raw)
To: Jeff King; +Cc: Git Mailing List
From: Johannes Sixt <j6t@kdbg.org>
Provide PRId64 alongside PRIuMAX.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
I thought I had compiled 'next' on Windows recently...
This is an emergency fix for a compile error in 'master'.
compat/mingw.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/compat/mingw.h b/compat/mingw.h
index bd0a88b..9eb3b17 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -322,6 +322,7 @@ static inline char *mingw_find_last_dir_sep(const char *path)
#define find_last_dir_sep mingw_find_last_dir_sep
#define PATH_SEP ';'
#define PRIuMAX "I64u"
+#define PRId64 "I64d"
void mingw_open_html(const char *path);
#define open_html mingw_open_html
--
1.8.4.1573.g0cbe1bc
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH jk/config-int-range-check] compat/mingw.h: define PRId64
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
0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2013-09-19 7:56 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Git Mailing List
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-19 7:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).