]> pd.if.org Git - pdclib/blobdiff - platform/example/functions/_PDCLIB/seek.c
Fixed prototype warnings.
[pdclib] / platform / example / functions / _PDCLIB / seek.c
index 9e2d102fd459a0c71566f69544628e2dbfb13fc8..755abe2cb1eb9393a943356007f9071a69b9f2de 100644 (file)
@@ -27,7 +27,10 @@ _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t of
             /* EMPTY - OK */
             break;
         default:
-            _PDCLIB_errno = _PDCLIB_EINVAL;
+            /* See comments on implementation-defined errno values in
+               <_PDCLIB_config.h>.
+            */
+            _PDCLIB_errno = _PDCLIB_ERROR;
             return EOF;
             break;
     }
@@ -44,10 +47,14 @@ _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t of
     {
         case EBADF:
         case EFAULT:
-            _PDCLIB_errno = _PDCLIB_EIO;
+            /* See comments on implementation-defined errno values in
+               <_PDCLIB_config.h>.
+            */
+            _PDCLIB_errno = _PDCLIB_ERROR;
             break;
         default:
-            _PDCLIB_errno = _PDCLIB_EUNKNOWN;
+            /* This should be something like EUNKNOWN. */
+            _PDCLIB_errno = _PDCLIB_ERROR;
             break;
     }
     return EOF;
@@ -56,7 +63,7 @@ _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t of
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
-int main()
+int main( void )
 {
     /* Testing covered by ftell.c */
     return TEST_RESULTS;