py, unix: Make "mpconfig.h" be first included, as other headers depend on it.
Specifically, nlr.h does.
diff --git a/py/argcheck.c b/py/argcheck.c
index bfaa576..4b849d1 100644
--- a/py/argcheck.c
+++ b/py/argcheck.c
@@ -1,9 +1,9 @@
#include <stdlib.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/builtin.c b/py/builtin.c
index b586792..5ff40be 100644
--- a/py/builtin.c
+++ b/py/builtin.c
@@ -1,9 +1,9 @@
#include <stdio.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "objstr.h"
diff --git a/py/builtinevex.c b/py/builtinevex.c
index ae82537..bc3adb6 100644
--- a/py/builtinevex.c
+++ b/py/builtinevex.c
@@ -1,8 +1,8 @@
#include <stdint.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "lexer.h"
#include "lexerunix.h"
diff --git a/py/builtinimport.c b/py/builtinimport.c
index 07978e6..323b63e 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -8,9 +8,9 @@
#include <malloc.h>
#endif
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "lexer.h"
#include "lexerunix.h"
diff --git a/py/nlr.h b/py/nlr.h
index c7b5928..757ae61 100644
--- a/py/nlr.h
+++ b/py/nlr.h
@@ -3,7 +3,6 @@
#include <limits.h>
#include <setjmp.h>
-#include "mpconfig.h"
typedef struct _nlr_buf_t nlr_buf_t;
struct _nlr_buf_t {
diff --git a/py/nlrsetjmp.c b/py/nlrsetjmp.c
index a97c863..a8756d9 100644
--- a/py/nlrsetjmp.c
+++ b/py/nlrsetjmp.c
@@ -1,5 +1,6 @@
#include <setjmp.h>
#include <stdio.h>
+#include "mpconfig.h"
#include "nlr.h"
#if MICROPY_NLR_SETJMP
diff --git a/py/obj.c b/py/obj.c
index 4b72514..e1cee3c 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -2,9 +2,9 @@
#include <stdarg.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
diff --git a/py/objarray.c b/py/objarray.c
index ea37655..428e619 100644
--- a/py/objarray.c
+++ b/py/objarray.c
@@ -1,9 +1,9 @@
#include <string.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
diff --git a/py/objbool.c b/py/objbool.c
index 5602091..c479fd3 100644
--- a/py/objbool.c
+++ b/py/objbool.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
diff --git a/py/objboundmeth.c b/py/objboundmeth.c
index 55b75e4..346118d 100644
--- a/py/objboundmeth.c
+++ b/py/objboundmeth.c
@@ -1,8 +1,8 @@
#include <string.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/objcell.c b/py/objcell.c
index 7fdf07b..488a737 100644
--- a/py/objcell.c
+++ b/py/objcell.c
@@ -1,6 +1,6 @@
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/objclosure.c b/py/objclosure.c
index 09371b0..ca7c537 100644
--- a/py/objclosure.c
+++ b/py/objclosure.c
@@ -1,8 +1,8 @@
#include <string.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "objtuple.h"
diff --git a/py/objcomplex.c b/py/objcomplex.c
index 9244209..45cff6a 100644
--- a/py/objcomplex.c
+++ b/py/objcomplex.c
@@ -1,9 +1,9 @@
#include <stdlib.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "parsenum.h"
diff --git a/py/objdict.c b/py/objdict.c
index 0654a19..334798c 100644
--- a/py/objdict.c
+++ b/py/objdict.c
@@ -2,9 +2,9 @@
#include <string.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "objtuple.h"
diff --git a/py/objexcept.c b/py/objexcept.c
index 7fd00c1..abf56ab 100644
--- a/py/objexcept.c
+++ b/py/objexcept.c
@@ -2,9 +2,9 @@
#include <stdarg.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "objtuple.h"
diff --git a/py/objfilter.c b/py/objfilter.c
index 3eacdfc..37cb269 100644
--- a/py/objfilter.c
+++ b/py/objfilter.c
@@ -1,9 +1,9 @@
#include <stdlib.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/objfloat.c b/py/objfloat.c
index 9249160..14d861b 100644
--- a/py/objfloat.c
+++ b/py/objfloat.c
@@ -4,9 +4,9 @@
#include <assert.h>
#include <math.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "parsenum.h"
diff --git a/py/objfun.c b/py/objfun.c
index 7a1c3ff..e0c2577 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -7,9 +7,9 @@
#include <malloc.h>
#endif
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "objtuple.h"
diff --git a/py/objgenerator.c b/py/objgenerator.c
index d02f838..d7d6dca 100644
--- a/py/objgenerator.c
+++ b/py/objgenerator.c
@@ -1,9 +1,9 @@
#include <stdlib.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/objgetitemiter.c b/py/objgetitemiter.c
index faa8321..15676b4 100644
--- a/py/objgetitemiter.c
+++ b/py/objgetitemiter.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/objint.c b/py/objint.c
index 110876e..bec4e92 100644
--- a/py/objint.c
+++ b/py/objint.c
@@ -3,9 +3,9 @@
#include <assert.h>
#include <string.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "parsenum.h"
diff --git a/py/objint_longlong.c b/py/objint_longlong.c
index 7d71c5a..d319e27 100644
--- a/py/objint_longlong.c
+++ b/py/objint_longlong.c
@@ -2,9 +2,9 @@
#include <stdint.h>
#include <string.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "mpz.h"
diff --git a/py/objint_mpz.c b/py/objint_mpz.c
index b94dcfe..bfc7def 100644
--- a/py/objint_mpz.c
+++ b/py/objint_mpz.c
@@ -3,9 +3,9 @@
#include <stdio.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "parsenumbase.h"
#include "obj.h"
diff --git a/py/objlist.c b/py/objlist.c
index 0c55f52..d886aff 100644
--- a/py/objlist.c
+++ b/py/objlist.c
@@ -1,9 +1,9 @@
#include <string.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
diff --git a/py/objmap.c b/py/objmap.c
index 45e6554..c6f8f16 100644
--- a/py/objmap.c
+++ b/py/objmap.c
@@ -1,9 +1,9 @@
#include <stdlib.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/objmodule.c b/py/objmodule.c
index 15ccd68..d4a45b8 100644
--- a/py/objmodule.c
+++ b/py/objmodule.c
@@ -1,9 +1,9 @@
#include <stdlib.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "objmodule.h"
diff --git a/py/objnamedtuple.c b/py/objnamedtuple.c
index 4239983..99a1d7b 100644
--- a/py/objnamedtuple.c
+++ b/py/objnamedtuple.c
@@ -1,7 +1,7 @@
#include <string.h>
-#include "misc.h"
#include "mpconfig.h"
+#include "misc.h"
#include "nlr.h"
#include "qstr.h"
#include "obj.h"
diff --git a/py/objnone.c b/py/objnone.c
index fc55132..49b726b 100644
--- a/py/objnone.c
+++ b/py/objnone.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
diff --git a/py/objobject.c b/py/objobject.c
index 74a4926..62fd0c4 100644
--- a/py/objobject.c
+++ b/py/objobject.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
diff --git a/py/objproperty.c b/py/objproperty.c
index dd4eede..220388d 100644
--- a/py/objproperty.c
+++ b/py/objproperty.c
@@ -1,9 +1,9 @@
#include <stdlib.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/objrange.c b/py/objrange.c
index 8c0eadd..acfeed7 100644
--- a/py/objrange.c
+++ b/py/objrange.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/objset.c b/py/objset.c
index db3683f..1d10f94 100644
--- a/py/objset.c
+++ b/py/objset.c
@@ -2,9 +2,9 @@
#include <string.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/objslice.c b/py/objslice.c
index 924927d..0488eb4 100644
--- a/py/objslice.c
+++ b/py/objslice.c
@@ -1,9 +1,9 @@
#include <stdlib.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
diff --git a/py/objstr.c b/py/objstr.c
index aab1a44..fc7415f 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -2,9 +2,9 @@
#include <string.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
diff --git a/py/objstringio.c b/py/objstringio.c
index a3a7566..8b3dfaf 100644
--- a/py/objstringio.c
+++ b/py/objstringio.c
@@ -1,9 +1,9 @@
#include <stdio.h>
#include <string.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/objtuple.c b/py/objtuple.c
index e6b902d..792c651 100644
--- a/py/objtuple.c
+++ b/py/objtuple.c
@@ -1,9 +1,9 @@
#include <string.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
diff --git a/py/objtype.c b/py/objtype.c
index f8b0b5d..0eb09e5 100644
--- a/py/objtype.c
+++ b/py/objtype.c
@@ -3,9 +3,9 @@
#include <string.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
diff --git a/py/objzip.c b/py/objzip.c
index 4c7070b..c3bffd8 100644
--- a/py/objzip.c
+++ b/py/objzip.c
@@ -1,8 +1,8 @@
#include <stdlib.h>
#include <assert.h>
-#include "misc.h"
#include "mpconfig.h"
+#include "misc.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/opmethods.c b/py/opmethods.c
index a745ec1..b029eef 100644
--- a/py/opmethods.c
+++ b/py/opmethods.c
@@ -1,6 +1,6 @@
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime.h"
diff --git a/py/runtime.c b/py/runtime.c
index b56740a..2928de8 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -2,9 +2,9 @@
#include <string.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "objtuple.h"
diff --git a/py/sequence.c b/py/sequence.c
index f91bf43..9fce1c5 100644
--- a/py/sequence.c
+++ b/py/sequence.c
@@ -2,9 +2,9 @@
#include <stdbool.h>
#include <string.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "runtime0.h"
diff --git a/py/showbc.c b/py/showbc.c
index e3032e8..b5b5ce4 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -1,8 +1,8 @@
#include <stdio.h>
#include <assert.h>
-#include "misc.h"
#include "mpconfig.h"
+#include "misc.h"
#include "qstr.h"
#include "bc0.h"
diff --git a/py/stream.c b/py/stream.c
index 72e6ab5..113eaa4 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -1,8 +1,8 @@
#include <string.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "stream.h"
diff --git a/py/vm.c b/py/vm.c
index d3eb970..f2ca91b 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -2,9 +2,9 @@
#include <string.h>
#include <assert.h>
+#include "mpconfig.h"
#include "nlr.h"
#include "misc.h"
-#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "emitglue.h"