path: root/git-compat-util.h
diff options
authorShawn O. Pearce <>2007-03-07 01:44:30 (GMT)
committerJunio C Hamano <>2007-03-07 19:06:25 (GMT)
commitc4001d92be61766d3494489b15590ca0147ee19d (patch)
tree7c78fe4599bf00354ca36299d11b2a1e4e9324bb /git-compat-util.h
parent7cadf491c6d7a29e345e1608c23b0d98cee5e848 (diff)
Use off_t when we really mean a file offset.
Not all platforms have declared 'unsigned long' to be a 64 bit value, but we want to support a 64 bit packfile (or close enough anyway) in the near future as some projects are getting large enough that their packed size exceeds 4 GiB. By using off_t, the POSIX type that is declared to mean an offset within a file, we support whatever maximum file size the underlying operating system will handle. For most modern systems this is up around 2^60 or higher. Signed-off-by: Shawn O. Pearce <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'git-compat-util.h')
1 files changed, 4 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 56212b2..33b68e4 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -70,6 +70,10 @@
#define PATH_MAX 4096
+#ifndef PRIuMAX
+#define PRIuMAX "llu"
#ifdef __GNUC__
#define NORETURN __attribute__((__noreturn__))