added ssize_t typedef for windows

Tue, 23 Jul 2013 12:54:45 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 23 Jul 2013 12:54:45 +0200
changeset 127
5418bda21896
parent 126
dffb551c5f18
child 128
b79b1ce438dd

added ssize_t typedef for windows

ucx/list.h file | annotate | diff | comparison | revisions
ucx/ucx.h file | annotate | diff | comparison | revisions
--- a/ucx/list.h	Tue Jul 23 12:14:17 2013 +0200
+++ b/ucx/list.h	Tue Jul 23 12:54:45 2013 +0200
@@ -38,7 +38,6 @@
 
 #include "ucx.h"
 #include "allocator.h"
-#include <sys/types.h>
 
 #ifdef	__cplusplus
 extern "C" {
--- a/ucx/ucx.h	Tue Jul 23 12:14:17 2013 +0200
+++ b/ucx/ucx.h	Tue Jul 23 12:54:45 2013 +0200
@@ -38,6 +38,16 @@
 
 #include <stdlib.h>
 
+#ifdef _WIN32
+#ifndef __ssize_t_defined
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#define __ssize_t_defined
+#endif /* __ssize_t_defined */
+#else /* !_WIN32 */
+#include <sys/types.h>
+#endif /* _WIN32 */
+
 #ifdef	__cplusplus
 #ifndef _Bool
 #define _Bool bool

mercurial