On Wed, 12 Nov 2003 21:37:28 +0000, Nicholas Clark <nick@ccl4.org> wrote: >On Wed, Nov 12, 2003 at 10:22:42AM -0500, Chip Salzenberg wrote: >> According to Chip Salzenberg: >> > The interface headers for threaded Perl cannot be compiled from C++ >> > due to the interface assuming that "void*" will automatically convert >> > to other pointer types, which is not true in C++. >> >> Does the collective memory of p5p include information on who did this >> and why? Apparently earlier 5.8.x thread interfaces didn't make this >> assumption. But now Abiword can't build its Perl plugin, which sucks. > >I suspect that it's an unintended side effect this patch from Jan Dubois > >http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-10/msg01557.html > >which was intended to restore binary compatibility between 5.8.0 and 5.8.2 >for calls to reentrant libc functions. I guess that returning 0 as a pointer of the correct type is the problem. As before, the patch only exposes a problem that has been in the reentr.h macros all the time. Of course the macro problem is only triggered when the macros are actually _used_, so this isn't detected most of the time. Please try the attached patch (you have to rerun reentr.pl after applying the patch to regenerate reentr.inc) and see if it makes things work again with C++. Cheers, -Jan Index: main/Apps/Gecko/src/Core/reentr.pl --- main/Apps/Gecko/src/Core/reentr.pl.~1~ Wed Nov 12 15:12:34 2003 +++ main/Apps/Gecko/src/Core/reentr.pl Wed Nov 12 15:12:34 2003 @@ -695,7 +695,7 @@ if ($func =~ /^get/) { my $rv = $v ? ", $v" : ""; if ($r eq 'I') { - $call = qq[((PL_REENTRANT_RETINT = $call)$test ? $true : (((PL_REENTRANT_RETINT == ERANGE) || (errno == ERANGE)) ? Perl_reentrant_retry("$func"$rv) : 0))]; + $call = qq[((PL_REENTRANT_RETINT = $call)$test ? $true : (((PL_REENTRANT_RETINT == ERANGE) || (errno == ERANGE)) ? Perl_reentrant_retry("$func"$rv) : ($seenm{$func}{$seenr{$func}})0))]; my $arg = join(", ", map { $seenm{$func}{substr($a,$_,1)}." ".$v[$_] } 0..$seenu{$func}-1); my $ret = $seenr{$func} eq 'V' ? "" : "return "; push @wrap, <<EOF; End of Patch.Thread Previous | Thread Next