develooper Front page | perl.perl5.porters | Postings from November 2004

[perl #32717] BeOS specific Updates

Thread Previous | Thread Next
Ingo Weinhold
November 30, 2004 15:14
[perl #32717] BeOS specific Updates
Message ID:
# New Ticket Created by  Ingo Weinhold 
# Please include the string:  [perl #32717]
# in the subject line of all future correspondence about this issue. 
# <URL: >


I realized that the BeOS port has become out of sync, and I've invested a 
bit of time to deal with a couple of issues. Attached are patches against 
the 5.8.5 and 5.9.1 sources (identical save for file offsets).

These are the changes:

* There is no flock() on BeOS and fcntl(F_SETLK) doesn't work either.
  I implemented a simple server that allows to provide a flock()
  emulation. It's behaves a bit different than flock(), but should be
  close enough to be useful. close() is overridden to release locks.
* kill() doesn't behave properly when called for a process group
  (i.e. for 0 or a value < -1) and signal 0. It really kills the
  processes. This is a work-around for this case that should work well

* The flock() server.

* correct identification of systems with the BONE network stack
* added `-lnet' to `libs' on non-BONE systems: it contains things like
  uname(), gethostname() and is not added automatically by newer
  versions of gcc available for BeOS
* override d_flock and d_flockproto, since we implement an emulation

* sysconf(_SC_CLK_TCK) returns a wrong value on BeOS

* <errno.h> constants were ignored

* BeOS can't expand `~<username>'

* fixed number of tests and initialized a variable to some useful value

* $^O is `beos' not `BeOS'

* execvp() on BeOS prepends `./' to relative path, which is harmless, but
  let the tests fail

Remaining issues

1) ext/IO/t/IO.t

ext/IO/t/IO..........................Can't locate in @INC (@INC 
contains: ../lib) at ../lib/IO/ line 12.
BEGIN failed--compilation aborted at ../lib/IO/ line 12.
Compilation failed in require at (eval 4) line 5.
 at ../ext/IO/t/IO.t line 38
Use of uninitialized value in unlink at ../ext/IO/t/IO.t line 120.
Use of uninitialized value in rmdir at ../ext/IO/t/IO.t line 121.
# Looks like you planned 18 tests but only ran 4.
# Looks like your test died just after 4.

The test is skipped in 5.8.5, but is no longer, due to this change between 
the versions:

--- perl-5.8.5/ext/IO/t/IO.t	Wed Jun 23 17:39:25 2004
+++ perl-5.9.1/ext/IO/t/IO.t	Fri Feb 20 16:25:54 2004
@@ -4,11 +4,6 @@
 	chdir 't' if -d 't';
 	@INC = '../lib';
-	require Config;
-	if ($Config::Config{'extensions'} !~ /\bSocket\b/) {
-		print "1..0 # Skip: Socket not built - uses Socket";
-		exit 0;
-	}
 use strict;

2) t/io/fflush.t
* Fail due to non-fixable BeOS bugs. I'm not sure what the right
  approach in such a situation is. Let the tests fail or skip them?

3) The flock() server is not integrated into the build system yet. I'm not 
familiar with the build system and thought I rather ask for assistence. It 
can simply be compiled via `c++ -o beos_flock_server beos_flock_server.cpp' 
in the `beos' subdir and would be installed in the standard bin dir.

4) I haven't updated the README.beos yet, since I'd rather wait for your 
reply first. I'm also not quite sure how to do this best. Apparently 
someone wrote it once and someone else added an `Update 2002-05-30' 
section. So I could rewrite the whole thing to just reflect the current 
state or I could just add another `Update...' section.

Thanks in advance for your help.

CU, Ingo

PS: The bug reporting email address given in

is incorrect: instead of (two 

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About