OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [string/] [strerror.c] - Diff between revs 59 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 59 Rev 1765
/***
/***
**** CAUTION!!! KEEP DOC CONSISTENT---if you change text of a message
**** CAUTION!!! KEEP DOC CONSISTENT---if you change text of a message
****            here, change two places:
****            here, change two places:
****            1) the leading doc section (alphabetized by macro)
****            1) the leading doc section (alphabetized by macro)
****            2) the real text inside switch(errnum)
****            2) the real text inside switch(errnum)
***/
***/
 
 
/*
/*
FUNCTION
FUNCTION
        <<strerror>>---convert error number to string
        <<strerror>>---convert error number to string
 
 
INDEX
INDEX
        strerror
        strerror
 
 
ANSI_SYNOPSIS
ANSI_SYNOPSIS
        #include <string.h>
        #include <string.h>
        char *strerror(int <[errnum]>);
        char *strerror(int <[errnum]>);
 
 
TRAD_SYNOPSIS
TRAD_SYNOPSIS
        #include <string.h>
        #include <string.h>
        char *strerror(<[errnum]>)
        char *strerror(<[errnum]>)
        int <[errnum]>;
        int <[errnum]>;
 
 
DESCRIPTION
DESCRIPTION
<<strerror>> converts the error number <[errnum]> into a
<<strerror>> converts the error number <[errnum]> into a
string.  The value of <[errnum]> is usually a copy of <<errno>>.
string.  The value of <[errnum]> is usually a copy of <<errno>>.
If <<errnum>> is not a known error number, the result points to an
If <<errnum>> is not a known error number, the result points to an
empty string.
empty string.
 
 
This implementation of <<strerror>> prints out the following strings
This implementation of <<strerror>> prints out the following strings
for each of the values defined in `<<errno.h>>':
for each of the values defined in `<<errno.h>>':
 
 
o+
o+
o E2BIG
o E2BIG
Arg list too long
Arg list too long
 
 
o EACCES
o EACCES
Permission denied
Permission denied
 
 
o EADDRINUSE
o EADDRINUSE
Address already in use
Address already in use
 
 
o EADV
o EADV
Advertise error
Advertise error
 
 
o EAFNOSUPPORT
o EAFNOSUPPORT
Address family not supported by protocol family
Address family not supported by protocol family
 
 
o EAGAIN
o EAGAIN
No more processes
No more processes
 
 
o EALREADY
o EALREADY
Socket already connected
Socket already connected
 
 
o EBADF
o EBADF
Bad file number
Bad file number
 
 
o EBADMSG
o EBADMSG
Bad message
Bad message
 
 
o EBUSY
o EBUSY
Device or resource busy
Device or resource busy
 
 
o ECHILD
o ECHILD
No children
No children
 
 
o ECOMM
o ECOMM
Communication error
Communication error
 
 
o ECONNABORTED
o ECONNABORTED
Software caused connection abort
Software caused connection abort
 
 
o ECONNREFUSED
o ECONNREFUSED
Connection refused
Connection refused
 
 
o EDEADLK
o EDEADLK
Deadlock
Deadlock
 
 
o EDESTADDRREQ
o EDESTADDRREQ
Destination address required
Destination address required
 
 
o EEXIST
o EEXIST
File exists
File exists
 
 
o EDOM
o EDOM
Math argument
Math argument
 
 
o EFAULT
o EFAULT
Bad address
Bad address
 
 
o EFBIG
o EFBIG
File too large
File too large
 
 
o EHOSTDOWN
o EHOSTDOWN
Host is down
Host is down
 
 
o EHOSTUNREACH
o EHOSTUNREACH
Host is unreachable
Host is unreachable
 
 
o EIDRM
o EIDRM
Identifier removed
Identifier removed
 
 
o EINPROGRESS
o EINPROGRESS
Connection already in progress
Connection already in progress
 
 
o EINTR
o EINTR
Interrupted system call
Interrupted system call
 
 
o EINVAL
o EINVAL
Invalid argument
Invalid argument
 
 
o EIO
o EIO
I/O error
I/O error
 
 
o EISCONN
o EISCONN
Socket is already connected
Socket is already connected
 
 
o EISDIR
o EISDIR
Is a directory
Is a directory
 
 
o ELIBACC
o ELIBACC
Cannot access a needed shared library
Cannot access a needed shared library
 
 
o ELIBBAD
o ELIBBAD
Accessing a corrupted shared library
Accessing a corrupted shared library
 
 
o ELIBEXEC
o ELIBEXEC
Cannot exec a shared library directly
Cannot exec a shared library directly
 
 
o ELIBMAX
o ELIBMAX
Attempting to link in more shared libraries than system limit
Attempting to link in more shared libraries than system limit
 
 
o ELIBSCN
o ELIBSCN
<<.lib>> section in a.out corrupted
<<.lib>> section in a.out corrupted
 
 
o EMFILE
o EMFILE
Too many open files
Too many open files
 
 
o EMLINK
o EMLINK
Too many links
Too many links
 
 
o EMSGSIZE
o EMSGSIZE
Message too long
Message too long
 
 
o EMULTIHOP
o EMULTIHOP
Multihop attempted
Multihop attempted
 
 
o ENAMETOOLONG
o ENAMETOOLONG
File or path name too long
File or path name too long
 
 
o ENETDOWN
o ENETDOWN
Network interface not configured
Network interface not configured
 
 
o ENETUNREACH
o ENETUNREACH
Network is unreachable
Network is unreachable
 
 
o ENFILE
o ENFILE
Too many open files in system
Too many open files in system
 
 
o ENODEV
o ENODEV
No such device
No such device
 
 
o ENOENT
o ENOENT
No such file or directory
No such file or directory
 
 
o ENOEXEC
o ENOEXEC
Exec format error
Exec format error
 
 
o ENOLCK
o ENOLCK
No lock
No lock
 
 
o ENOLINK
o ENOLINK
Virtual circuit is gone
Virtual circuit is gone
 
 
o ENOMEM
o ENOMEM
Not enough space
Not enough space
 
 
o ENOMSG
o ENOMSG
No message of desired type
No message of desired type
 
 
o ENONET
o ENONET
Machine is not on the network
Machine is not on the network
 
 
o ENOPKG
o ENOPKG
No package
No package
 
 
o ENOPROTOOPT
o ENOPROTOOPT
Protocol not available
Protocol not available
 
 
o ENOSPC
o ENOSPC
No space left on device
No space left on device
 
 
o ENOSR
o ENOSR
No stream resources
No stream resources
 
 
o ENOSTR
o ENOSTR
Not a stream
Not a stream
 
 
o ENOSYS
o ENOSYS
Function not implemented
Function not implemented
 
 
o ENOTBLK
o ENOTBLK
Block device required
Block device required
 
 
o ENOTCONN
o ENOTCONN
Socket is not connected
Socket is not connected
 
 
o ENOTDIR
o ENOTDIR
Not a directory
Not a directory
 
 
o ENOTEMPTY
o ENOTEMPTY
Directory not empty
Directory not empty
 
 
o ENOTSOCK
o ENOTSOCK
Socket operation on non-socket
Socket operation on non-socket
 
 
o ENOTSUP
o ENOTSUP
Not supported
Not supported
 
 
o ENOTTY
o ENOTTY
Not a character device
Not a character device
 
 
o ENXIO
o ENXIO
No such device or address
No such device or address
 
 
o EPERM
o EPERM
Not owner
Not owner
 
 
o EPIPE
o EPIPE
Broken pipe
Broken pipe
 
 
o EPROTO
o EPROTO
Protocol error
Protocol error
 
 
o EPROTOTYPE
o EPROTOTYPE
Protocol wrong type for socket
Protocol wrong type for socket
 
 
o EPROTONOSUPPORT
o EPROTONOSUPPORT
Unknown protocol
Unknown protocol
 
 
o ERANGE
o ERANGE
Result too large
Result too large
 
 
o EREMOTE
o EREMOTE
Resource is remote
Resource is remote
 
 
o EROFS
o EROFS
Read-only file system
Read-only file system
 
 
o ESHUTDOWN
o ESHUTDOWN
Can't send after socket shutdown
Can't send after socket shutdown
 
 
o ESOCKTNOSUPPORT
o ESOCKTNOSUPPORT
Socket type not supported
Socket type not supported
 
 
o ESPIPE
o ESPIPE
Illegal seek
Illegal seek
 
 
o ESRCH
o ESRCH
No such process
No such process
 
 
o ESRMNT
o ESRMNT
Srmount error
Srmount error
 
 
o ETIME
o ETIME
Stream ioctl timeout
Stream ioctl timeout
 
 
o ETIMEDOUT
o ETIMEDOUT
Connection timed out
Connection timed out
 
 
o ETXTBSY
o ETXTBSY
Text file busy
Text file busy
 
 
o EXDEV
o EXDEV
Cross-device link
Cross-device link
 
 
o-
o-
 
 
RETURNS
RETURNS
This function returns a pointer to a string.  Your application must
This function returns a pointer to a string.  Your application must
not modify that string.
not modify that string.
 
 
PORTABILITY
PORTABILITY
ANSI C requires <<strerror>>, but does not specify the strings used
ANSI C requires <<strerror>>, but does not specify the strings used
for each error number.
for each error number.
 
 
Although this implementation of <<strerror>> is reentrant, ANSI C
Although this implementation of <<strerror>> is reentrant, ANSI C
declares that subsequent calls to <<strerror>> may overwrite the
declares that subsequent calls to <<strerror>> may overwrite the
result string; therefore portable code cannot depend on the reentrancy
result string; therefore portable code cannot depend on the reentrancy
of this subroutine.
of this subroutine.
 
 
This implementation of <<strerror>> provides for user-defined
This implementation of <<strerror>> provides for user-defined
extensibility.  <<errno.h>> defines <[__ELASTERROR]>, which can be
extensibility.  <<errno.h>> defines <[__ELASTERROR]>, which can be
used as a base for user-defined error values.  If the user supplies a
used as a base for user-defined error values.  If the user supplies a
routine named <<_user_strerror>>, and <[errnum]> passed to
routine named <<_user_strerror>>, and <[errnum]> passed to
<<strerror>> does not match any of the supported values,
<<strerror>> does not match any of the supported values,
<<_user_strerror>> is called with <[errnum]> as its argument.
<<_user_strerror>> is called with <[errnum]> as its argument.
 
 
<<_user_strerror>> takes one argument of type <[int]>, and returns a
<<_user_strerror>> takes one argument of type <[int]>, and returns a
character pointer.  If <[errnum]> is unknown to <<_user_strerror>>,
character pointer.  If <[errnum]> is unknown to <<_user_strerror>>,
<<_user_strerror>> returns <[NULL]>.  The default <<_user_strerror>>
<<_user_strerror>> returns <[NULL]>.  The default <<_user_strerror>>
returns <[NULL]> for all input values.
returns <[NULL]> for all input values.
 
 
<<strerror>> requires no supporting OS subroutines.
<<strerror>> requires no supporting OS subroutines.
 
 
QUICKREF
QUICKREF
        strerror ansi pure
        strerror ansi pure
*/
*/
 
 
#include <errno.h>
#include <errno.h>
#include <string.h>
#include <string.h>
 
 
char *
char *
_DEFUN (strerror, (errnum),
_DEFUN (strerror, (errnum),
        int errnum)
        int errnum)
{
{
  char *error;
  char *error;
  extern char *_user_strerror _PARAMS ((int));
  extern char *_user_strerror _PARAMS ((int));
 
 
  switch (errnum)
  switch (errnum)
    {
    {
/* go32 defines EPERM as EACCES */
/* go32 defines EPERM as EACCES */
#if defined (EPERM) && (!defined (EACCES) || (EPERM != EACCES))
#if defined (EPERM) && (!defined (EACCES) || (EPERM != EACCES))
    case EPERM:
    case EPERM:
      error = "Not owner";
      error = "Not owner";
      break;
      break;
#endif
#endif
#ifdef ENOENT
#ifdef ENOENT
    case ENOENT:
    case ENOENT:
      error = "No such file or directory";
      error = "No such file or directory";
      break;
      break;
#endif
#endif
#ifdef ESRCH
#ifdef ESRCH
    case ESRCH:
    case ESRCH:
      error = "No such process";
      error = "No such process";
      break;
      break;
#endif
#endif
#ifdef EINTR
#ifdef EINTR
    case EINTR:
    case EINTR:
      error = "Interrupted system call";
      error = "Interrupted system call";
      break;
      break;
#endif
#endif
#ifdef EIO
#ifdef EIO
    case EIO:
    case EIO:
      error = "I/O error";
      error = "I/O error";
      break;
      break;
#endif
#endif
/* go32 defines ENXIO as ENODEV */
/* go32 defines ENXIO as ENODEV */
#if defined (ENXIO) && (!defined (ENODEV) || (ENXIO != ENODEV))
#if defined (ENXIO) && (!defined (ENODEV) || (ENXIO != ENODEV))
    case ENXIO:
    case ENXIO:
      error = "No such device or address";
      error = "No such device or address";
      break;
      break;
#endif
#endif
#ifdef E2BIG
#ifdef E2BIG
    case E2BIG:
    case E2BIG:
      error = "Arg list too long";
      error = "Arg list too long";
      break;
      break;
#endif
#endif
#ifdef ENOEXEC
#ifdef ENOEXEC
    case ENOEXEC:
    case ENOEXEC:
      error = "Exec format error";
      error = "Exec format error";
      break;
      break;
#endif
#endif
#ifdef EALREADY
#ifdef EALREADY
    case EALREADY:
    case EALREADY:
      error = "Socket already connected";
      error = "Socket already connected";
      break;
      break;
#endif
#endif
#ifdef EBADF
#ifdef EBADF
    case EBADF:
    case EBADF:
      error = "Bad file number";
      error = "Bad file number";
      break;
      break;
#endif
#endif
#ifdef ECHILD
#ifdef ECHILD
    case ECHILD:
    case ECHILD:
      error = "No children";
      error = "No children";
      break;
      break;
#endif
#endif
#ifdef EDESTADDRREQ
#ifdef EDESTADDRREQ
    case EDESTADDRREQ:
    case EDESTADDRREQ:
      error = "Destination address required";
      error = "Destination address required";
      break;
      break;
#endif
#endif
#ifdef EAGAIN
#ifdef EAGAIN
    case EAGAIN:
    case EAGAIN:
      error = "No more processes";
      error = "No more processes";
      break;
      break;
#endif
#endif
#ifdef ENOMEM
#ifdef ENOMEM
    case ENOMEM:
    case ENOMEM:
      error = "Not enough space";
      error = "Not enough space";
      break;
      break;
#endif
#endif
#ifdef EACCES
#ifdef EACCES
    case EACCES:
    case EACCES:
      error = "Permission denied";
      error = "Permission denied";
      break;
      break;
#endif
#endif
#ifdef EFAULT
#ifdef EFAULT
    case EFAULT:
    case EFAULT:
      error = "Bad address";
      error = "Bad address";
      break;
      break;
#endif
#endif
#ifdef ENOTBLK
#ifdef ENOTBLK
    case ENOTBLK:
    case ENOTBLK:
      error = "Block device required";
      error = "Block device required";
      break;
      break;
#endif
#endif
#ifdef EBUSY
#ifdef EBUSY
    case EBUSY:
    case EBUSY:
      error = "Device or resource busy";
      error = "Device or resource busy";
      break;
      break;
#endif
#endif
#ifdef EEXIST
#ifdef EEXIST
    case EEXIST:
    case EEXIST:
      error = "File exists";
      error = "File exists";
      break;
      break;
#endif
#endif
#ifdef EXDEV
#ifdef EXDEV
    case EXDEV:
    case EXDEV:
      error = "Cross-device link";
      error = "Cross-device link";
      break;
      break;
#endif
#endif
#ifdef ENODEV
#ifdef ENODEV
    case ENODEV:
    case ENODEV:
      error = "No such device";
      error = "No such device";
      break;
      break;
#endif
#endif
#ifdef ENOTDIR
#ifdef ENOTDIR
    case ENOTDIR:
    case ENOTDIR:
      error = "Not a directory";
      error = "Not a directory";
      break;
      break;
#endif
#endif
#ifdef EHOSTDOWN
#ifdef EHOSTDOWN
    case EHOSTDOWN:
    case EHOSTDOWN:
      error = "Host is down";
      error = "Host is down";
      break;
      break;
#endif
#endif
#ifdef EINPROGRESS 
#ifdef EINPROGRESS 
    case EINPROGRESS:
    case EINPROGRESS:
      error = "Connection already in progress";
      error = "Connection already in progress";
      break;
      break;
#endif
#endif
#ifdef EISDIR
#ifdef EISDIR
    case EISDIR:
    case EISDIR:
      error = "Is a directory";
      error = "Is a directory";
      break;
      break;
#endif
#endif
#ifdef EINVAL
#ifdef EINVAL
    case EINVAL:
    case EINVAL:
      error = "Invalid argument";
      error = "Invalid argument";
      break;
      break;
#endif
#endif
#ifdef ENETDOWN
#ifdef ENETDOWN
    case ENETDOWN:
    case ENETDOWN:
      error = "Network interface is not configured";
      error = "Network interface is not configured";
      break;
      break;
#endif
#endif
#ifdef ENFILE
#ifdef ENFILE
    case ENFILE:
    case ENFILE:
      error = "Too many open files in system";
      error = "Too many open files in system";
      break;
      break;
#endif
#endif
#ifdef EMFILE
#ifdef EMFILE
    case EMFILE:
    case EMFILE:
      error = "Too many open files";
      error = "Too many open files";
      break;
      break;
#endif
#endif
#ifdef ENOTTY
#ifdef ENOTTY
    case ENOTTY:
    case ENOTTY:
      error = "Not a character device";
      error = "Not a character device";
      break;
      break;
#endif
#endif
#ifdef ETXTBSY
#ifdef ETXTBSY
    case ETXTBSY:
    case ETXTBSY:
      error = "Text file busy";
      error = "Text file busy";
      break;
      break;
#endif
#endif
#ifdef EFBIG
#ifdef EFBIG
    case EFBIG:
    case EFBIG:
      error = "File too large";
      error = "File too large";
      break;
      break;
#endif
#endif
#ifdef EHOSTUNREACH
#ifdef EHOSTUNREACH
    case EHOSTUNREACH:
    case EHOSTUNREACH:
      error = "Host is unreachable";
      error = "Host is unreachable";
      break;
      break;
#endif
#endif
#ifdef ENOSPC
#ifdef ENOSPC
    case ENOSPC:
    case ENOSPC:
      error = "No space left on device";
      error = "No space left on device";
      break;
      break;
#endif
#endif
#ifdef ENOTSUP
#ifdef ENOTSUP
    case ENOTSUP:
    case ENOTSUP:
      error = "Not supported";
      error = "Not supported";
      break;
      break;
#endif
#endif
#ifdef ESPIPE
#ifdef ESPIPE
    case ESPIPE:
    case ESPIPE:
      error = "Illegal seek";
      error = "Illegal seek";
      break;
      break;
#endif
#endif
#ifdef EROFS
#ifdef EROFS
    case EROFS:
    case EROFS:
      error = "Read-only file system";
      error = "Read-only file system";
      break;
      break;
#endif
#endif
#ifdef EMLINK
#ifdef EMLINK
    case EMLINK:
    case EMLINK:
      error = "Too many links";
      error = "Too many links";
      break;
      break;
#endif
#endif
#ifdef EPIPE
#ifdef EPIPE
    case EPIPE:
    case EPIPE:
      error = "Broken pipe";
      error = "Broken pipe";
      break;
      break;
#endif
#endif
#ifdef EDOM
#ifdef EDOM
    case EDOM:
    case EDOM:
      error = "Math argument";
      error = "Math argument";
      break;
      break;
#endif
#endif
#ifdef ERANGE
#ifdef ERANGE
    case ERANGE:
    case ERANGE:
      error = "Result too large";
      error = "Result too large";
      break;
      break;
#endif
#endif
#ifdef ENOMSG
#ifdef ENOMSG
    case ENOMSG:
    case ENOMSG:
      error = "No message of desired type";
      error = "No message of desired type";
      break;
      break;
#endif
#endif
#ifdef EIDRM
#ifdef EIDRM
    case EIDRM:
    case EIDRM:
      error = "Identifier removed";
      error = "Identifier removed";
      break;
      break;
#endif
#endif
#ifdef EDEADLK
#ifdef EDEADLK
    case EDEADLK:
    case EDEADLK:
      error = "Deadlock";
      error = "Deadlock";
      break;
      break;
#endif
#endif
#ifdef ENETUNREACH 
#ifdef ENETUNREACH 
    case  ENETUNREACH:
    case  ENETUNREACH:
      error = "Network is unreachable";
      error = "Network is unreachable";
      break;
      break;
#endif
#endif
#ifdef ENOLCK
#ifdef ENOLCK
    case ENOLCK:
    case ENOLCK:
      error = "No lock";
      error = "No lock";
      break;
      break;
#endif
#endif
#ifdef ENOSTR
#ifdef ENOSTR
    case ENOSTR:
    case ENOSTR:
      error = "Not a stream";
      error = "Not a stream";
      break;
      break;
#endif
#endif
#ifdef ETIME
#ifdef ETIME
    case ETIME:
    case ETIME:
      error = "Stream ioctl timeout";
      error = "Stream ioctl timeout";
      break;
      break;
#endif
#endif
#ifdef ENOSR
#ifdef ENOSR
    case ENOSR:
    case ENOSR:
      error = "No stream resources";
      error = "No stream resources";
      break;
      break;
#endif
#endif
#ifdef ENONET
#ifdef ENONET
    case ENONET:
    case ENONET:
      error = "Machine is not on the network";
      error = "Machine is not on the network";
      break;
      break;
#endif
#endif
#ifdef ENOPKG
#ifdef ENOPKG
    case ENOPKG:
    case ENOPKG:
      error = "No package";
      error = "No package";
      break;
      break;
#endif
#endif
#ifdef EREMOTE
#ifdef EREMOTE
    case EREMOTE:
    case EREMOTE:
      error = "Resource is remote";
      error = "Resource is remote";
      break;
      break;
#endif
#endif
#ifdef ENOLINK
#ifdef ENOLINK
    case ENOLINK:
    case ENOLINK:
      error = "Virtual circuit is gone";
      error = "Virtual circuit is gone";
      break;
      break;
#endif
#endif
#ifdef EADV
#ifdef EADV
    case EADV:
    case EADV:
      error = "Advertise error";
      error = "Advertise error";
      break;
      break;
#endif
#endif
#ifdef ESRMNT
#ifdef ESRMNT
    case ESRMNT:
    case ESRMNT:
      error = "Srmount error";
      error = "Srmount error";
      break;
      break;
#endif
#endif
#ifdef ECOMM
#ifdef ECOMM
    case ECOMM:
    case ECOMM:
      error = "Communication error";
      error = "Communication error";
      break;
      break;
#endif
#endif
#ifdef EPROTO
#ifdef EPROTO
    case EPROTO:
    case EPROTO:
      error = "Protocol error";
      error = "Protocol error";
      break;
      break;
#endif
#endif
#ifdef EPROTONOSUPPORT
#ifdef EPROTONOSUPPORT
    case EPROTONOSUPPORT:
    case EPROTONOSUPPORT:
      error = "Unknown protocol";
      error = "Unknown protocol";
      break;
      break;
#endif
#endif
#ifdef EMULTIHOP
#ifdef EMULTIHOP
    case EMULTIHOP:
    case EMULTIHOP:
      error = "Multihop attempted";
      error = "Multihop attempted";
      break;
      break;
#endif
#endif
#ifdef EBADMSG
#ifdef EBADMSG
    case EBADMSG:
    case EBADMSG:
      error = "Bad message";
      error = "Bad message";
      break;
      break;
#endif
#endif
#ifdef ELIBACC
#ifdef ELIBACC
    case ELIBACC:
    case ELIBACC:
      error = "Cannot access a needed shared library";
      error = "Cannot access a needed shared library";
      break;
      break;
#endif
#endif
#ifdef ELIBBAD
#ifdef ELIBBAD
    case ELIBBAD:
    case ELIBBAD:
      error = "Accessing a corrupted shared library";
      error = "Accessing a corrupted shared library";
      break;
      break;
#endif
#endif
#ifdef ELIBSCN
#ifdef ELIBSCN
    case ELIBSCN:
    case ELIBSCN:
      error = ".lib section in a.out corrupted";
      error = ".lib section in a.out corrupted";
      break;
      break;
#endif
#endif
#ifdef ELIBMAX
#ifdef ELIBMAX
    case ELIBMAX:
    case ELIBMAX:
      error = "Attempting to link in more shared libraries than system limit";
      error = "Attempting to link in more shared libraries than system limit";
      break;
      break;
#endif
#endif
#ifdef ELIBEXEC
#ifdef ELIBEXEC
    case ELIBEXEC:
    case ELIBEXEC:
      error = "Cannot exec a shared library directly";
      error = "Cannot exec a shared library directly";
      break;
      break;
#endif
#endif
#ifdef ENOSYS
#ifdef ENOSYS
    case ENOSYS:
    case ENOSYS:
      error = "Function not implemented";
      error = "Function not implemented";
      break;
      break;
#endif
#endif
#ifdef ENMFILE
#ifdef ENMFILE
    case ENMFILE:
    case ENMFILE:
      error = "No more files";
      error = "No more files";
      break;
      break;
#endif
#endif
#ifdef ENOTEMPTY
#ifdef ENOTEMPTY
    case ENOTEMPTY:
    case ENOTEMPTY:
      error = "Directory not empty";
      error = "Directory not empty";
      break;
      break;
#endif
#endif
#ifdef ENAMETOOLONG
#ifdef ENAMETOOLONG
    case ENAMETOOLONG:
    case ENAMETOOLONG:
      error = "File or path name too long";
      error = "File or path name too long";
      break;
      break;
#endif
#endif
#ifdef ELOOP
#ifdef ELOOP
    case ELOOP:
    case ELOOP:
      error = "Too many symbolic links";
      error = "Too many symbolic links";
      break;
      break;
#endif
#endif
#ifdef ENOBUFS
#ifdef ENOBUFS
    case ENOBUFS:
    case ENOBUFS:
      error = "No buffer space available";
      error = "No buffer space available";
      break;
      break;
#endif
#endif
#ifdef EAFNOSUPPORT
#ifdef EAFNOSUPPORT
    case EAFNOSUPPORT:
    case EAFNOSUPPORT:
      error = "Address family not supported by protocol family";
      error = "Address family not supported by protocol family";
      break;
      break;
#endif
#endif
#ifdef EPROTOTYPE
#ifdef EPROTOTYPE
    case EPROTOTYPE:
    case EPROTOTYPE:
      error = "Protocol wrong type for socket";
      error = "Protocol wrong type for socket";
      break;
      break;
#endif
#endif
#ifdef ENOTSOCK
#ifdef ENOTSOCK
    case ENOTSOCK:
    case ENOTSOCK:
      error = "Socket operation on non-socket";
      error = "Socket operation on non-socket";
      break;
      break;
#endif
#endif
#ifdef ENOPROTOOPT
#ifdef ENOPROTOOPT
    case ENOPROTOOPT:
    case ENOPROTOOPT:
      error = "Protocol not available";
      error = "Protocol not available";
      break;
      break;
#endif
#endif
#ifdef ESHUTDOWN
#ifdef ESHUTDOWN
    case ESHUTDOWN:
    case ESHUTDOWN:
      error = "Can't send after socket shutdown";
      error = "Can't send after socket shutdown";
      break;
      break;
#endif
#endif
#ifdef ECONNREFUSED
#ifdef ECONNREFUSED
    case ECONNREFUSED:
    case ECONNREFUSED:
      error = "Connection refused";
      error = "Connection refused";
      break;
      break;
#endif
#endif
#ifdef EADDRINUSE
#ifdef EADDRINUSE
    case EADDRINUSE:
    case EADDRINUSE:
      error = "Address already in use";
      error = "Address already in use";
      break;
      break;
#endif
#endif
#ifdef ECONNABORTED
#ifdef ECONNABORTED
    case ECONNABORTED:
    case ECONNABORTED:
      error = "Software caused connection abort";
      error = "Software caused connection abort";
      break;
      break;
#endif
#endif
#if (defined(EWOULDBLOCK) && (!defined (EAGAIN) || (EWOULDBLOCK != EAGAIN)))
#if (defined(EWOULDBLOCK) && (!defined (EAGAIN) || (EWOULDBLOCK != EAGAIN)))
    case EWOULDBLOCK:
    case EWOULDBLOCK:
        error = "Operation would block";
        error = "Operation would block";
        break;
        break;
#endif
#endif
#ifdef ENOTCONN
#ifdef ENOTCONN
    case ENOTCONN:
    case ENOTCONN:
        error = "Socket is not connected";
        error = "Socket is not connected";
        break;
        break;
#endif
#endif
#ifdef ESOCKTNOSUPPORT
#ifdef ESOCKTNOSUPPORT
    case ESOCKTNOSUPPORT:
    case ESOCKTNOSUPPORT:
        error = "Socket type not supported";
        error = "Socket type not supported";
        break;
        break;
#endif
#endif
#ifdef EISCONN
#ifdef EISCONN
    case EISCONN:
    case EISCONN:
        error = "Socket is already connected";
        error = "Socket is already connected";
        break;
        break;
#endif
#endif
#ifdef EOPNOTSUPP
#ifdef EOPNOTSUPP
    case EOPNOTSUPP:
    case EOPNOTSUPP:
        error = "Operation not supported on socket";
        error = "Operation not supported on socket";
        break;
        break;
#endif
#endif
#ifdef EMSGSIZE
#ifdef EMSGSIZE
    case EMSGSIZE:
    case EMSGSIZE:
        error = "Message too long";
        error = "Message too long";
        break;
        break;
#endif
#endif
#ifdef ETIMEDOUT
#ifdef ETIMEDOUT
    case ETIMEDOUT:
    case ETIMEDOUT:
        error = "Connection timed out";
        error = "Connection timed out";
        break;
        break;
#endif
#endif
    default:
    default:
      if ((error = _user_strerror (errnum)) == 0)
      if ((error = _user_strerror (errnum)) == 0)
        error = "";
        error = "";
      break;
      break;
    }
    }
 
 
  return error;
  return error;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.