Fixed an issue where ssize_t was being either incorrectly type-def'd, or double type-def'd
@@ -26,10 +26,12 @@ defined and missing types defined.
extern char* strdup(const char*);
#endif
+/*
#ifndef HAVE_SSIZE_T
-#define ssize_t long
+typedef long ssize_t;
+#define HAVE_SSIZE_T
#endif
-
+*/
/* handle null arguments */
#ifndef nulldup
#ifdef HAVE_STRDUP
@@ -39,6 +41,13 @@ char *nulldup(const char* s);
#endif
#endif
+#ifdef _MSC_VER
+#ifndef HAVE_SSIZE_T
+#include <basetsd.h>
+typedef SSIZE_T ssize_t;
+#endif
+#endif
+
#ifndef HAVE_STRLCAT
#ifdef _MSC_VER
/* Windows strlcat_s is equivalent to strlcat, but different arg order */
