X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=platform%2Fexample_cygwin%2Ffunctions%2F_PDCLIB%2Fopen.c;h=4e7d2b979369b6d000d946907efe3f9bf862a53a;hp=88af3c4e86d2dfef69d9ca97025253c9e6a69c4e;hb=8cfc7f73e7baec32630b9cf55582febd41b8a684;hpb=37a19e428fd1e1b348e332fdc8ee759d13ebe88b diff --git a/platform/example_cygwin/functions/_PDCLIB/open.c b/platform/example_cygwin/functions/_PDCLIB/open.c index 88af3c4..4e7d2b9 100644 --- a/platform/example_cygwin/functions/_PDCLIB/open.c +++ b/platform/example_cygwin/functions/_PDCLIB/open.c @@ -66,6 +66,9 @@ int _PDCLIB_open( char const * const filename, unsigned int mode ) { switch ( errno ) { + /* See the comments on implementation-defined errno values in + <_PDCLIB_config.h>. + */ case EACCES: case EFAULT: case EINTR: @@ -82,9 +85,12 @@ int _PDCLIB_open( char const * const filename, unsigned int mode ) case EOVERFLOW: case EROFS: case ETXTBSY: - _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 rc;