source: trunk/sys/dietlibc/strerror.c @ 361

Last change on this file since 361 was 1, checked in by alain, 8 years ago

First import

File size: 484 bytes
Line 
1#include "dietfeatures.h"
2#include <unistd.h>
3#include <string.h>
4
5#define _BSD_SOURCE
6#undef __attribute_dontuse__
7#define __attribute_dontuse__
8#include <errno.h>
9
10extern const char __sys_err_unknown[];
11
12char*strerror(int errnum) {
13  register const char*message=__sys_err_unknown;
14
15  if ( (unsigned int)errnum < (unsigned int)__SYS_NERR )
16    message=sys_errlist[errnum];
17#if defined(__mips__)
18  if ( errnum == 1133 )
19    message="Quota exceeded";
20#endif
21  return (char*)message;
22}
Note: See TracBrowser for help on using the repository browser.