This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

errno.h and strerror.c improvements



I have completed merging the RTEMS specific .h files
into the primary include directory.  I am now
breaking apart the RTEMS newlib patch and submitting it
in what I hope are easy to digest pieces.  The first of
these is:


Mon Jan 31 09:36:56 CST 2000  Keith Outwater
<vac4050@cae597.rsc.raytheon.com>+

        * libc/include/sys/errno.h: Added comments on many error
numbers.
        * libc/string/strerror.c: Added some more strings.

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985
Index: newlib/libc/include/sys/errno.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/errno.h,v
retrieving revision 1.4
diff -u -r1.4 errno.h
--- errno.h	2000/08/01 20:51:51	1.4
+++ errno.h	2000/12/01 13:20:16
@@ -107,35 +107,35 @@
 #define EPFNOSUPPORT 96 /* Protocol family not supported */
 #define ECONNRESET 104  /* Connection reset by peer */
 #define ENOBUFS 105	/* No buffer space available */
-#define EAFNOSUPPORT 106
-#define EPROTOTYPE 107
-#define ENOTSOCK 108
-#define ENOPROTOOPT 109
-#define ESHUTDOWN 110
+#define EAFNOSUPPORT 106 /* Address family not supported by protocol family */
+#define EPROTOTYPE 107	/* Protocol wrong type for socket */
+#define ENOTSOCK 108	/* Socket operation on non-socket */
+#define ENOPROTOOPT 109	/* Protocol not available */
+#define ESHUTDOWN 110	/* Can't send after socket shutdown */
 #define ECONNREFUSED 111	/* Connection refused */
 #define EADDRINUSE 112		/* Address already in use */
 #define ECONNABORTED 113	/* Connection aborted */
-#define ENETUNREACH 114
-#define ENETDOWN 115
-#define ETIMEDOUT 116
-#define EHOSTDOWN 117
-#define EHOSTUNREACH 118
-#define EINPROGRESS 119
-#define EALREADY 120
-#define EDESTADDRREQ 121
-#define EMSGSIZE 122
-#define EPROTONOSUPPORT 123
-#define ESOCKTNOSUPPORT 124
-#define EADDRNOTAVAIL 125
+#define ENETUNREACH 114		/* Network is unreachable */
+#define ENETDOWN 115		/* Network interface is not configured */
+#define ETIMEDOUT 116		/* Connection timed out */
+#define EHOSTDOWN 117		/* Host is down */
+#define EHOSTUNREACH 118	/* Host is unreachable */
+#define EINPROGRESS 119		/* Connection already in progress */
+#define EALREADY 120		/* Socket already connected */
+#define EDESTADDRREQ 121	/* Destination address required */
+#define EMSGSIZE 122		/* Message too long */
+#define EPROTONOSUPPORT 123	/* Unknown protocol */
+#define ESOCKTNOSUPPORT 124	/* Socket type not supported */
+#define EADDRNOTAVAIL 125	/* Address not available */
 #define ENETRESET 126
-#define EISCONN 127
-#define ENOTCONN 128
+#define EISCONN 127		/* Socket is already connected */
+#define ENOTCONN 128		/* Socket is not connected */
 #define ETOOMANYREFS 129
 #define EPROCLIM 130
 #define EUSERS 131
 #define EDQUOT 132
 #define ESTALE 133
-#define ENOTSUP 134
+#define ENOTSUP 134		/* Not supported */
 #define ENOMEDIUM 135   /* No medium (in tape drive) */
 #define ENOSHARE 136    /* No such host or network path */
 
Index: newlib/libc/string/strerror.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/strerror.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 strerror.c
--- strerror.c	2000/02/17 19:39:48	1.1.1.1
+++ strerror.c	2000/12/01 13:20:18
@@ -37,12 +37,21 @@
 o EACCES
 Permission denied
 
+o EADDRINUSE
+Address already in use
+
 o EADV
 Advertise error
 
+o EAFNOSUPPORT
+Address family not supported by protocol family
+
 o EAGAIN
 No more processes
 
+o EALREADY
+Socket already connected
+
 o EBADF
 Bad file number
 
@@ -58,9 +67,18 @@
 o ECOMM
 Communication error
 
+o ECONNABORTED
+Software caused connection abort
+
+o ECONNREFUSED
+Connection refused
+
 o EDEADLK
 Deadlock
 
+o EDESTADDRREQ
+Destination address required
+
 o EEXIST
 File exists
 
@@ -73,9 +91,18 @@
 o EFBIG
 File too large
 
