summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common.h4
-rw-r--r--src/khash.h4
-rw-r--r--src/xdiff/xdiffi.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/src/common.h b/src/common.h
index 44063be12..cb980c107 100644
--- a/src/common.h
+++ b/src/common.h
@@ -17,8 +17,10 @@
/** Declare a function as always inlined. */
#if defined(_MSC_VER)
# define GIT_INLINE(type) static __inline type
+#elif defined(__GNUC__)
+# define GIT_INLINE(type) static __inline__ type
#else
-# define GIT_INLINE(type) static inline type
+# define GIT_INLINE(type) static type
#endif
/** Support for gcc/clang __has_builtin intrinsic */
diff --git a/src/khash.h b/src/khash.h
index 71eb583d5..40e2d1848 100644
--- a/src/khash.h
+++ b/src/khash.h
@@ -146,8 +146,10 @@ typedef unsigned long long khint64_t;
#ifndef kh_inline
#ifdef _MSC_VER
#define kh_inline __inline
+#elif defined(__GNUC__)
+#define kh_inline __inline__
#else
-#define kh_inline inline
+#define kh_inline
#endif
#endif /* kh_inline */
diff --git a/src/xdiff/xdiffi.c b/src/xdiff/xdiffi.c
index 3a71ef678..97db05466 100644
--- a/src/xdiff/xdiffi.c
+++ b/src/xdiff/xdiffi.c
@@ -33,8 +33,10 @@
/** Declare a function as always inlined. */
#if defined(_MSC_VER)
# define XDL_INLINE(type) static __inline type
+#elif defined(__GNUC__)
+# define XDL_INLINE(type) static __inline__ type
#else
-# define XDL_INLINE(type) static inline type
+#define XDG_INLINE(type) static type
#endif
typedef struct s_xdpsplit {