summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-07-24 18:43:14 +1000
committerDamien George <damien.p.george@gmail.com>2017-07-24 18:43:14 +1000
commitaa7be82a4dff59b22763abbe1bd5e74c0e37b453 (patch)
tree995769631aff96f66484fc90b4e573fe7563a908
parenta559098fecd0a0e2aa98d2a8b3b6ba080b4e096f (diff)
downloadmicropython-aa7be82a4dff59b22763abbe1bd5e74c0e37b453.tar.gz
micropython-aa7be82a4dff59b22763abbe1bd5e74c0e37b453.zip
all: Don't include system errno.h when it's not needed.
-rw-r--r--cc3200/mods/pybuart.c1
-rw-r--r--extmod/modbtree.c2
-rw-r--r--extmod/modussl_axtls.c1
-rw-r--r--extmod/modussl_mbedtls.c1
-rw-r--r--extmod/modwebrepl.c1
-rw-r--r--extmod/modwebsocket.c5
-rw-r--r--extmod/uos_dupterm.c1
-rw-r--r--extmod/vfs_fat_file.c1
-rw-r--r--mpy-cross/main.c1
-rw-r--r--py/reader.c1
10 files changed, 3 insertions, 12 deletions
diff --git a/cc3200/mods/pybuart.c b/cc3200/mods/pybuart.c
index 92bb3e46e6..06938bdd40 100644
--- a/cc3200/mods/pybuart.c
+++ b/cc3200/mods/pybuart.c
@@ -27,7 +27,6 @@
#include <stdint.h>
#include <stdio.h>
-#include <errno.h>
#include <string.h>
#include "py/mpconfig.h"
diff --git a/extmod/modbtree.c b/extmod/modbtree.c
index 127dd71a39..229daaf0f9 100644
--- a/extmod/modbtree.c
+++ b/extmod/modbtree.c
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <string.h>
-#include <errno.h>
+#include <errno.h> // for declaration of global errno variable
#include <fcntl.h>
#include "py/nlr.h"
diff --git a/extmod/modussl_axtls.c b/extmod/modussl_axtls.c
index a5ab8896c0..be1aa0359c 100644
--- a/extmod/modussl_axtls.c
+++ b/extmod/modussl_axtls.c
@@ -26,7 +26,6 @@
#include <stdio.h>
#include <string.h>
-#include <errno.h>
#include "py/nlr.h"
#include "py/runtime.h"
diff --git a/extmod/modussl_mbedtls.c b/extmod/modussl_mbedtls.c
index ad29666ae8..f4b551cb9b 100644
--- a/extmod/modussl_mbedtls.c
+++ b/extmod/modussl_mbedtls.c
@@ -29,7 +29,6 @@
#include <stdio.h>
#include <string.h>
-#include <errno.h>
#include "py/nlr.h"
#include "py/runtime.h"
diff --git a/extmod/modwebrepl.c b/extmod/modwebrepl.c
index ce3c7dcbd5..9e3f16fe72 100644
--- a/extmod/modwebrepl.c
+++ b/extmod/modwebrepl.c
@@ -27,7 +27,6 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
-#include <errno.h>
#include "py/nlr.h"
#include "py/obj.h"
diff --git a/extmod/modwebsocket.c b/extmod/modwebsocket.c
index 9e17d6a6d8..6c6e32c1a2 100644
--- a/extmod/modwebsocket.c
+++ b/extmod/modwebsocket.c
@@ -27,7 +27,6 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
-#include <errno.h>
#include "py/nlr.h"
#include "py/obj.h"
@@ -88,7 +87,7 @@ STATIC mp_uint_t websocket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
self->buf_pos += out_sz;
self->to_recv -= out_sz;
if (self->to_recv != 0) {
- *errcode = EAGAIN;
+ *errcode = MP_EAGAIN;
return MP_STREAM_ERROR;
}
}
@@ -267,7 +266,7 @@ STATIC mp_uint_t websocket_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_t
return cur;
}
default:
- *errcode = EINVAL;
+ *errcode = MP_EINVAL;
return MP_STREAM_ERROR;
}
}
diff --git a/extmod/uos_dupterm.c b/extmod/uos_dupterm.c
index d888099dff..29a62ab898 100644
--- a/extmod/uos_dupterm.c
+++ b/extmod/uos_dupterm.c
@@ -24,7 +24,6 @@
* THE SOFTWARE.
*/
-#include <errno.h>
#include <string.h>
#include "py/mpconfig.h"
diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c
index edffa37c76..22907c12a2 100644
--- a/extmod/vfs_fat_file.c
+++ b/extmod/vfs_fat_file.c
@@ -28,7 +28,6 @@
#if MICROPY_VFS && MICROPY_VFS_FAT
#include <stdio.h>
-#include <errno.h>
#include "py/nlr.h"
#include "py/runtime.h"
diff --git a/mpy-cross/main.c b/mpy-cross/main.c
index 4c88c72224..ca8d9633fa 100644
--- a/mpy-cross/main.c
+++ b/mpy-cross/main.c
@@ -28,7 +28,6 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
-#include <errno.h>
#include "py/mpstate.h"
#include "py/compile.h"
diff --git a/py/reader.c b/py/reader.c
index 5df45c4957..c4d18d53dc 100644
--- a/py/reader.c
+++ b/py/reader.c
@@ -71,7 +71,6 @@ void mp_reader_new_mem(mp_reader_t *reader, const byte *buf, size_t len, size_t
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
-#include <errno.h>
typedef struct _mp_reader_posix_t {
bool close_fd;