From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Crawford Subject: Re: Weirdest thing ever Date: Fri, 28 Jan 2011 13:13:24 +0000 Message-ID: <4D42C0F4.5020504@sat.dundee.ac.uk> References: <4D421282.4050403@sat.dundee.ac.uk> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4D421282.4050403@sat.dundee.ac.uk> Sender: linux-msdos-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Xavier Tarifa Cc: "linux-msdos@vger.kernel.org" Dear Xavier, > While it is conceivable that a DOS program could read beyond 2GB, it is > very unlikely it could seek to those positions, and very certain it > could not do so beyond 4GB. Just to say that in the course of other testing here, I looked to see what the Microsoft C6.0 library calls for filelength() did with 64-bit dosemu. What I found was: With 32-bit Linux/dosemu it can't open files >2GB. With 64-bit it can open files >2GB but sees the length incorrectly: For <4GB it is correct if you treat the returned value as unsigned. This may be the case in some software, but it is unlikely to be universal. For files >4GB it seems to only get the lower 32-bits of the size, so the file appears (incorrectly) to be less than 4GB in size. I would have prefered the system to return (4GB-1) as at least you know the file is very big in this case! However, I have not tested to see if useful data access is possible >2GB as I don't have any DOS applications that use very large files. Regards, Paul -- Dr. Paul S. Crawford Satellite Station Dundee University Small's Wynd, Dundee, DD1 4HN, U.K. Tel: +44 (0)1382 38 4687 Email: psc@sat.dundee.ac.uk The University of Dundee is a Scottish Registered Charity, No. SC015096