MS-DOS patches to perl. Apply this patch to the standard perl source, version 4, patch level 19, using "patch -p." Do this in the root directory of the perl source distribution. You can cat all these patches together and pipe the output to patch -p. Len Reed Holos Software, Inc. ..!gatech!holos0!lbr holos0!lbr@gatech.edu -------------------------------------- *** t/io/fs.t.old Tue Apr 23 22:38:38 1991 --- t/io/fs.t Thu Nov 14 08:57:08 1991 *************** *** 7,12 **** --- 7,82 ---- $wd = `pwd`; chop($wd); + eval('umask'); # won't work on MS-DOS + + if ( $@ ) { + # Crippled tests for MS-DOS + + system "rm -rf tmp"; + mkdir ('tmp', 0777); + chdir 'tmp'; + + open(fh,'>x') || die "Can't create x"; + close(fh); + open(fh,'>a') || die "Can't create a"; + close(fh); + open(fh,'>c') || die "Can't create c"; + print fh "some stuff\n"; + close(fh); + + print "ok 1\nok 2\nok 3\nok 4\n"; + + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, + $blksize,$blocks) = stat('a'); + + if (($mode & 0777) == 0666) {print "ok 5\n";} else {print "not ok 5\n";} + + if ((chmod 0777,'a') == 1) {print "ok 6\n";} else {print "not ok 6\n";} + print "ok 7\n"; + + if ((chmod 0400,'a','x') == 2) {print "ok 8\n";} else {print "not ok 8\n";} + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, + $blksize,$blocks) = stat('a'); + if ((chmod 0600,'a','x') == 2) {print "ok 9\n";} else {print "not ok 9\n";} + if (($mode & 0777) == 0444) {print "ok 10\n";} else {print "not ok 10\n";} + + if ((unlink 'a','x') == 2) {print "ok 11\n";} else {print "not ok 11\n";} + + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, + $blksize,$blocks) = stat('c'); + if ($nlink == 1) {print "ok 12\n";} else {print "not ok 12\n";} + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, + $blksize,$blocks) = stat('x'); + if ($size == 0) {print "ok 13\n";} else {print "not ok 13\n";} + + if (rename('c','b')) {print "ok 14\n";} else {print "not ok 14\n";} + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, + $blksize,$blocks) = stat('a'); + if ($nlink == 0) {print "ok 15\n";} else {print "not ok 15\n";} + $foo = (utime 500000000,500000001,'b'); + if ($foo == 1) {print "ok 16\n";} else {print "not ok 16 $foo\n";} + ($dev,$blocks,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, + $blksize,$blocks) = stat('b'); + if ($nlink) {print "ok 17\n";} else {print "not ok 17\n";} + if ($atime == 500000000) # DOS set atime same as atime + {print "ok 18\n";} + else + {print "not ok 18\n";} + + if ((unlink 'b') == 1) {print "ok 19\n";} else {print "not ok 19\n";} + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, + $blksize,$blocks) = stat('b'); + if ($nlink == 0) {print "ok 20\n";} else {print "not ok 20\n";} + unlink 'c'; + + chdir $wd || die "Can't cd back to $wd"; + + print "ok 21\nok 22\n"; + exit 0; + } # end of MS-DOS section + + # Unix + `rm -f tmp 2>/dev/null; mkdir tmp 2>/dev/null`; chdir './tmp'; `/bin/rm -rf a b c x`;