summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2009-08-18 19:26:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-08-18 21:16:37 (GMT)
commit51ea55190b6e72c77c96754c1bf2f149a4714848 (patch)
treea8f4a6fa1f05c0080c926432905e6e66ccbfadeb /git-compat-util.h
parentd5f6a96fa4792f6143d06d9c0b572a96d7235305 (diff)
downloadgit-51ea55190b6e72c77c96754c1bf2f149a4714848.zip
git-51ea55190b6e72c77c96754c1bf2f149a4714848.tar.gz
git-51ea55190b6e72c77c96754c1bf2f149a4714848.tar.bz2
make sure byte swapping is optimal for git
We rely on ntohl() and htonl() to perform byte swapping in many places. However, some platforms have libraries providing really poor implementations of those which might cause significant performance issues, especially with the block-sha1 code. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 9f941e4..000859e 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -176,6 +176,8 @@ extern char *gitbasename(char *);
#endif
#endif
+#include "compat/bswap.h"
+
/* General helper functions */
extern void usage(const char *err) NORETURN;
extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2)));