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