develooper Front page | perl.perl5.porters | Postings from September 2012

g++ + mad fails t/run/mad.t

From:
Tony Cook
Date:
September 17, 2012 22:53
Subject:
g++ + mad fails t/run/mad.t
Message ID:
20120918055317.GD9708@mars.tony.develop-help.com
On Tue, Sep 18, 2012 at 06:44:54AM +0200, Father Chrysostomos wrote:
> commit 53cf29abd51a29b2de6000dd437ff6ce6e638a50
> Author: Father Chrysostomos <sprout@cpan.org>
> Date:   Sun Sep 16 07:13:41 2012 -0700
> 
>     g++ + mad fails t/run/mad.t
>     
>     For some reason, g++ causes $^X to have a relative path when called
>     with one, whereas gcc causes it to have an absolute path:
>     
>     g++:
>     
>     $ ./perl -le 'print $^X'
>     ./perl
>     
>     gcc:
>     
>     $ ./perl -le 'print $^X'
>     /Users/sprout/Perl/perl.git-copy/perl
>     
>     (This is on 32-bit darwin.)
>     
>     This affects mad.t’s ability to find the current perl interpreter
>     after a chdir.
> 
> M	t/run/mad.t

The code used to detect _NSGetExecutablePath fails to compile under
C++ due to a missing cast on the result of malloc().

The attached patch fixes it for me, but will need to be re-worked into
metaconfig.

Tony



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