+o EHOSTDOWN
+Host is down
+
+o EHOSTUNREACH
+Host is unreachable
+
 o EIDRM
 Identifier removed
 
+o EINPROGRESS
+Connection already in progress
+
 o EINTR
 Interrupted system call
 
@@ -85,6 +112,9 @@
 o EIO
 I/O error
 
+o EISCONN
+Socket is already connected
+
 o EISDIR
 Is a directory
 
@@ -109,12 +139,21 @@
 o EMLINK
 Too many links
 
+o EMSGSIZE
+Message too long
+
 o EMULTIHOP
 Multihop attempted
 
 o ENAMETOOLONG
 File or path name too long
 
+o ENETDOWN
+Network interface not configured
+
+o ENETUNREACH
+Network is unreachable
+
 o ENFILE
 Too many open files in system
 
@@ -145,6 +184,9 @@
 o ENOPKG
 No package
 
+o ENOPROTOOPT
+Protocol not available
+
 o ENOSPC
 No space left on device
 
@@ -160,12 +202,21 @@
 o ENOTBLK
 Block device required
 
+o ENOTCONN
+Socket is not connected
+
 o ENOTDIR
 Not a directory
 
 o ENOTEMPTY
 Directory not empty
 
+o ENOTSOCK
+Socket operation on non-socket
+
+o ENOTSUP
+Not supported
+
 o ENOTTY
 Not a character device
 
@@ -181,6 +232,12 @@
 o EPROTO
 Protocol error
 
+o EPROTOTYPE
+Protocol wrong type for socket
+
+o EPROTONOSUPPORT
+Unknown protocol
+
 o ERANGE
 Result too large
 
@@ -190,6 +247,12 @@
 o EROFS
 Read-only file system
 
+o ESHUTDOWN
+Can't send after socket shutdown
+
+o ESOCKTNOSUPPORT
+Socket type not supported
+
 o ESPIPE
 Illegal seek
 
@@ -202,6 +265,9 @@
 o ETIME
 Stream ioctl timeout
 
+o ETIMEDOUT
+Connection timed out
+
 o ETXTBSY
 Text file busy
 
@@ -295,6 +361,11 @@
       error = "Exec format error";
       break;
 #endif
+#ifdef EALREADY
+    case EALREADY:
+      error = "Socket already connected";
+      break;
+#endif
 #ifdef EBADF
     case EBADF:
       error = "Bad file number";
@@ -305,6 +376,11 @@
       error = "No children";
       break;
 #endif
+#ifdef EDESTADDRREQ
+    case EDESTADDRREQ:
+      error = "Destination address required";
+      break;
+#endif
 #ifdef EAGAIN
     case EAGAIN:
       error = "No more processes";
@@ -355,6 +431,16 @@
       error = "Not a directory";
       break;
 #endif
+#ifdef EHOSTDOWN
+    case EHOSTDOWN:
+      error = "Host is down";
+      break;
+#endif
+#ifdef EINPROGRESS 
+    case EINPROGRESS:
+      error = "Connection already in progress";
+      break;
+#endif
 #ifdef EISDIR
     case EISDIR:
       error = "Is a directory";
@@ -365,6 +451,11 @@
       error = "Invalid argument";
       break;
 #endif
+#ifdef ENETDOWN
+    case ENETDOWN:
+      error = "Network interface is not configured";
+      break;
+#endif
 #ifdef ENFILE
     case ENFILE:
       error = "Too many open files in system";
@@ -390,11 +481,21 @@
       error = "File too large";
       break;
 #endif
+#ifdef EHOSTUNREACH
+    case EHOSTUNREACH:
+      error = "Host is unreachable";
+      break;
+#endif
 #ifdef ENOSPC
     case ENOSPC:
       error = "No space left on device";
       break;
 #endif
+#ifdef ENOTSUP
+    case ENOTSUP:
+      error = "Not supported";
+      break;
+#endif
 #ifdef ESPIPE
     case ESPIPE:
       error = "Illegal seek";
@@ -440,6 +541,11 @@
       error = "Deadlock";
       break;
 #endif
+#ifdef ENETUNREACH 
+    case  ENETUNREACH:
+      error = "Network is unreachable";
+      break;
+#endif
 #ifdef ENOLCK
     case ENOLCK:
       error = "No lock";
@@ -498,6 +604,11 @@
 #ifdef EPROTO
     case EPROTO:
       error = "Protocol error";
+      break;
+#endif
+#ifdef EPROTONOSUPPORT
+    case EPROTONOSUPPORT:
+      error = "Unknown protocol";
       break;
 #endif
 #ifdef EMULTIHOP

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]