3 #include "locale_impl.h"
6 #define E(a,b) ((unsigned char)a),
7 static const unsigned char errid[] = {
8 #include "__strerror.h"
13 static const char errmsg[] =
14 #include "__strerror.h"
17 char *__strerror_l(int e, locale_t loc)
21 /* mips has one error code outside of the 8-bit range due to a
22 * historical typo, so we just remap it. */
25 else if (e==EDQUOT) e=109;
27 for (i=0; errid[i] && errid[i] != e; i++);
28 for (s=errmsg; i; s++, i--) for (; *s; s++);
29 return (char *)LCTRANS(s, LC_MESSAGES, loc);
34 return __strerror_l(e, CURRENT_LOCALE);
37 weak_alias(__strerror_l, strerror_l);