X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample_cygwin%2Ffunctions%2F_PDCLIB%2Fseek.c;h=77b74792e3823603fe46874b8d0176c4570ceb38;hb=56bacb39160e13397fde32a36329461f3ae56ec1;hp=ee21f5695d6b82ec9cb8c8dbfb8ac197500dd8fc;hpb=0c316ee3b4dc0712797877f5dc0f4a789646154d;p=pdclib diff --git a/platform/example_cygwin/functions/_PDCLIB/seek.c b/platform/example_cygwin/functions/_PDCLIB/seek.c index ee21f56..77b7479 100644 --- a/platform/example_cygwin/functions/_PDCLIB/seek.c +++ b/platform/example_cygwin/functions/_PDCLIB/seek.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /* int64_t _PDCLIB_seek( FILE *, int64_t, int ) This file is part of the Public Domain C Library (PDCLib). @@ -8,10 +6,7 @@ #include -#ifndef _PDCLIB_GLUE_H -#define _PDCLIB_GLUE_H #include <_PDCLIB_glue.h> -#endif #include "/usr/include/errno.h" @@ -27,7 +22,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 +37,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 +55,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;