#include "internal.h" static const struct ErrorMessage { #define E(n, s) char str##n[sizeof(s)]; #include "errno.inc.h" #undef E } errormsg = { #define E(n, s) s, #include "errno.inc.h" #undef E }; static const ushort errmsgidx[] = { #define E(n, s) [n] = offsetof(struct ErrorMessage, str##n), #include "errno.inc.h" #undef E }; char * sys·errormsg(int errno) { if(errno >= arrlen(errmsgidx)) errno=0; return (char*)(&errormsg + errmsgidx[errno]); }