Commit 708d9336bb677320e975936e251c7eacf5661510

Edward Thomson 2021-07-30T08:34:28

Merge pull request #5953 from boretrk/c99-inline common.h: use inline when compiling for C99 and later

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/common.h b/src/common.h
index 9123fb5..f83eeb6 100644
--- a/src/common.h
+++ b/src/common.h
@@ -19,6 +19,8 @@
 # define GIT_INLINE(type) static __inline type
 #elif defined(__GNUC__)
 # define GIT_INLINE(type) static __inline__ type
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+# define GIT_INLINE(type) static inline type
 #else
 # define GIT_INLINE(type) static type
 #endif