From 97cb92d6c0700e9454bd4ae6d4ab867918bf7861 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 9 Dec 2013 22:18:22 +0100 Subject: Purge sfio support, which has been broken for a decade. The last Perl release that built with -Dusesfio was v5.8.0, and even that failed many regression tests. Every subsequent release fails to build, and in the decade that has passed we have had no bug reports about this. So it's safe to delete all the code. The Configure related code will be purged in a subsequent commit. 2 references to sfio intentionally remain in fakesdio.h and nostdio.h, as these appear to be for using its stdio API-compatibility layer. --- util.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index 26a002abe7..e3059434ba 100644 --- a/util.c +++ b/util.c @@ -26,7 +26,7 @@ #include "perl.h" #include "reentr.h" -#if defined(USE_PERLIO) && !defined(USE_SFIO) +#if defined(USE_PERLIO) #include "perliol.h" /* For PerlIOUnix_refcnt */ #endif @@ -1343,17 +1343,10 @@ Perl_write_to_stderr(pTHX_ SV* msv) Perl_magic_methcall(aTHX_ MUTABLE_SV(io), mg, SV_CONST(PRINT), G_SCALAR | G_DISCARD | G_WRITING_TO_STDERR, 1, msv); else { -#ifdef USE_SFIO - /* SFIO can really mess with your errno */ - dSAVE_ERRNO; -#endif PerlIO * const serr = Perl_error_log; do_print(msv, serr); (void)PerlIO_flush(serr); -#ifdef USE_SFIO - RESTORE_ERRNO; -#endif } } @@ -2728,7 +2721,7 @@ Perl_my_pclose(pTHX_ PerlIO *ptr) SvREFCNT_dec(*svp); *svp = NULL; -#if defined(USE_PERLIO) && !defined(USE_SFIO) +#if defined(USE_PERLIO) /* Find out whether the refcount is low enough for us to wait for the child proc without blocking. */ should_wait = PerlIOUnix_refcnt(fd) == 1 && pid > 0; @@ -3317,7 +3310,7 @@ Perl_get_vtbl(pTHX_ int vtbl_id) I32 Perl_my_fflush_all(pTHX) { -#if defined(USE_PERLIO) || defined(FFLUSH_NULL) || defined(USE_SFIO) +#if defined(USE_PERLIO) || defined(FFLUSH_NULL) return PerlIO_flush(NULL); #else # if defined(HAS__FWALK) -- cgit v1.2.1