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 <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Shawn O. Pearce
2007-03-06 20:44:30 -05:00
committed by Junio C Hamano
parent 7cadf491c6
commit c4001d92be
6 changed files with 54 additions and 47 deletions

View File

@ -70,6 +70,10 @@
#define PATH_MAX 4096
#endif
#ifndef PRIuMAX
#define PRIuMAX "llu"
#endif
#ifdef __GNUC__
#define NORETURN __attribute__((__noreturn__))
#else