aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-03-06 20:44:30 -0500
committerJunio C Hamano <junkio@cox.net>2007-03-07 11:06:25 -0800
commitc4001d92be61766d3494489b15590ca0147ee19d (patch)
tree7c78fe4599bf00354ca36299d11b2a1e4e9324bb /cache.h
parent7cadf491c6d7a29e345e1608c23b0d98cee5e848 (diff)
downloadgit-c4001d92be61766d3494489b15590ca0147ee19d.tar.gz
git-c4001d92be61766d3494489b15590ca0147ee19d.tar.xz
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>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/cache.h b/cache.h
index 63a093bcf..ae25759c4 100644
--- a/cache.h
+++ b/cache.h
@@ -383,7 +383,7 @@ extern struct packed_git {
} *packed_git;
struct pack_entry {
- unsigned int offset;
+ off_t offset;
unsigned char sha1[20];
struct packed_git *p;
};
@@ -422,15 +422,15 @@ extern struct packed_git *find_sha1_pack(const unsigned char *sha1,
struct packed_git *packs);
extern void pack_report(void);
-extern unsigned char* use_pack(struct packed_git *, struct pack_window **, unsigned long, unsigned int *);
+extern unsigned char* use_pack(struct packed_git *, struct pack_window **, off_t, unsigned int *);
extern void unuse_pack(struct pack_window **);
extern struct packed_git *add_packed_git(char *, int, int);
extern uint32_t num_packed_objects(const struct packed_git *p);
extern int nth_packed_object_sha1(const struct packed_git *, uint32_t, unsigned char*);
-extern unsigned long find_pack_entry_one(const unsigned char *, struct packed_git *);
-extern void *unpack_entry(struct packed_git *, unsigned long, enum object_type *, unsigned long *);
+extern off_t find_pack_entry_one(const unsigned char *, struct packed_git *);
+extern void *unpack_entry(struct packed_git *, off_t, enum object_type *, unsigned long *);
extern unsigned long unpack_object_header_gently(const unsigned char *buf, unsigned long len, enum object_type *type, unsigned long *sizep);
-extern const char *packed_object_info_detail(struct packed_git *, unsigned long, unsigned long *, unsigned long *, unsigned int *, unsigned char *);
+extern const char *packed_object_info_detail(struct packed_git *, off_t, unsigned long *, unsigned long *, unsigned int *, unsigned char *);
/* Dumb servers support */
extern int update_server_info(int);