From: Martin Str|mberg Message-Id: <200107111714.TAA05783@father.ludd.luth.se> Subject: Re: DJDIR Windows 2000 investigation results #1 In-Reply-To: <8011-Wed11Jul2001190244+0300-eliz@is.elta.co.il> from Eli Zaretskii at "Jul 11, 2001 07:02:45 pm" To: djgpp-workers AT delorie DOT com Date: Wed, 11 Jul 2001 19:14:29 +0200 (MET DST) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Precedence: bulk According to Eli Zaretskii: > > From: "Andrew Cottrell" > > The src/libc/dos/io/_*.c files seem to be inconsistent as some check the > > _osmajor version number if LFN is used and some don't. > > Hmm... that's true. Martin, do you remember why _open and _creatnew, > for example, use a different logic as far as OS versions are > concerned? I think the thinking was LFNs supported -> FAT32 supported. Thus the code. > > Do you have any sample apps for me to try? > > Martin, perhaps you could send your test program to Andrew? I'm having problems finding them, but here's one: #include #include #include #include #include int main(int argc, char *argv[]) { char ch = 'G'; int fd; long long new_size; long long ret; if( argc != 2 || sscanf(argv[1], "%lld", &new_size) != 1 ) { fprintf(stderr, "%s: run like this '%s '.\n", argv[0], argv[0] ); exit(1); } printf("Seeking to %lld.\n", new_size); fd = open("f:/ggg.hmm", O_RDWR|O_CREAT, S_IWUSR); if( 0 <= fd ) { printf("fd = %d.\n", fd); llseek(fd, new_size, SEEK_SET); ret = write(fd, &ch, 1); printf("1: ret = %lld.\n", ret); close(fd); } else { perror("Ouch"); } return(0); } Right, MartinS