This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]