cmark

My personal build of CMark ✏️

Commit
ab6c81b960e86b26c7fda366f51ff29d1683a555
Parent
42b07cc9c8d2e6251d190e5ea0d13fd66cb51e6d
Author
Vicent Marti <tanoku@gmail.com>
Date

config: Add SSIZE_T compat for Win32

Diffstat

2 files changed, 8 insertions, 1 deletion

Status File Name N° Changes Insertions Deletions
Modified src/buffer.h 1 0 1
Modified src/config.h.in 8 8 0
diff --git a/src/buffer.h b/src/buffer.h
@@ -5,7 +5,6 @@
 #include <stdarg.h>
 #include <string.h>
 #include <limits.h>
-#include <unistd.h>
 #include <stdbool.h>
 #include "config.h"
 
diff --git a/src/config.h.in b/src/config.h.in
@@ -69,6 +69,14 @@ CMARK_INLINE int c99_snprintf(char *outBuf, size_t size, const char *format, ...
 
 #endif
 
+#ifdef _WIN32
+# include <BaseTsd.h>
+  typedef SSIZE_T ssize_t;
+  typedef SIZE_T size_t;
+#else
+# include <sys/types.h>
+#endif
+
 #ifdef __cplusplus
 }
 #endif