aboutsummaryrefslogtreecommitdiff
path: root/sys/src/errormsg.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-11-19 05:44:21 -0800
committerNicholas Noll <nbnoll@eml.cc>2021-11-19 05:44:21 -0800
commit59d87ccc99f431da06a0ffab0d3e702d9ef82f48 (patch)
treee13de4f7e86cc731add3b3d3bcf3b32ce22adefc /sys/src/errormsg.c
parent835dea0eb6333a9ef452881ea073bfe59d14096a (diff)
chore: make dependence on static syscalls explicit
Diffstat (limited to 'sys/src/errormsg.c')
-rw-r--r--sys/src/errormsg.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/sys/src/errormsg.c b/sys/src/errormsg.c
deleted file mode 100644
index e1d4b73..0000000
--- a/sys/src/errormsg.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#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]);
-}