summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2007-01-16 00:33:19 -0500
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2007-01-16 00:33:36 -0500
commit0ea9f045f4eaa1d37c6b318d9d6849a4f447b997 (patch)
tree98aba83b9f0d7b489ca44a0e19a5e8ec44cb507f /git-compat-util.h
parentCorrected buffer overflow during automatic checkpoint in fast-import. (diff)
downloadtgif-0ea9f045f4eaa1d37c6b318d9d6849a4f447b997.tar.xz
Use uintmax_t for marks in fast-import.
If a frontend wants to use a mark per file revision and per commit and is doing a truly huge import (such as a 32 GiB SVN repository) we may need more than 2**32 unique mark values, especially if the frontend is unable (or unwilling) to recycle mark values. For mark idnums we should use the largest unsigned integer type available, hoping that will be at least 64 bits when we are compiled as a 64 bit executable. This way we may consume huge amounts of memory storing our mark table, but we'll at least be able to process the entire import without failing. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 8781e8e22d..614583e56a 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -28,6 +28,7 @@
#include <string.h>
#include <errno.h>
#include <limits.h>
+#include <inttypes.h>
#include <sys/param.h>
#include <sys/types.h>
#include <dirent.h>