Macros to convert big-endian values to host byte order and vice-versa. These were defined in adhoc way for some ports (e.g. esp8266), allow reuse, provide default implementations, while allow ports to override.
POSIX requires malloc(), etc. to set ENOMEM on the failure, and e.g. BerkeleyDB relies on this: http://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html This should fix confusing OSError exceptions with 0 error code when working with btree module.
As it's used by BerkeleyDB, etc.