diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-01-18 12:16:01 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-01-18 12:16:01 +0000 |
commit | 8deadda0884724ab5f7f2cdf6c6f00d1be4ee7db (patch) | |
tree | 7b914317f37c411be29d1e42f96cc4b21ea3d616 /libc/string/__xpg_strerror_r.c | |
parent | 6d8560297be954e2ff73c9545300ae1b477b7433 (diff) |
check for signal existence rather than using arch defines
Diffstat (limited to 'libc/string/__xpg_strerror_r.c')
-rw-r--r-- | libc/string/__xpg_strerror_r.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libc/string/__xpg_strerror_r.c b/libc/string/__xpg_strerror_r.c index 6059cbcbd..6536995e6 100644 --- a/libc/string/__xpg_strerror_r.c +++ b/libc/string/__xpg_strerror_r.c @@ -145,14 +145,14 @@ static const unsigned char estridx[] = { ENAVAIL, EISNAM, EREMOTEIO, -#ifdef __mips__ - 0, /* mips has an outrageous value for this... */ +#if EDQUOT > 200 /* mips has an outrageous value for this... */ + 0, #else EDQUOT, #endif ENOMEDIUM, EMEDIUMTYPE, -#if defined(__mips__) || defined(__sparc__) +#if EDEADLOCK != EDEADLK EDEADLOCK, #endif }; @@ -181,11 +181,10 @@ int __xpg_strerror_r(int errnum, char *strerrbuf, size_t buflen) } } i = INT_MAX; /* Failed, but may need to check mips special case. */ -#ifdef __mips__ - if (errnum == EDQUOT) { /* Deal with large EDQUOT value on mips */ +#if EDQUOT > 200 /* Deal with large EDQUOT value on mips */ + if (errnum == EDQUOT) i = 122; - } -#endif /* __mips__ */ +#endif GOT_ESTRIDX: #else /* No errno to string index translation needed. */ |