develooper Front page | perl.perl5.porters | Postings from December 2013

Re: When do we use PERLIO vs STDIO

Thread Previous | Thread Next
From:
Karl Williamson
Date:
December 18, 2013 05:19
Subject:
Re: When do we use PERLIO vs STDIO
Message ID:
52B13044.5020902@khwilliamson.com
On 12/17/2013 03:46 PM, Tim Jenness wrote:
>
>
>
> On Tue, Dec 17, 2013 at 1:58 PM, Karl Williamson
> <public@khwilliamson.com <mailto:public@khwilliamson.com>> wrote:
>
>     I discovered that ext/XS-APItest/APItest.xs is testing the libc
>     functions like printf().  We think (on irc) that it is intending to
>     be testing the PERLIO equivalents instead.  Does anyone know?
>
>
> I'm pretty sure that when I wrote this in 2002 I had no clue about
> perlio vs stdio and just wanted to test that I could print something. I
> can't remember what motivated me. The earliest version of APItest.xs I
> can find from June 10, 2002 just seems to have tests for printing. It's
> more more complex these days but those routines look the same.
>
> I had assumed that perl would pick up the relevant version of printf (a
> reimplementation or the stdio one) and the choice would be down to the
> include files. APItest.xs doesn't explicitly try to include stdio.h.
> Wouldn't printf() be translated to a PerlIO version?

If I

#include "fakesdio.h"

in the .xs file, then they get translated to PerlIO.  But that was in 
part my point.  It no longer is feasible to set compile variables to 
force this, as apparently it used to be.


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