diff options
author | Damien George <damien.p.george@gmail.com> | 2014-05-03 22:44:24 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-05-03 22:44:24 +0100 |
commit | 75aebda809e0196b7986af80a80dcc56566beacb (patch) | |
tree | c9bdcf3ffde251cc7a85e622554b5d7d6aa2d0e7 /windows | |
parent | d5f5b2f76698e29f9cc2f0ae682d2475c0d77baa (diff) | |
parent | 3a0184039081d6f0da8928a2a4dd60ff67dfcac7 (diff) | |
download | micropython-75aebda809e0196b7986af80a80dcc56566beacb.tar.gz micropython-75aebda809e0196b7986af80a80dcc56566beacb.zip |
Merge branch 'stinos-mingw-float-printf'
Diffstat (limited to 'windows')
-rw-r--r-- | windows/Makefile | 1 | ||||
-rw-r--r-- | windows/init.c | 5 | ||||
-rw-r--r-- | windows/init.h | 1 | ||||
-rw-r--r-- | windows/mpconfigport.h | 2 |
4 files changed, 9 insertions, 0 deletions
diff --git a/windows/Makefile b/windows/Makefile index 351aad6f1a..ce75a60985 100644 --- a/windows/Makefile +++ b/windows/Makefile @@ -31,6 +31,7 @@ SRC_C = \ unix/main.c \ unix/file.c \ realpath.c \ + init.c \ OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) diff --git a/windows/init.c b/windows/init.c new file mode 100644 index 0000000000..78b8738f77 --- /dev/null +++ b/windows/init.c @@ -0,0 +1,5 @@ +#include <stdlib.h> + +void init() { + putenv("PRINTF_EXPONENT_DIGITS=2"); +} diff --git a/windows/init.h b/windows/init.h new file mode 100644 index 0000000000..70e535e495 --- /dev/null +++ b/windows/init.h @@ -0,0 +1 @@ +void init(void); diff --git a/windows/mpconfigport.h b/windows/mpconfigport.h index d27c59cb31..94b3334007 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" |