forked from chobie/php-sundown
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuffer_win32_compat.patch
More file actions
42 lines (37 loc) · 867 Bytes
/
buffer_win32_compat.patch
File metadata and controls
42 lines (37 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
diff --git a/sundown/src/buffer.h b/sundown/src/buffer.h
index 221d142..b76ce1a 100644
--- a/sundown/src/buffer.h
+++ b/sundown/src/buffer.h
@@ -20,7 +20,11 @@
#include <stddef.h>
#include <stdarg.h>
+#ifdef PHP_WIN32
+# include "win32/php_stdint.h"
+#else
#include <stdint.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -28,7 +32,6 @@ extern "C" {
#if defined(_MSC_VER)
#define __attribute__(x)
-#define inline
#endif
typedef enum {
diff --git a/sundown/src/markdown.c b/sundown/src/markdown.c
diff --git a/sundown/src/markdown.h b/sundown/src/markdown.h
index 6f6553e..fc1a67c 100644
--- a/sundown/src/markdown.h
+++ b/sundown/src/markdown.h
@@ -26,6 +26,12 @@
extern "C" {
#endif
+#if defined(_WIN32)
+#ifndef inline
+#define inline
+#endif
+#endif
+
#define SUNDOWN_VERSION "1.16.0"
#define SUNDOWN_VER_MAJOR 1
#define SUNDOWN_VER_MINOR 16