Commit d5535bd57a703e26c397f3efc4747a079954c87d

Martin Mitas 2016-10-04T00:36:02

For MSVC, #define inline __inline. This fixes build in MSVC.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/md4c/md4c.c b/md4c/md4c.c
index ef741fd..3136b53 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -35,6 +35,14 @@
  ***  Miscellaneous Stuff  ***
  *****************************/
 
+#ifdef _MSC_VER
+    /* MSVC does not understand "inline" when building as pure C (not C++).
+     * However it understands "__inline" */
+    #ifndef __cplusplus
+        #define inline __inline
+    #endif
+#endif
+
 /* Magic to support UTF16-LE (i.e. what is called Unicode among Windows
  * developers) input/output on Windows. */
 #ifdef _T