From: Martin Str|mberg Message-Id: <200107181911.VAA27882@father.ludd.luth.se> Subject: Re: DJDIR Windows 2000 investigation results #1 In-Reply-To: <000f01c10bfc$a0b5fcf0$0a02a8c0@acceleron> from Andrew Cottrell at "Jul 14, 2001 10:33:38 am" To: djgpp-workers AT delorie DOT com Date: Wed, 18 Jul 2001 21:11:22 +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 Can somebody with W2k try this patch? It supposed to correct the opening of files. Right, MartinS Index: src/libc/dos/io/_creat.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/dos/io/_creat.c,v retrieving revision 1.5 diff -p -u -r1.5 _creat.c --- src/libc/dos/io/_creat.c 2001/01/30 19:53:25 1.5 +++ src/libc/dos/io/_creat.c 2001/07/18 19:05:09 @@ -29,11 +29,14 @@ _creat(const char* filename, int attrib) if(use_lfn) { r.x.ax = 0x716c; - r.x.bx = 0x1002; /* Open r/w with extended size. */ + r.x.bx = 0x0002; /* Open r/w. */ + if (7 <= _osmajor && _osmajor < 10) { + r.x.bx |= 0x1000; /* 0x1000 is FAT32 extended size. */ + } r.x.dx = 0x0012; /* Create, truncate if exists */ r.x.si = __tb_offset; } else { - if(7 <= _osmajor && _osmajor < 10) { + if (7 <= _osmajor && _osmajor < 10) { r.x.ax = 0x6c00; r.x.bx = 0x1002; /* Open r/w with FAT32 extended size. */ /* FAT32 extended size flag doesn't help on WINDOZE 4.1 (98). It Index: src/libc/dos/io/_open.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/dos/io/_open.c,v retrieving revision 1.4 diff -p -u -r1.4 _open.c --- src/libc/dos/io/_open.c 2001/01/30 19:53:25 1.4 +++ src/libc/dos/io/_open.c 2001/07/18 19:05:09 @@ -30,11 +30,14 @@ _open(const char* filename, int oflag) if(use_lfn) { r.x.ax = 0x716c; - r.x.bx = (oflag & 0xff) | 0x1000; /* 0x1000 is FAT32 extended size. */ + r.x.bx = (oflag & 0xff); + if (7 <= _osmajor && _osmajor < 10) { + r.x.bx |= 0x1000; /* 0x1000 is FAT32 extended size. */ + } r.x.dx = 1; /* Open existing file */ r.x.si = __tb_offset; } else { - if(7 <= _osmajor && _osmajor < 10) { + if (7 <= _osmajor && _osmajor < 10) { r.x.ax = 0x6c00; r.x.bx = (oflag & 0xff) | 0x1000; /* 0x1000 is FAT32 extended size. */ /* FAT32 extended size flag doesn't help on WINDOZE 4.1 (98). It