summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorstijn <stinos@zoho.com>2014-06-28 21:04:20 +0200
committerstijn <stinos@zoho.com>2014-06-29 09:40:20 +0200
commitec6fa8732b3b30e14e505d9ee004bde260d48255 (patch)
tree7fd6803dad5029dc0dab6ce35afe86ae76a557ff
parent8139494e54b5ad1630f30490216e9486b976bdb8 (diff)
downloadmicropython-ec6fa8732b3b30e14e505d9ee004bde260d48255.tar.gz
micropython-ec6fa8732b3b30e14e505d9ee004bde260d48255.zip
windows: Sync mpconfigport.h with the unix' version
- rearrange/add definitions that were not there so it's easier to compare both - use MICROPY_PY_SYS_PLATFORM in main.c since it's available anyway - define EWOULDBLOCK, it is missing from ingw32
-rw-r--r--py/stream.c3
-rw-r--r--unix/main.c2
-rw-r--r--windows/mpconfigport.h20
3 files changed, 18 insertions, 7 deletions
diff --git a/py/stream.c b/py/stream.c
index a5a96a8682..cfdea15cca 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -37,6 +37,9 @@
#include "stream.h"
#if MICROPY_STREAMS_NON_BLOCK
#include <errno.h>
+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
+#define EWOULDBLOCK 140
+#endif
#endif
// This file defines generic Python stream read/write methods which
diff --git a/unix/main.c b/unix/main.c
index 23615aa988..1bee639eb2 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -147,7 +147,7 @@ STATIC char *strjoin(const char *s1, int sep_char, const char *s2) {
}
STATIC void do_repl(void) {
- printf("Micro Python " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; UNIX version\n");
+ printf("Micro Python " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; " MICROPY_PY_SYS_PLATFORM " version\n");
for (;;) {
char *line = prompt(">>> ");
diff --git a/windows/mpconfigport.h b/windows/mpconfigport.h
index c930fe95e8..963fcfe768 100644
--- a/windows/mpconfigport.h
+++ b/windows/mpconfigport.h
@@ -35,22 +35,30 @@
#define MICROPY_EMIT_X64 (0)
#define MICROPY_EMIT_THUMB (0)
#define MICROPY_EMIT_INLINE_THUMB (0)
+#define MICROPY_ENABLE_GC (1)
+#define MICROPY_ENABLE_FINALISER (1)
#define MICROPY_MEM_STATS (1)
#define MICROPY_DEBUG_PRINTERS (1)
#define MICROPY_HELPER_REPL (1)
#define MICROPY_HELPER_LEXER_UNIX (1)
+#define MICROPY_ENABLE_SOURCE_LINE (1)
+#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
+#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
+#define MICROPY_STREAMS_NON_BLOCK (1)
+#define MICROPY_OPT_COMPUTED_GOTO (0)
+#define MICROPY_PY_BUILTINS_STR_UNICODE (0)
#define MICROPY_PY_BUILTINS_FROZENSET (1)
-#define MICROPY_PY_CMATH (1)
-#define MICROPY_PY_SYS_STDFILES (1)
#define MICROPY_PY_SYS_EXIT (1)
-#define MICROPY_ENABLE_GC (1)
-#define MICROPY_ENABLE_FINALISER (1)
+#define MICROPY_PY_SYS_PLATFORM "win32"
+#define MICROPY_PY_SYS_STDFILES (1)
+#define MICROPY_PY_CMATH (1)
+#define MICROPY_PY_IO_FILEIO (1)
#define MICROPY_PY_GC_COLLECT_RETVAL (1)
+#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED)
#ifdef _MSC_VER
#define MICROPY_GCREGS_SETJMP (1)
#endif
-#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
-#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
+
#define MICROPY_PORT_INIT_FUNC init()
#define MICROPY_PORT_DEINIT_FUNC deinit()