This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
lseek does not work with big types
- From: ajaynscape at netscape dot net
- To: cygwin at cygwin dot com
- Date: Tue, 15 Apr 2003 14:14:06 -0400
- Subject: lseek does not work with big types
I have run into a problem calling lseek when big types are being used.
When I build the following code with -D__CYGWIN_USE_BIG_TYPES__,
'sz' is 0. It is correct otherwise.
I am using Cygwin 1.3.22; gcc version 3.2 20020927 (prerelease)
Ajay
===========================================
#include<sys/types.h>
#include<fcntl.h>
#include<unistd.h>
main()
{
int fd;
off_t sz;
if ((fd = open("test.c", O_BINARY)) < 0)
{
printf("open failed\n");
exit(1);
}
else
sz = lseek(fd, 0, SEEK_END);
#ifdef __CYGWIN_USE_BIG_TYPES__
printf("sz = %llu\n", sz);
#else
printf("sz = %u\n", sz);
#endif
}
__________________________________________________________________
Try AOL and get 1045 hours FREE for 45 days!
http://free.aol.com/tryaolfree/index.adp?375380
Get AOL Instant Messenger 5.1 for FREE! Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/