delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/07/12/06:20:28

Date: Thu, 12 Jul 2001 13:21:57 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp-workers AT delorie DOT com
Subject: Re: ls bug
In-Reply-To: <200107120932.LAA10809@lws256.lu.erisoft.se>
Message-ID: <Pine.SUN.3.91.1010712131839.18737C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 12 Jul 2001, Martin Stromberg wrote:

> Eli said:
> > Since st_size's type is off_t, and off_t is a signed int, perhaps we
> > _should_ expect some trouble? ;-)
> 
> Ok. But what should we do? (We need to do something, don't we?)

I'd begin by making sure that the reason is indeed the fact that st_size 
is signed; what I said was just a hunch.

Specifically, if you write a test program which calls `stat' directly
and interprets st_size as an unsigned value, do you get the correct 
result for a file larger than 2GB?  (You could simply compile lstat.c 
with -DTEST.)

If the answer is YES, then the change should be probably done in `ls'.
If not... well, we need another hunch.

- Raw text -


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