From: Jarkko Hietaniemi Date: Wed, 26 Dec 2001 19:52:03 +0000 (+0000) Subject: BeOS updates. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dff18f87b95b47b2b3dc9fa1769bd282a2d85916;p=p5sagit%2Fp5-mst-13.2.git BeOS updates. p4raw-id: //depot/perl@13895 --- diff --git a/README.beos b/README.beos index 7458672..155f291 100644 --- a/README.beos +++ b/README.beos @@ -57,3 +57,47 @@ please email me. Tom Spindler dogcow@isi.net +=head2 Update 2001-12-26 + +I managed to compile one of the developer snapshots (13885 plus a few +tweaks) leading up to (some day) Perl 5.8.0, and the following tests +fail: + + op/magic 24-26 + ext/POSIX/t/sigaction 13 + ext/POSIX/t/waitpid 1 + lib/ExtUtils/t/Installed 9-10 25-27 29-30 33-36 + +None of the failures look too serious: + +=over 4 + +=item * + +The op/magic failures look like something funny going on with $0 and +$^X that I can't now figure out: none of the generated pathnames are +wrong as such, they just seem to accumulate "./" prefixes and infixes +in ways that define logic. + +=item * + +The sigaction #13 means that signal mask doesn't get properly restored +if sigaction returns early. + +=item * + +The waitpid failure means that after there are no more child +processes, waitpid is supposed to start returning -1 (and set errno +to ECHILD). In BeOS, it doesn't seem to. + +=item * + +The Installed test has some filesystem portability assumptions. + +=back + +Disclaimer: I just installed BeOS Personal Edition 5.0 and the +Developer Tools, that is the whole extent of my BeOS expertise, +so pelase don't ask for further help in BeOS Perl problems, sorry. + +jhi@iki.fi diff --git a/beos/beos.c b/beos/beos.c index d5f7fba..7e799ca 100644 --- a/beos/beos.c +++ b/beos/beos.c @@ -5,14 +5,16 @@ #include /* In BeOS 5.0 the waitpid() seems to misbehave in that the status - * is _not_ shifted left by eight (multiplied by 256), as it is in - * POSIX/UNIX. To undo the surpise effect to the rest of Perl we - * need this wrapper. (The rest of BeOS might be surprised because - * of this, though.) */ + * has the upper and lower bytes swapped compared with the usual + * POSIX/UNIX implementations. To undo the surpise effect to the + * rest of Perl we need this wrapper. (The rest of BeOS might be + * surprised because of this, though.) */ pid_t beos_waitpid(pid_t process_id, int *status_location, int options) { pid_t got = waitpid(process_id, status_location, options); if (status_location) - *status_location <<= 8; /* What about the POSIX low bits? */ + *status_location = + (*status_location & 0x00FF) << 8 | + (*status_location & 0xFF00) >> 8; return got; }