diff --git a/src/fs/fspropcalc.cpp b/src/fs/fspropcalc.cpp index dca9572..9f35e95 100644 --- a/src/fs/fspropcalc.cpp +++ b/src/fs/fspropcalc.cpp @@ -99,7 +99,15 @@ bool cFSPropCalc::GetSymLinkStr(const TSTRING& strName, cArchive& arch, size_t s #endif if(rtn == -1) + { + // Some OSes (like HP-UX) return ERANGE if buffer is too small. + // This is nonstandard but better than the usual truncate-and-say-you-succeeded + // + if(ERANGE == errno) + return GetSymLinkStr(strName, arch, size*2); + return false; + } //Sadly if buf isn't big enough readlink 'succeeds' by truncating the string, so the only // clue your buffer might be too small is if you maxed it out. So we try again, within reason. diff --git a/src/test-harness/tests/crc32.pm b/src/test-harness/tests/crc32.pm index c4bf82d..764eccf 100644 --- a/src/test-harness/tests/crc32.pm +++ b/src/test-harness/tests/crc32.pm @@ -34,8 +34,10 @@ sub run() { printf("%-30s", "-- $description"); # lets see if the system 'cksum' agree's with siggen's crc32 value + # Doing split with ' ' instead of / / because some flavors of cksum + # like to separate fields with tabs, as seen on Solaris 10. # - my ($crc32, undef) = split(/ /, `cksum $twtools::twrootdir/test`); + my ($crc32, undef) = split(' ', `cksum $twtools::twrootdir/test`); if ($crc32 eq "") { ++$twtools::twskippedtests;