X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample_cygwin%2Ffunctions%2F_PDCLIB%2Fopen.c;h=24ce1c8f1cb88e6889d20ebbf348025cd0fe5dff;hb=56bacb39160e13397fde32a36329461f3ae56ec1;hp=88af3c4e86d2dfef69d9ca97025253c9e6a69c4e;hpb=0326491c5ed243ea6efc5e66e3a6ea21427aad92;p=pdclib diff --git a/platform/example_cygwin/functions/_PDCLIB/open.c b/platform/example_cygwin/functions/_PDCLIB/open.c index 88af3c4..24ce1c8 100644 --- a/platform/example_cygwin/functions/_PDCLIB/open.c +++ b/platform/example_cygwin/functions/_PDCLIB/open.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /* _PDCLIB_open( char const * const, int ) This file is part of the Public Domain C Library (PDCLib). @@ -66,6 +64,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 +83,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;