5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
13 #include <_PDCLIB_locale.h>
15 /* TODO: Doing this via a static array is not the way to do it. */
16 char * strerror( int errnum )
18 if ( errnum == 0 || errnum >= _PDCLIB_ERRNO_MAX )
20 return (char *)"Unknown error";
24 return _PDCLIB_threadlocale()->_ErrnoStr[errnum];
31 #include <_PDCLIB_test.h>
38 TESTCASE( strerror( ERANGE ) != strerror( EDOM ) );