Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 16:16:54 +0400 From: Egor Duda X-Mailer: The Bat! (v1.41) Reply-To: Egor Duda Organization: DEO X-Priority: 3 (Normal) Message-ID: <10678.000726@logos-m.ru> To: cygwin-dev Subject: st_blocks incorrect for files larger than 2Gbytes Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! newlib declares off_t as signed long and cygwin's stat calculates st_blocks as buf->st_blocks = (buf->st_size + S_BLKSIZE-1) / S_BLKSIZE; i.e. for file with size 2.164.854.784 bytes stat returns st_blocks=-2080187 or big positive value, when assigned to (unsigned long). this may be fixed in a)newlib or b)cygwin or c)application which way is preferable? newlib's comment states that while off_t should be target-specific, changing this could cause too much pain. Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19