Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Alternative for _lseeki64(...) ??

Hi,
My Windows code uses _lseeki64( int handle, __int64 offset, int origin ) and that fails with 'undefined references' error when porting to Linux. I use the following header:

#ifdef WIN32
#include <io.h>
#else
#include <unistd.h>
#endif

Is there an equivalent alternative under Linux?
Thanks
SimpleTechie.
[376 byte] By [SimpleTechie] at [2007-11-11 10:18:43]
# 1 Re: Alternative for _lseeki64(...) ??
look for lseek64 or _lseek64. It depends mostly on which version of Linux you're using but the latest versions should support 64 bit versions of the stdio functions. btw, you do need to #include <stdio.h>.
Danny at 2007-11-11 20:59:03 >