2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5 C99 function strerror().
8 #include "__arosc_privdata.h"
10 #include <proto/dos.h>
11 #include <clib/macros.h>
15 extern const char * _errstrings
[];
17 /*****************************************************************************
28 Returns a readable string for an error number in errno.
31 n - The contents of errno or a #define from errno.h
34 A string describing the error.
46 ******************************************************************************/
50 struct aroscbase
*aroscbase
= __aros_getbase_aroscbase();
52 Fault(n
- MAX_ERRNO
, NULL
, aroscbase
->acb_fault_buf
, sizeof(aroscbase
->acb_fault_buf
));
54 return aroscbase
->acb_fault_buf
;
60 s
= (char *)_errstrings
[MIN(n
, ELAST
+1)];
63 s
= (char *)"Errno out of range";