#include <ctype.h>
#include <string.h>
#include <stdlib.h>
+
+#ifndef __WXMSW__
#include <errno.h>
+#endif
#ifdef __SALFORDC__
#include <clib.h>
// buffer were large enough
// also, it may return an errno may be something like EILSEQ,
// in which case we need to break out
- if ( (len >= 0 && len <= size) || errno != EOVERFLOW )
+ if ( (len >= 0 && len <= size)
+ // No EOVERFLOW on Windows nor Palm 6.0
+#if !defined(__WXMSW__) && !defined(__WXPALMOS__)
+ || errno != EOVERFLOW
+#endif
+ )
{
// ok, there was enough space
break;