Mail Archives: djgpp-workers/2001/07/18/15:11:34
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
- Raw text -