delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/04/15/14:14:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 15 Apr 2003 14:14:06 -0400
From: ajaynscape AT netscape DOT net
To: cygwin AT cygwin DOT com
Subject: lseek does not work with big types
MIME-Version: 1.0
Message-ID: <51F3C599.2D26020F.0E59B1AB@netscape.net>

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019