This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add Configure probe for strerror_l()
[perl5.git] / ext / XS-Typemap / stdio.c
CommitLineData
ea035a69
JH
1
2/* This provides a test of STDIO and emulates a library that
3 has been built outside of the PerlIO system and therefore is
4 built using FILE* rather than PerlIO * (a common occurrence
5 for XS).
6
7 Use a separate file to make sure we are not contaminated by
8 PerlIO.
9*/
10
11#include <stdio.h>
12
13/* Open a file for write */
14FILE * xsfopen ( const char * path ) {
15 FILE * stream;
16 stream = fopen( path, "w");
17 return stream;
18}
19
20int xsfclose ( FILE * stream ) {
21 return fclose( stream );
22}
23
24
25int xsfprintf ( FILE * stream, const char * text ) {
edd52d85 26 return fprintf( stream, "%s", text );
ea035a69
JH
27}
28