]> pd.if.org Git - pdclib.old/blobdiff - platform/example/functions/_PDCLIB/fillbuffer.c
Addressed ticket #40 (non-standard errno values).
[pdclib.old] / platform / example / functions / _PDCLIB / fillbuffer.c
index 8da93ad345fb8a1ff0963eb28cb95d06f81ff1b4..a5520a34f43b0bc770862568a88d2ba37b5547df 100644 (file)
@@ -41,15 +41,19 @@ int _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream )
         /* Reading error */
         switch ( errno )
         {
+            /* See comments on implementation-defined errno values in
+               <_PDCLIB_config.h>.
+            */
             case EBADF:
             case EFAULT:
             case EINTR:
             case EINVAL:
             case EIO:
-                _PDCLIB_errno = _PDCLIB_EIO;
+                _PDCLIB_errno = _PDCLIB_ERROR;
                 break;
             default:
-                _PDCLIB_errno = _PDCLIB_EUNKNOWN;
+                /* This should probably be something like EUNKNOWN. */
+                _PDCLIB_errno = _PDCLIB_ERROR;
                 break;
         }
         stream->status |= _PDCLIB_ERRORFLAG;