On Thu, Mar 11, 2010 at 05:28:30AM -0500, Heiko via RT wrote:
> <URL: https://rt.cpan.org/Ticket/Display.html?id=55049 >
> 
> > In the course of investigating this did you identify an actual cause?
> 
> Not really. The mapped fopen() function returns something not 
> appropriate for further use of non PERLAPIO functions...
>  
> > Could it be related to 
> http://perl.markmail.org/thread/2ixdrw25huun2fx5 ?
> 
> In the widest sense, yes.
> 
> PERLIO adds another level of indirection for IO Layers as far I 
> understand. This can only work, if used with new functions from
> PERLAPIO.
> 
> Alternatively we could block the mappings and use the libc functions 
> directly. That is what I did, and it compiled, and the module did not 
> crash. But how portable that is, I don't know.
> 
> See attached diff (against 3.0.1_94) for FileHandle.xs

> rechecked with my latest diff (#undef ...) against 3.10_51:
>
> only one test out of 2598 tests failed, good work :-)   

[t/50-errno.t - I'll reply in a seperate email about that one.]

> --- FileHandle.xs.org 2010-02-21 17:34:28.000000000 +0100
> +++ FileHandle.xs     2010-03-11 11:15:54.826391900 +0100
> @@ -18,6 +18,18 @@
>  #define NEED_sv_2pvbyte
>  #include "ppport.h"
>  
> +/*  deliberately throw IO mappings away */
> +#undef fgets
> +#undef fopen
> +#undef fclose
> +#undef fread
> +#undef fwrite
> +#undef ftell
> +#undef fprintf
> +#undef vfprintf
> +#undef feof
> +#undef fflush

I'm happy with the approach, but I'd like to wrap it in an #ifdef
so it only applies to the affected platforms.

What puzzles me is why Jan didn't hit the same problem in
http://groups.google.com/group/develnytprof-dev/browse_frm/thread/7ec4850ff164c95b/e241a51712be9efd#e241a51712be9efd

You said you're using "Windows XP with ActiveState Perl 5.8.4"
Could you post your perl -V output so we get the full details?

Jan, could you do the same so we can compare?

I want to find an appropriate #ifdef incantation to wrap it with.
Any suggestions?

Tim.

-- 
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]

Reply via email to