Date: Sun, 12 Jul 1998 19:48:20 +0300 (IDT) From: Eli Zaretskii To: DJ Delorie cc: djgpp-workers AT delorie DOT com Subject: DJGPP alpha 980628 (part 2) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk Latest versions of DOS support deeper directory trees. *** src/libc/posix/sys/stat/mkdir.c~0 Mon Jun 29 00:13:02 1998 --- src/libc/posix/sys/stat/mkdir.c Fri Jul 10 15:39:08 1998 *************** *** 8,13 **** --- 8,15 ---- #include #include #include + #include + #include #include int *************** *** 15,25 **** --- 17,38 ---- { __dpmi_regs r; int use_lfn = _USE_LFN; + unsigned attr; _put_path(mydirname); if(use_lfn) r.x.ax = 0x7139; + else if ((_osmajor > 7 && _osmajor < 10) /* OS/2 returns v10 and above */ + || (_osmajor == 7 && _osminor >= 20)) + { + /* DOS 7.20 (Windows 98) and later supports a new function with + a maximum path length of 128 characters instead of 67. This + is important for deeply-nested directories. */ + r.x.ax = 0x43ff; + r.x.bp = 0x5053; + r.h.cl = 0x39; + } else r.h.ah = 0x39; r.x.ds = __tb_segment; *************** *** 42,51 **** return -1; } ! /* DOS ignores directory permissions, and mkdir is stub'd, ! so rather than stub chmod also, just skip it. DJ */ ! /* if (chmod(mydirname, mode)) ! return -1; */ return 0; } - --- 55,67 ---- return -1; } ! /* mkdir is stub'd, and we don't want to stub chmod also. */ ! attr = _chmod(mydirname, 0, 0); ! ! /* Must clear the directory and volume bits, otherwise 214301 fails. ! Unused bits left alone (some network redirectors use them). Only ! care about read-only attribute. */ ! if (_chmod(mydirname, 1, (attr & 0xffe6) | ((mode & S_IWUSR) == 0)) == -1) ! return -1; return 0; } *** src/libc/ansi/stdio/_rename.c~0 Mon Nov 3 00:01:44 1997 --- src/libc/ansi/stdio/_rename.c Fri Jul 10 15:45:40 1998 *************** *** 7,12 **** --- 7,13 ---- #include #include #include + #include #include #include #include *************** *** 81,86 **** --- 82,97 ---- { if(use_lfn) r.x.ax = 0x7156; + else if ((_osmajor > 7 && _osmajor < 10) /* OS/2 returns v10 and above */ + || (_osmajor == 7 && _osminor >= 20)) + { + /* DOS 7.20 (Windows 98) and later supports a new function with + a maximum path length of 128 characters instead of 67. This + is important for deeply-nested directories. */ + r.x.ax = 0x43ff; + r.x.bp = 0x5053; + r.h.cl = 0x56; + } else r.h.ah = 0x56; _put_path2(new, olen);