7 char *strerror(int errnum
)
9 static char message
[32] = "error "; /* enough for error 2^63-1 */
12 unsigned int e
= (unsigned int)errnum
;
14 extern const int sys_nerr
;
15 extern const char *const sys_errlist
[];
17 if (e
< (unsigned int)sys_nerr
&& sys_errlist
[e
])
18 return (char *)sys_errlist
[e
];
20 p
= numbuf
+ sizeof numbuf
;
24 *--p
= (e
% 10) + '0';
28 memcpy(message
+ 6, p
, (numbuf
+ sizeof numbuf
) - p
);