]> pd.if.org Git - pdclib/blobdiff - platform/example/functions/_PDCLIB/rename.c
Addressed ticket #40 (non-standard errno values).
[pdclib] / platform / example / functions / _PDCLIB / rename.c
index f314e4c5186cdba5b8e635f6ee3a915900c95c0e..a37eeb3464ed74a22d30a4ee4fbd7280479b1a8c 100644 (file)
@@ -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;