Fixed an issue where ssize_t was being either incorrectly type-def'd, or double type-def'd

This commit is contained in:
Ward Fisher 2018-03-26 15:35:48 -06:00
parent 441353f34f
commit ed6de1be89

View File

@ -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 */