- Made pciuhci.device and pciehci.device compile again: completed
[AROS.git] / compiler / clib / strerror_rom.c
blobdee51238454213a0689165f6ec24f2a7fe84f29c
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function strerror().
6 */
8 #include <proto/dos.h>
9 #include <errno.h>
10 #include <stdio.h>
12 extern const char * _errstrings[];
14 /*****************************************************************************
16 NAME */
17 #include <string.h>
19 char * strerror (
21 /* SYNOPSIS */
22 int n)
24 /* FUNCTION
25 Returns a readable string for an error number in errno.
27 INPUTS
28 n - The contents of errno or a #define from errno.h
30 RESULT
31 A string describing the error.
33 NOTES
35 EXAMPLE
37 BUGS
39 SEE ALSO
41 INTERNALS
43 ******************************************************************************/
45 if (n > ELAST)
46 return "Errno out of range";
48 return (char *)_errstrings[n];
49 } /* strerror */