]> pd.if.org Git - pdclib/blobdiff - platform/example_cygwin/functions/_PDCLIB/seek.c
Removed the header include guard 'optimization'.
[pdclib] / platform / example_cygwin / functions / _PDCLIB / seek.c
index ee21f5695d6b82ec9cb8c8dbfb8ac197500dd8fc..ace9439a4067139c1e936892b5717dd0560f4c56 100644 (file)
@@ -8,10 +8,7 @@
 
 #include <stdio.h>
 
-#ifndef _PDCLIB_GLUE_H
-#define _PDCLIB_GLUE_H
 #include <_PDCLIB_glue.h>
-#endif
 
 #include "/usr/include/errno.h"
 
@@ -27,7 +24,7 @@ _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t of
             /* EMPTY - OK */
             break;
         default:
-            _PDCLIB_errno = _PDCLIB_EINVAL;
+            _PDCLIB_errno = _PDCLIB_ERROR;
             return EOF;
             break;
     }
@@ -42,12 +39,16 @@ _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t of
     }
     switch ( errno )
     {
+        /* See comments on implementation-defined errno values in
+           <_PDCLIB_config.h>.
+        */
         case EBADF:
         case EFAULT:
-            _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;
@@ -56,7 +57,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;