summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-01-22 12:57:20 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-01-22 12:57:20 +0000
commit42d9c3c750e03a3a95cf40f3bfcd11f7b3d3167a (patch)
tree596747c69d4800fd979418730e06a0b042555229 /ext
parent6b42d12b8135b62734b087ee4b02cf28d259a483 (diff)
parent9837d3731bea1e0d3aaed58a46127574f76ffe53 (diff)
downloadperl-42d9c3c750e03a3a95cf40f3bfcd11f7b3d3167a.tar.gz
Integrate from perlio:
[ 18539] Try the invalidate_fileno() idea for non-leaky stdio sockets. [ 18540] stdio does NOT set errno==EBADF on invalidated fileno [ 18547] Tweak APItest for new semantics of printf. Now printf() is always real printf() and not #define'd to PerlIO_stdoutf() so PerlIO_flush() when STDOUT is redirected back to original file does not affect stdout unless we are using :stdio as implementation. So things printf()ed XS side are not written to file (and turn up at end of test). So add an XS function which does fflush(stdout), modify .pm file to export it and .t file to call it. [ 18548] Add defined(__osf__) case to invalidate_fileno (for Tru64). [ 18549] Report layer name (without arg) on fail, and attempt to autoload layer name. (Fix for [perl #20460]). [ 18550] #if defined(__irix__) (for stdio invalidate) from Jarkko. p4raw-link: @18550 on //depot/perlio: 9837d3731bea1e0d3aaed58a46127574f76ffe53 p4raw-link: @18549 on //depot/perlio: c7732655732824f25d1659f5ebb5d4c3538d32e8 p4raw-link: @18548 on //depot/perlio: 9110aad070a9791bfefe4a0d1718537633723305 p4raw-link: @18547 on //depot/perlio: 9d9116831508c6c9cd81c32834701af14b7647a4 p4raw-link: @18540 on //depot/perlio: e85294730ea95da49196ebe8f63ce0db11ebd231 p4raw-link: @18539 on //depot/perlio: 0d7a53989a672378609205d638df0119542bcf7e p4raw-id: //depot/perl@18555
Diffstat (limited to 'ext')
-rw-r--r--ext/XS/APItest/APItest.pm4
-rw-r--r--ext/XS/APItest/APItest.xs5
-rw-r--r--ext/XS/APItest/t/printf.t4
3 files changed, 10 insertions, 3 deletions
diff --git a/ext/XS/APItest/APItest.pm b/ext/XS/APItest/APItest.pm
index bd8463bd80..581fa38240 100644
--- a/ext/XS/APItest/APItest.pm
+++ b/ext/XS/APItest/APItest.pm
@@ -13,10 +13,10 @@ use base qw/ DynaLoader Exporter /;
# Export everything since these functions are only used by a test script
our @EXPORT = qw( print_double print_int print_long
- print_float print_long_double have_long_double
+ print_float print_long_double have_long_double print_flush
);
-our $VERSION = '0.01';
+our $VERSION = '0.02';
bootstrap XS::APItest $VERSION;
diff --git a/ext/XS/APItest/APItest.xs b/ext/XS/APItest/APItest.xs
index d5c6b5271c..b141252bd7 100644
--- a/ext/XS/APItest/APItest.xs
+++ b/ext/XS/APItest/APItest.xs
@@ -53,3 +53,8 @@ print_float(val)
float val
CODE:
printf("%5.3f\n",val);
+
+void
+print_flush()
+ CODE:
+ fflush(stdout);
diff --git a/ext/XS/APItest/t/printf.t b/ext/XS/APItest/t/printf.t
index 91f328cd5c..ef2769e8fa 100644
--- a/ext/XS/APItest/t/printf.t
+++ b/ext/XS/APItest/t/printf.t
@@ -33,10 +33,12 @@ print_long(4);
print_float(4);
print_long_double() if $ldok; # val=7 hardwired
+print_flush();
+
# Now redirect STDOUT and read from the file
ok open(STDOUT, ">&", $oldout), "restore STDOUT";
ok open(my $foo, "<foo.out"), "open foo.out";
-print "# Test output by reading from file\n";
+#print "# Test output by reading from file\n";
# now test the output
my @output = map { chomp; $_ } <$foo>;
close $foo;