Accommodate CodeBuilder variant of Machten 4.0.3
The following patch against _97b massages a couple of test files so that
CodeBuilder 1.0, a derivative of MachTen 4.0.3, passes all tests (except
lib/db-recno, due to an old DB library). The patch does three things:
1. Make op/stat.t test 35 look in /usr/bin for SUID files iff $^O has value
'machten'. (PowerBuilder has /bin directory, but it contains no SUID
files. Perl5 porters with reasonable memories may remember that the test
got retargetted at /bin only in January. Sigh. A better fix than this
quick hack is really required.)
2. Make op/stat.t test 39 check for value of $^O, succeeding if it's 'machten'.
(PowerBuilder and other MachTen variants lack /MachTen directory, but
all have a uname which says they're 'machten'.)
3. Amend io/fs.t test 25 so that it tests whether truncate can reduce the
length of a file attached to a filehandle, mirroring test 23's check of
whether truncate can reduce the length of a named file, rather than testing
whether truncate can extend an empty file attched to a filehandle. (See
discussion below.)
NOTE IN PARTICULAR POINT 3: CodeBuilder is distinguished from MachTen 4.0.3
in supporting a true Berkeley Fast File System as an alternative to MacOS'
incredibly slow Heirarchical File System. CodeBuilder's FFS code is
derived from 4.3BSD, and does not allow truncate() to extend a file's size.
The HFS code is derived from 4.4BSD, and does allow such extension. (The
man page for truncate(2) has not, as far as I can tell, changed in a long
time, and has reather slippery wording: it's not clear whether extension is
allowed, and the system errors one might expect for failed extension --
ENOSPC and others -- are not mentioned.) Looking at the io/fs.t, it seems
that a typo may have turned a check that the length of a file attached to a
handle can be reduced into a check that it can be extended. The patch
"fixes" the test to check for length reduction. If, on the other hand, it
should indeed be a test of extension (which, presumably, every other system
that supports truncate() passes) then io/fs.t should not be patched, and
CodeBuilder 1.0 pronounced buggy.
p5p-msgid: v
03020902af704d320f27@[194.51.248.88]