From e2337f39c3a4ab046b7a572fce89df27451fd2bb Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Sun, 25 Apr 2010 21:55:41 +0100 Subject: [PATCH] MSVC: Fix a syntax error caused by an inline function definition Commit 5dddf7c (Add block-sha1 in favour of the mozilla routines 2010-04-14) introduced the "bswap.h" header file which contains an inline function (default_swab32()). The msvc compiler does not support the inline keyword which causes the build to fail with a syntax error. However, msvc does support inline functions using the __inline keyword language extension. We already have the GIT_INLINE() macro that allows us to hide this syntatic difference. In order to fix the build, we simply use GIT_INLINE() in the definition of the default_swab32() function. Signed-off-by: Ramsay Jones --- src/bswap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bswap.h b/src/bswap.h index 0dac883d0..b3e8a0abb 100644 --- a/src/bswap.h +++ b/src/bswap.h @@ -11,7 +11,7 @@ * Default version that the compiler ought to optimize properly with * constant values. */ -static inline uint32_t default_swab32(uint32_t val) +GIT_INLINE(uint32_t) default_swab32(uint32_t val) { return (((val & 0xff000000) >> 24) | ((val & 0x00ff0000) >> 8) |