aboutsummaryrefslogtreecommitdiff
path: root/windows/mpconfigport.h
diff options
context:
space:
mode:
authorstijn2014-05-03 11:28:29 +0200
committerstijn2014-05-03 20:15:15 +0200
commit72521a1c176506c044169038b68b83e5329a3dda (patch)
tree865f701b5e1a12485e9953e6b6e2ce6ee7082386 /windows/mpconfigport.h
parent6ec835dfef90a2f940a24b126cba8e3d8ede1ef2 (diff)
mingw: Fix number of exponent digits in floating point formatting
By default mingw outputs 3 digits instead of the standard 2 so all float tests using printf fail. Using setenv at the start of the program fixes this. To accomodate calling platform specific initialization a MICROPY_MAIN_INIT_FUNC macro is used which is called in mp_init()
Diffstat (limited to 'windows/mpconfigport.h')
-rw-r--r--windows/mpconfigport.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/windows/mpconfigport.h b/windows/mpconfigport.h
index d27c59cb3..94b333400 100644
--- a/windows/mpconfigport.h
+++ b/windows/mpconfigport.h
@@ -15,6 +15,7 @@
#define MICROPY_MOD_SYS_STDFILES (1)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
+#define MICROPY_PORT_INIT_FUNC init()
// type definitions for the specific machine
@@ -38,3 +39,4 @@ extern const struct _mp_obj_fun_native_t mp_builtin_open_obj;
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
#include "realpath.h"
+#include "init.h"