X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2F_PDCLIB%2F_PDCLIB_seek.c;h=8c600f6790f969e2b5a4d4356b5d780691b6cc09;hp=cafcee8ddc2cfd64db234c335ca00e9754667321;hb=da0d02da53b8a309d85ae19e6b9e5ff1cde9c4a5;hpb=bdd913fd4a86f506a7fc42a04363c75fcb0ab093 diff --git a/platform/example/functions/_PDCLIB/_PDCLIB_seek.c b/platform/example/functions/_PDCLIB/_PDCLIB_seek.c index cafcee8..8c600f6 100644 --- a/platform/example/functions/_PDCLIB/_PDCLIB_seek.c +++ b/platform/example/functions/_PDCLIB/_PDCLIB_seek.c @@ -13,6 +13,7 @@ #include "/usr/include/errno.h" extern _PDCLIB_int64_t lseek64( int fd, _PDCLIB_int64_t offset, int whence ); +extern long lseek( int fd, long offset, int whence ); _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t offset, int whence ) { @@ -31,7 +32,11 @@ _PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t of return EOF; break; } +#ifdef __CYGWIN__ + _PDCLIB_int64_t rc = lseek( stream->handle, offset, whence ); +#else _PDCLIB_int64_t rc = lseek64( stream->handle, offset, whence ); +#endif if ( rc != EOF ) { stream->ungetidx = 0;