develooper Front page | perl.perl5.porters | Postings from October 2008

Re: [PATCH] Haiku Port

Thread Previous | Thread Next
Ingo Weinhold
October 29, 2008 16:54
Re: [PATCH] Haiku Port
Message ID:

On 2008-10-29 at 09:39:20 [+0100], H.Merijn Brand <> wrote:
> On Wed, 29 Oct 2008 02:25:44 +0100, Ingo Weinhold
> <> wrote:
> > 
> > attached is a patch introducing support for Haiku, created against
> > perl-current @34615. Most changes are pretty straight-forward. Noteworthy
> > are the following two:
> The patch is very complete and looks also pretty sane. Thanks!
> 1. Applied the Configure changes to the metaconfig branch and
>    regenerated Configure
> 2. Applied all but the ext/POSIX part in a series of changes, as I
>    managed to trick perforce into adding the wrong files and had to
>    correct that. Changes #34630, #34631, #34632, and #34634 should
>    bring you to where you want to be. Sorry for the noise.


> > * ext/Haiku/...: Adds a module Haiku which provides access to a few Haiku
> >   specific API functions, which I found very helpful while debugging the 
> >   port.
> I moved that to haiku/Haiku, as everything in ext/ is for all OS's

Oh OK, I guess I got misled by the Win32 stuff in ext/.

> > * ext/POSIX/POSIX.xs: I re-introduced the use of the WMUNGE() macro, which
> >   was (accidentally?) removed after 5.10.0. The macro is still a hack. As 
> >   my
> >   added comment explains the use of the OS's W*() macros in this context 
> >   is
> >   simply not correct and should probably better be fixed.
> That is beyond my scope, and I leave that to other magicians

I only re-introduced use of the WMUNGE() macro because it was the status quo 
in 5.10.0. If desired I can also propose a patch how I think it should be 
done correctly. The code would roughly look like this:

#define PERL_WEXITSTATUS(status) (((status) & 0xff00) >> 8)
#define PERL_WTERMSIG(status) ((status) & 0x7f)

    case 0:
        RETVAL = PERL_WEXITSTATUS(status);

The "#ifdef"s could even be removed, though one might rather want to croak() 
since the returned value will usually be meaningless on a platform that 
doesn't even have the macro.

CU, Ingo

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