#if !defined(unix) && !defined(__APPLE__)
//#define _read readfix
#endif
-#define AVSINT ptrdiff_t
+#define AVSINT std::ptrdiff_t
#define AVS_ERROR
#define AVS_OK
#include <math.h>
#include <stdlib.h>
#include <limits.h>
+#ifndef _WIN32
+# include <unistd.h>
+#endif
#if !defined(unix) && !defined(__APPLE__)
#include <io.h>
#endif