]> pd.if.org Git - pdclib.old/blobdiff - platform/example/functions/stdio/remove.c
Addressed ticket #40 (non-standard errno values).
[pdclib.old] / platform / example / functions / stdio / remove.c
index 8bf3040cf03c9f821f68ecff2325a7c63b4e66af..389df301be224d6945d6b8a250f7e31a82ca7543 100644 (file)
@@ -37,9 +37,8 @@ int remove( const char * pathname )
     {
         switch ( errno )
         {
-            /* These are the values possible on a Linux machine. Adapt the
-               values and their mapping to PDCLib errno values at will. (This
-               is an example implementation, so we keep it very simple.)
+            /* See the comments on implementation-defined errno values in
+               <_PDCLIB_config.h>.
             */
             case EACCES:
             case EFAULT:
@@ -52,10 +51,11 @@ int remove( const char * pathname )
             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;
         }
     }