X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2F_PDCLIB%2Ffillbuffer.c;h=1d450259e55ee8721b3a92b0172ec8a77cd20869;hb=2af7521205cfba3d516f32a5a666d267dce5898d;hp=8da93ad345fb8a1ff0963eb28cb95d06f81ff1b4;hpb=50c9c6af3784c1fce7a82c50df1e7ef8f9b57bd4;p=pdclib diff --git a/platform/example/functions/_PDCLIB/fillbuffer.c b/platform/example/functions/_PDCLIB/fillbuffer.c index 8da93ad..1d45025 100644 --- a/platform/example/functions/_PDCLIB/fillbuffer.c +++ b/platform/example/functions/_PDCLIB/fillbuffer.c @@ -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 be something like EUNKNOWN. */ + _PDCLIB_errno = _PDCLIB_ERROR; break; } stream->status |= _PDCLIB_ERRORFLAG;