delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2000/07/26/13:12:13

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Wed, 26 Jul 2000 09:44:15 -0400
Message-Id: <200007261344.JAA17559@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: deo AT logos-m DOT ru
CC: cygwin-developers AT sourceware DOT cygnus DOT com
In-reply-to: <10678.000726@logos-m.ru> (message from Egor Duda on Wed, 26 Jul
2000 16:16:54 +0400)
Subject: Re: st_blocks incorrect for files larger than 2Gbytes
References: <10678 DOT 000726 AT logos-m DOT ru>

>   buf->st_blocks = (buf->st_size + S_BLKSIZE-1) / S_BLKSIZE;
>
> which way is preferable?

Casting buf->st_size to (unsigned long) before doing the math is.
off_t is signed, but negative sizes are meaningless.

However, this topic belongs on the newlib list, not the cygwin list.

- Raw text -


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