ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2005/02/25/02:16:13

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Trace-PostClient-IP: 68.147.129.203
From: Brian Inglis <Brian DOT Inglis AT SystematicSW DOT Invalid>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: files > 4GB There is always a solution
Organization: Systematic Software
Message-ID: <lrgt11p17mhi2c2hord8slrev3g06g7rvk@4ax.com>
References: <15b DOT 4b75cad0 DOT 2f50093c AT aol DOT com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Lines: 41
Date: Fri, 25 Feb 2005 07:13:58 GMT
NNTP-Posting-Host: 24.71.223.147
X-Complaints-To: abuse AT shaw DOT ca
X-Trace: pd7tw3no 1109315638 24.71.223.147 (Fri, 25 Feb 2005 00:13:58 MST)
NNTP-Posting-Date: Fri, 25 Feb 2005 00:13:58 MST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

fOn Thu, 24 Feb 2005 23:53:16 EST in comp.os.msdos.djgpp,
Sterten AT aol DOT com wrote:

>but I can create a file >4GB with a normal GCC-program:
>(on a  NTFS-harddisk)
> 
>The file is opened and data is written to it.
>You can follow this  process with multitasking from another
>DOS-commandline. You can peek into the  file, while data is
>appended to it by a GCC-compiled program.
>You can open  it with other C-programs
>until less than 4GB are written. Then suddenly  you
>can't open the file with GCC-compiled programs,
>while DOS-commands  "dir","type","copy" still work.
>This continues while the file still grows and  after it's finished.
> 
>Now, does the whole structure of the file change dramatically,
>when byte  2^32 is written ? Hard to believe. 
>The data is still at the same place,  where it was when byte
>2^32-1 was written. Seems to me that GCC just  checks
>for the filesize and when it's too big then GCC
>exits with an error  - although it could proceed
>as normal, at least for the first 2^32  bytes
>and probably with some small modifications for
>the rest as  well.
>I guess that it can be done by changing less than 100 bytes
>in the  gcc.exe.

ISTM from the code, that it's probably one of the VDM "DOS" file open
system calls which fails, there don't appear to be any size or similar
checks in the 2.03 library. I don't run NT so can't check to make
sure. 

AFAIR most or all NT utilities are NT CMD shell routines or console
mode programs, not DOS programs. 

-- 
Thanks. Take care, Brian Inglis 	Calgary, Alberta, Canada

Brian DOT Inglis AT CSi DOT com 	(Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca)
    fake address		use address above to reply

- Raw text -


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