X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample_cygwin%2Ffunctions%2F_PDCLIB%2Fseek.c;h=c1094f346554fca88b02eb52e305b3c5192aa915;hb=e4a50ae15f5ea7e9e10cb8dfba8e5c1824abe4d3;hp=ee21f5695d6b82ec9cb8c8dbfb8ac197500dd8fc;hpb=8fca29703edff11c81af1e6039bcf115a83b6bbc;p=pdclib.old diff --git a/platform/example_cygwin/functions/_PDCLIB/seek.c b/platform/example_cygwin/functions/_PDCLIB/seek.c index ee21f56..c1094f3 100644 --- a/platform/example_cygwin/functions/_PDCLIB/seek.c +++ b/platform/example_cygwin/functions/_PDCLIB/seek.c @@ -27,7 +27,7 @@ _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t of /* EMPTY - OK */ break; default: - _PDCLIB_errno = _PDCLIB_EINVAL; + _PDCLIB_errno = _PDCLIB_ERROR; return EOF; break; } @@ -42,12 +42,16 @@ _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t of } switch ( errno ) { + /* See comments on implementation-defined errno values in + <_PDCLIB_config.h>. + */ case EBADF: case EFAULT: - _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; } return EOF;