summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 917a8f8)
raw | patch | inline | side by side (parent: 917a8f8)
author | Simon 'corecode' Schubert <corecode@fs.ei.tum.de> | |
Wed, 17 Jan 2007 08:07:23 +0000 (09:07 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 18 Jan 2007 22:11:50 +0000 (14:11 -0800) |
Plain integer types without a fixed size can vary between platforms. Even
though all common platforms use 32-bit ints, there is no guarantee that
this won't change at some point. Furthermore, specifying an integer type
with explicit size makes the definition of structures more obvious.
Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
though all common platforms use 32-bit ints, there is no guarantee that
this won't change at some point. Furthermore, specifying an integer type
with explicit size makes the definition of structures more obvious.
Signed-off-by: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-compat-util.h | patch | blob | history | |
pack.h | patch | blob | history |
diff --git a/git-compat-util.h b/git-compat-util.h
index 8d244d0d925d4d0848941988f09b7f58fdc0835e..bf3ceb8027e2624209b1c030ce237205c6862d63 100644 (file)
--- a/git-compat-util.h
+++ b/git-compat-util.h
#include <arpa/inet.h>
#include <netdb.h>
#include <pwd.h>
+#include <stdint.h>
#undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */
#include <grp.h>
#define _ALL_SOURCE 1
index 790ff4a39681402d6b6e2517e5fcf1bec59bcdc5..821706fbcd6e6989af8f3dcb37eec32e7a519f71 100644 (file)
--- a/pack.h
+++ b/pack.h
#define PACK_VERSION 2
#define pack_version_ok(v) ((v) == htonl(2) || (v) == htonl(3))
struct pack_header {
- unsigned int hdr_signature;
- unsigned int hdr_version;
- unsigned int hdr_entries;
+ uint32_t hdr_signature;
+ uint32_t hdr_version;
+ uint32_t hdr_entries;
};
/*