Mercurial > ecos-v2_0-branch
diff packages/error/current/src/strerror.cxx @ 115:6ed91473a1cd ecos-sw-2000-08-21
Merge from eCos master repository on 2000-08-21-22:40:54-BST
| author | jlarmour |
|---|---|
| date | Fri, 25 Aug 2000 17:32:38 +0000 |
| parents | 435cced73e2f |
| children | e0c0827131d1 |
line wrap: on
line diff
--- a/packages/error/current/src/strerror.cxx +++ b/packages/error/current/src/strerror.cxx @@ -31,12 +31,12 @@ //=========================================================================== //#####DESCRIPTIONBEGIN#### // -// Author(s): jlarmour -// Contributors: jlarmour -// Date: 1998-06-11 -// Purpose: To provide the strerror() implementation -// Description: This implements strerror() as described in ANSI chap 7.11.6.2 -// Usage: See <cyg/error/codes.h> +// Author(s): jlarmour +// Contributors: +// Date: 2000-04-14 +// Purpose: To provide the strerror() implementation +// Description: This implements strerror() as described in ANSI chap 7.11.6.2 +// Usage: See <cyg/error/codes.h> // //####DESCRIPTIONEND#### // @@ -47,9 +47,6 @@ #include <pkgconf/error.h> // Configuration header -// Include the C library? -#ifdef CYGPKG_ERROR - // INCLUDES #include <cyg/infra/cyg_type.h> // Common project-wide type definitions @@ -60,16 +57,16 @@ // EXPORTED SYMBOLS externC char * -strerror( int errnum ) __attribute__ ((weak, alias("_strerror") )); +strerror( int errnum ) __attribute__ ((weak, alias("__strerror") )); // FUNCTIONS externC char * -_strerror( int errnum ) +__strerror( int errnum ) { register char *s; - CYG_REPORT_FUNCNAMETYPE( "_strerror", "String form of error is \"%s\"" ); + CYG_REPORT_FUNCNAMETYPE( "__strerror", "String form of error is \"%s\"" ); switch (errnum) { @@ -140,18 +137,60 @@ externC char * break; #endif +#ifdef ENOTDIR + case ENOTDIR: + s = "Not a directory"; + break; +#endif + +#ifdef EISDIR + case EISDIR: + s = "Is a directory"; + break; +#endif + #ifdef EINVAL case EINVAL: s = "Invalid argument"; break; #endif +#ifdef ENFILE + case ENFILE: + s = "Too many open files in system"; + break; +#endif + #ifdef EMFILE case EMFILE: s = "Too many open files"; break; #endif +#ifdef EFBIG + case EFBIG: + s = "File too large"; + break; +#endif + +#ifdef ENOSPC + case ENOSPC: + s = "No space left on device"; + break; +#endif + +#ifdef ESPIPE + case ESPIPE: + s = "Illegal seek"; + break; +#endif + +#ifdef EROFS + case EROFS: + s = "Read-only file system"; + break; +#endif + #ifdef EDOM case EDOM: s = "Argument to math function outside valid domain"; @@ -164,12 +203,30 @@ externC char * break; #endif +#ifdef EDEADLK + case EDEADLK: + s = "Resource deadlock would occur"; + break; +#endif + #ifdef ENOSYS case ENOSYS: s = "Function not implemented"; break; #endif +#ifdef ENAMETOOLONG + case ENAMETOOLONG: + s = "File name too long"; + break; +#endif + +#ifdef ENOTSUP + case ENOTSUP: + s = "Not supported"; + break; +#endif + #ifdef EEOF case EEOF: s = "End of file reached"; @@ -188,6 +245,12 @@ externC char * break; #endif +#ifdef EXDEV + case EXDEV: + s = "Improper link"; + break; +#endif + // Additional errors used by networking #ifdef ENXIO case ENXIO: @@ -364,8 +427,6 @@ externC char * CYG_REPORT_RETVAL(s); return s; -} // _strerror() - -#endif // ifdef CYGPKG_ERROR +} // __strerror() // EOF strerror.cxx
