aboutsummaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-05-16 12:43:05 -0700
committerJunio C Hamano <junkio@cox.net>2007-05-16 12:43:05 -0700
commitfdcb769916c93b53517ef1b4cae447a3333c9b86 (patch)
tree15900032ae854c16292e8d8e0b5d1f089b5c8263 /git-compat-util.h
parent7e431ef9ab933d7ff899a999e40627ab49774f3a (diff)
parent0ab564be6e59c66c7aa4fc44997f3fc62ebcd0d9 (diff)
downloadgit-fdcb769916c93b53517ef1b4cae447a3333c9b86.tar.gz
git-fdcb769916c93b53517ef1b4cae447a3333c9b86.tar.xz
Merge branch 'maint'
* maint: format-patch: add MIME-Version header when we add content-type. Fixed link in user-manual import-tars: Use the "Link indicator" to identify directories git name-rev writes beyond the end of malloc() with large generations Documentation/branch: fix small typo in -D example
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index c08688c8f..6bd8987b2 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -21,6 +21,9 @@
#define MSB(x, bits) ((x) & TYPEOF(x)(~0ULL << (sizeof(x) * 8 - (bits))))
+/* Approximation of the length of the decimal representation of this type. */
+#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
+
#if !defined(__APPLE__) && !defined(__FreeBSD__)
#define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */