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

[perl #32717] BeOS specific Updates

Thread Previous | Thread Next
From:
Ingo Weinhold
Date:
November 30, 2004 15:14
Subject:
[perl #32717] BeOS specific Updates
Message ID:
rt-3.0.11-32717-101307.19.7097750538509@perl.org
# New Ticket Created by  Ingo Weinhold 
# Please include the string:  [perl #32717]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=32717 >


Hello,

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:

beos/beos.c
beos/beosish.h
* 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
  enough.

beos/beos_flock_server.cpp
beos/beos_flock_server.h
* The flock() server.

hints/beos.sh
* 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

perl.c
* sysconf(_SC_CLK_TCK) returns a wrong value on BeOS

ext/Errno/Errno_pm.PL
* <errno.h> constants were ignored

ext/File/Glob/t/basic.t
* BeOS can't expand `~<username>'

lib/ExtUtils/t/MM_BeOS.t
* fixed number of tests and initialized a variable to some useful value

lib/Tie/File/t/16_handle.t
* $^O is `beos' not `BeOS'

t/op/magic.t
* 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 Socket.pm in @INC (@INC 
contains: ../lib) at ../lib/IO/Socket.pm line 12.
BEGIN failed--compilation aborted at ../lib/IO/Socket.pm 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 - IO.pm uses Socket";
-		exit 0;
-	}
 }
 
 use strict;

2) t/io/fflush.t
   ext/POSIX/t/sigaction
   ext/POSIX/t/waitpid.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

  http://www.cpan.org/misc/cpan-faq.html#How_report_bug_Perl

is incorrect: perlbug@perl.com instead of perlbug@perl.org (two 
occurrences).

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About