summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-02-18 07:22:20 -0800
committerEdward Thomson <ethomson@edwardthomson.com>2019-02-21 09:58:15 +0000
commit247e6d909ac267688611893c73695d154d3e82e5 (patch)
tree0540a3f50de30e57a00596b52ba0df6b79e49bfb /src
parentcb150e605587ab44c837f3567fe064fa091927ba (diff)
downloadlibgit2-ethomson/inttypes.tar.gz
Remove public 'inttypes.h' headerethomson/inttypes
Remove an `inttypes.h` header that is too large in scope, and far too public. For Visual Studio 2012 and earlier (ie, `_MSC_VER < 1800`), we do need to include `stdint.h` in our public headers, for types like `uint32_t`. Internally, we also need to define `PRId64` as a printf formatting string when it is not available.
Diffstat (limited to 'src')
-rw-r--r--src/cc-compat.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cc-compat.h b/src/cc-compat.h
index 8aaa8bb5a..7ade561f3 100644
--- a/src/cc-compat.h
+++ b/src/cc-compat.h
@@ -48,6 +48,11 @@
/* Define the printf format specifer to use for size_t output */
#if defined(_MSC_VER) || defined(__MINGW32__)
+/* Visual Studio 2012 and prior lack PRId64 entirely */
+# ifndef PRId64
+# define PRId64 "I64d"
+# endif
+
/* The first block is needed to avoid warnings on MingW amd64 */
# if (SIZE_MAX == ULLONG_MAX)
# define PRIuZ "I64u"