summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorstijn <stinos@zoho.com>2015-11-13 17:43:10 +0100
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-11-14 02:06:55 +0200
commit5be60d69295751893cedf806365d22df5bec9e5e (patch)
treeaa50d75d6682f5dd0a31711720dc92e0fef8cef8
parent863d4cd862ca470f4bd4253977bba618b835fa39 (diff)
downloadmicropython-5be60d69295751893cedf806365d22df5bec9e5e.tar.gz
micropython-5be60d69295751893cedf806365d22df5bec9e5e.zip
windows: Define ssize_t and use renamed mphal header
This fixes the build after changes in [66fd3e4] and [3a6b3d2]
-rw-r--r--windows/mpconfigport.h7
-rw-r--r--windows/windows_mphal.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/windows/mpconfigport.h b/windows/mpconfigport.h
index 01e066500a..fe13a68763 100644
--- a/windows/mpconfigport.h
+++ b/windows/mpconfigport.h
@@ -196,6 +196,13 @@ extern const struct _mp_obj_module_t mp_module_time;
#define PATH_MAX MICROPY_ALLOC_PATH_MAX
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#ifdef _WIN64
+#define SSIZE_MAX _I64_MAX
+typedef __int64 ssize_t;
+#else
+#define SSIZE_MAX _I32_MAX
+typedef int ssize_t;
+#endif
// Put static/global variables in sections with a known name
diff --git a/windows/windows_mphal.h b/windows/windows_mphal.h
index c36889dcbb..dce2484550 100644
--- a/windows/windows_mphal.h
+++ b/windows/windows_mphal.h
@@ -25,7 +25,7 @@
*/
#include "sleep.h"
-#include "unix/unix_mphal.h"
+#include "unix/mphalport.h"
#define MICROPY_HAL_HAS_VT100 (0)