blob: 1f5fc291aee21dd6a00d52be846af015df547fe9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#include <string.h>
static const char *errstr[] = {
# define E(n, str) [n] = str,
# include <__errno.h>
# undef E
};
char *strerror(int n) {
return (char*)(errstr[n] ? errstr[n] : "unknown error");
}
|