X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample_cygwin%2Ffunctions%2F_PDCLIB%2Frename.c;h=db38afdfc91898a8fbf445c08403ea1248f8b07c;hb=e4a50ae15f5ea7e9e10cb8dfba8e5c1824abe4d3;hp=e8e7cb179bfe36da140eed3ce3c3336195dea958;hpb=fa385ff36986ad3167e9cd9f74724d53c42ed3e4;p=pdclib.old diff --git a/platform/example_cygwin/functions/_PDCLIB/rename.c b/platform/example_cygwin/functions/_PDCLIB/rename.c index e8e7cb1..db38afd 100644 --- a/platform/example_cygwin/functions/_PDCLIB/rename.c +++ b/platform/example_cygwin/functions/_PDCLIB/rename.c @@ -29,6 +29,9 @@ int _PDCLIB_rename( const char * old, const char * new ) { switch ( errno ) { + /* See the comments on implementation-defined errno values in + <_PDCLIB_config.h>. + */ case EACCES: case EFAULT: case EIO: @@ -40,10 +43,11 @@ int _PDCLIB_rename( const char * old, const char * new ) case ENOTDIR: case EPERM: case EROFS: - _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 -1; @@ -57,6 +61,9 @@ int _PDCLIB_rename( const char * old, const char * new ) { switch ( errno ) { + /* See the comments on implementation-defined errno values in + <_PDCLIB_config.h>. + */ case EACCES: case EEXIST: case EFAULT: @@ -71,10 +78,11 @@ int _PDCLIB_rename( const char * old, const char * new ) case EPERM: case EROFS: case EXDEV: - _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;