summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2016-05-24 16:16:36 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2016-06-06 15:39:05 -0700
commitab6c81b960e86b26c7fda366f51ff29d1683a555 (patch)
treecaa69861401c74f109fc0cb99718b85e46824fbf /src
parent42b07cc9c8d2e6251d190e5ea0d13fd66cb51e6d (diff)
config: Add SSIZE_T compat for Win32
Diffstat (limited to 'src')
-rw-r--r--src/buffer.h1
-rw-r--r--src/config.h.in8
2 files changed, 8 insertions, 1 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 93ffc95..89328ac 100644
--- 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
index de1a4dd..0f72d6a 100644
--- 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