Change 13895 by jhi@alpha on 2001/12/26 19:52:03

        BeOS updates.

Affected files ...

.... //depot/perl/README.beos#4 edit
.... //depot/perl/beos/beos.c#5 edit

Differences ...

==== //depot/perl/README.beos#4 (text) ====
Index: perl/README.beos
--- perl/README.beos.~1~        Wed Dec 26 13:00:06 2001
+++ perl/README.beos    Wed Dec 26 13:00:06 2001
@@ -57,3 +57,47 @@
 Tom Spindler
 [EMAIL PROTECTED]
 
+=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.
+
[EMAIL PROTECTED]

==== //depot/perl/beos/beos.c#5 (text) ====
Index: perl/beos/beos.c
--- perl/beos/beos.c.~1~        Wed Dec 26 13:00:06 2001
+++ perl/beos/beos.c    Wed Dec 26 13:00:06 2001
@@ -5,14 +5,16 @@
 #include <sys/wait.h>
 
 /* 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;
 }
End of Patch.

Reply via email to