From 96740be3574d91279ca883adbb19b976413ef52b Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 26 Apr 2018 15:02:59 +1000 Subject: [PATCH] py/mperrno: Define MP_EWOULDBLOCK as EWOULDBLOCK, not EAGAIN. Most modern systems have EWOULDBLOCK aliased to EAGAIN, ie they have the same value. But some systems use different values for these errnos and if a uPy port is using the system errno values (ie not the internal uPy values) then it's important to be able to distinguish EWOULDBLOCK from EAGAIN. Eg if a system call returned EWOULDBLOCK it must be possible to check for this return value, and this patch makes this now possible. --- py/mperrno.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/mperrno.h b/py/mperrno.h index f439f65554..0cad75a17c 100644 --- a/py/mperrno.h +++ b/py/mperrno.h @@ -122,7 +122,7 @@ #define MP_EPIPE EPIPE #define MP_EDOM EDOM #define MP_ERANGE ERANGE -#define MP_EWOULDBLOCK EAGAIN +#define MP_EWOULDBLOCK EWOULDBLOCK #define MP_EOPNOTSUPP EOPNOTSUPP #define MP_EAFNOSUPPORT EAFNOSUPPORT #define MP_EADDRINUSE EADDRINUSE