This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Purge sfio support, which has been broken for a decade.
authorNicholas Clark <nick@ccl4.org>
Mon, 9 Dec 2013 21:18:22 +0000 (22:18 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 27 Dec 2013 12:25:27 +0000 (13:25 +0100)
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.

29 files changed:
MANIFEST
NetWare/Makefile
configpm
doio.c
embed.fnc
embed.h
ext/PerlIO-encoding/encoding.pm
ext/PerlIO-encoding/encoding.xs
makedef.pl
perl.h
perlio.c
perlio.h
perlsfio.h [deleted file]
pod/perlapio.pod
pod/perlfunc.pod
pod/perliol.pod
pp_ctl.c
proto.h
t/io/fflush.t
t/io/pipe.t
t/op/lfs.t
t/op/sprintf.t
universal.c
util.c
win32/Makefile
win32/Makefile.ce
win32/makefile.mk
win32/win32.c
win32/wince.c

index 23fa143..5f2bab1 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -4460,7 +4460,6 @@ perlio.h                  PerlIO abstraction
 perliol.h                      PerlIO Layer definition
 perlio.sym                     Symbols for PerlIO abstraction
 perlsdio.h                     Fake stdio using perlio
-perlsfio.h                     Prototype sfio mapping for PerlIO
 perlvars.h                     Global variables
 perly.act                      parser actions; derived from perly.y
 perly.c                                parser code (NOT derived from perly.y)
index 8691bf4..a002f3f 100644 (file)
@@ -764,7 +764,6 @@ CORE_NOCFG_H        =               \
                ..\perl.h       \
                ..\perlapi.h    \
                ..\perlsdio.h   \
-               ..\perlsfio.h   \
                ..\perly.h      \
                ..\pp.h         \
                ..\proto.h      \
index fbc4710..cf105ba 100755 (executable)
--- a/configpm
+++ b/configpm
@@ -72,13 +72,13 @@ my %Extensions = map {($_,$_)}
 
 # Could use a map to add ".h", but I suspect that it's easier to use literals,
 # so that anyone using grep will find them
-# This is the list from MM_VMS, plus pad.h, parser.h, perlsfio.h utf8.h
+# This is the list from MM_VMS, plus pad.h, parser.h, utf8.h
 # which it installs. It *doesn't* install perliol.h - FIXME.
 my @header_files = qw(EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h
                      embed.h embedvar.h form.h gv.h handy.h hv.h hv_func.h intrpvar.h
                      iperlsys.h keywords.h mg.h nostdio.h op.h opcode.h
                      pad.h parser.h patchlevel.h perl.h perlio.h perlsdio.h
-                     perlsfio.h perlvars.h perly.h pp.h pp_proto.h proto.h
+                     perlvars.h perly.h pp.h pp_proto.h proto.h
                      regcomp.h regexp.h regnodes.h scope.h sv.h thread.h utf8.h
                      util.h);
 
diff --git a/doio.c b/doio.c
index fe74cc9..86f366a 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -359,13 +359,6 @@ Perl_do_openn(pTHX_ GV *gv, const char *oname, I32 len, int as_raw,
                             * be optimized away on most platforms;
                             * only Solaris and Linux seem to flush
                             * on that. --jhi */
-#ifdef USE_SFIO
-                           /* sfio fails to clear error on next
-                              sfwrite, contrary to documentation.
-                              -- Nicholas Clark */
-                           if (PerlIO_seek(that_fp, 0, SEEK_CUR) == -1)
-                               PerlIO_clearerr(that_fp);
-#endif
                            /* On the other hand, do all platforms
                             * take gracefully to flushing a read-only
                             * filehandle?  Perhaps we should do
index 2b82824..42ab356 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -2382,7 +2382,7 @@ pMXE      |SV*    |sv_setsv_cow   |NULLOK SV* dstr|NN SV* sstr
 
 Aop    |const char *|PerlIO_context_layers|NULLOK const char *mode
 
-#if defined(USE_PERLIO) && !defined(USE_SFIO)
+#if defined(USE_PERLIO)
 Ap     |int    |PerlIO_close           |NULLOK PerlIO *f
 Ap     |int    |PerlIO_fill            |NULLOK PerlIO *f
 Ap     |int    |PerlIO_fileno          |NULLOK PerlIO *f
diff --git a/embed.h b/embed.h
index 9e3af8b..0f8e82c 100644 (file)
--- a/embed.h
+++ b/embed.h
 #if defined(USE_LOCALE_COLLATE)
 #define sv_collxfrm_flags(a,b,c)       Perl_sv_collxfrm_flags(aTHX_ a,b,c)
 #endif
-#if defined(USE_PERLIO) && !defined(USE_SFIO)
+#if defined(USE_PERLIO)
 #define PerlIO_clearerr(a)     Perl_PerlIO_clearerr(aTHX_ a)
 #define PerlIO_close(a)                Perl_PerlIO_close(aTHX_ a)
 #define PerlIO_eof(a)          Perl_PerlIO_eof(aTHX_ a)
index e3291a5..8d39ed9 100644 (file)
@@ -1,7 +1,7 @@
 package PerlIO::encoding;
 
 use strict;
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 our $DEBUG = 0;
 $DEBUG and warn __PACKAGE__, " called by ", join(", ", caller), "\n";
 
index f522ef1..fababd1 100644 (file)
@@ -6,7 +6,7 @@
 
 #define OUR_DEFAULT_FB "Encode::PERLQQ"
 
-#if defined(USE_PERLIO) && !defined(USE_SFIO)
+#if defined(USE_PERLIO)
 
 /* Define an encoding "layer" in the perliol.h sense.
 
index 5c49859..c97fdc4 100644 (file)
@@ -635,88 +635,8 @@ if ($define{'USE_PERLIO'}) {
     # of its implementation - read from a file
     push @syms, 'perlio.sym';
 
-    # This part is then dependent on how the abstraction is implemented
-    if ($define{'USE_SFIO'}) {
-       # Old legacy non-stdio "PerlIO"
-       ++$skip{$_} foreach @layer_syms;
-       ++$skip{perlsio_binmode};
-       # SFIO defines most of the PerlIO routines as macros
-       # So undo most of what $perlio_sym has just done - d'oh !
-       # Perhaps it would be better to list the ones which do exist
-       # And emit them
-       ++$skip{$_} foreach qw(
-                        PerlIO_canset_cnt
-                        PerlIO_clearerr
-                        PerlIO_close
-                        PerlIO_eof
-                        PerlIO_error
-                        PerlIO_exportFILE
-                        PerlIO_fast_gets
-                        PerlIO_fdopen
-                        PerlIO_fileno
-                        PerlIO_findFILE
-                        PerlIO_flush
-                        PerlIO_get_base
-                        PerlIO_get_bufsiz
-                        PerlIO_get_cnt
-                        PerlIO_get_ptr
-                        PerlIO_getc
-                        PerlIO_getname
-                        PerlIO_has_base
-                        PerlIO_has_cntptr
-                        PerlIO_importFILE
-                        PerlIO_open
-                        PerlIO_printf
-                        PerlIO_putc
-                        PerlIO_puts
-                        PerlIO_read
-                        PerlIO_releaseFILE
-                        PerlIO_reopen
-                        PerlIO_rewind
-                        PerlIO_seek
-                        PerlIO_set_cnt
-                        PerlIO_set_ptrcnt
-                        PerlIO_setlinebuf
-                        PerlIO_stderr
-                        PerlIO_stdin
-                        PerlIO_stdout
-                        PerlIO_stdoutf
-                        PerlIO_tell
-                        PerlIO_ungetc
-                        PerlIO_vprintf
-                        PerlIO_write
-                        PerlIO_perlio
-                        Perl_PerlIO_clearerr
-                        Perl_PerlIO_close
-                        Perl_PerlIO_eof
-                        Perl_PerlIO_error
-                        Perl_PerlIO_fileno
-                        Perl_PerlIO_fill
-                        Perl_PerlIO_flush
-                        Perl_PerlIO_get_base
-                        Perl_PerlIO_get_bufsiz
-                        Perl_PerlIO_get_cnt
-                        Perl_PerlIO_get_ptr
-                        Perl_PerlIO_read
-                        Perl_PerlIO_seek
-                        Perl_PerlIO_set_cnt
-                        Perl_PerlIO_set_ptrcnt
-                        Perl_PerlIO_setlinebuf
-                        Perl_PerlIO_stderr
-                        Perl_PerlIO_stdin
-                        Perl_PerlIO_stdout
-                        Perl_PerlIO_tell
-                        Perl_PerlIO_unread
-                        Perl_PerlIO_write
-                         PL_def_layerlist
-                         PL_known_layers
-                         PL_perlio
-                            );
-    }
-    else {
-       # PerlIO with layers - export implementation
-       try_symbols(@layer_syms, 'perlsio_binmode');
-    }
+    # PerlIO with layers - export implementation
+    try_symbols(@layer_syms, 'perlsio_binmode');
 } else {
        # -Uuseperlio
        # Skip the PerlIO layer symbols - although
diff --git a/perl.h b/perl.h
index 5e3b846..f245ad9 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1016,12 +1016,6 @@ EXTERN_C int usleep(unsigned int);
 #   include <arpa/inet.h>
 #endif
 
-#if defined(SF_APPEND) && defined(USE_SFIO) && defined(I_SFIO)
-/* <sfio.h> defines SF_APPEND and <sys/stat.h> might define SF_APPEND
- * (the neo-BSD seem to do this).  */
-#   undef SF_APPEND
-#endif
-
 #ifdef I_SYS_STAT
 #   include <sys/stat.h>
 #endif
@@ -2960,7 +2954,7 @@ typedef pthread_key_t     perl_key;
  * out there, Solaris being the most prominent.
  */
 #ifndef PERL_FLUSHALL_FOR_CHILD
-# if defined(USE_PERLIO) || defined(FFLUSH_NULL) || defined(USE_SFIO)
+# if defined(USE_PERLIO) || defined(FFLUSH_NULL)
 #  define PERL_FLUSHALL_FOR_CHILD      PerlIO_flush((PerlIO*)NULL)
 # else
 #  ifdef FFLUSH_ALL
@@ -3976,7 +3970,7 @@ typedef Sighandler_t Sigsave_t;
 # define RUNOPS_DEFAULT Perl_runops_standard
 #endif
 
-#if defined(USE_PERLIO) && !defined(USE_SFIO)
+#if defined(USE_PERLIO)
 EXTERN_C void PerlIO_teardown(void);
 # ifdef USE_ITHREADS
 #  define PERLIO_INIT MUTEX_INIT(&PL_perlio_mutex)
@@ -4631,9 +4625,6 @@ EXTCONST char PL_bincompat_options[] =
 #  ifdef USE_REENTRANT_API
                             " USE_REENTRANT_API"
 #  endif
-#  ifdef USE_SFIO
-                            " USE_SFIO"
-#  endif
 #  ifdef USE_SOCKS
                             " USE_SOCKS"
 #  endif
index 1369cd8..5d41e76 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -117,8 +117,6 @@ extern off_t ftello(FILE *);
 #define NATIVE_0xd  CR_NATIVE
 #define NATIVE_0xa  LF_NATIVE
 
-#ifndef USE_SFIO
-
 EXTERN_C int perlsio_binmode(FILE *fp, int iotype, int mode);
 
 int
@@ -157,7 +155,6 @@ perlsio_binmode(FILE *fp, int iotype, int mode)
 #  endif
 #endif
 }
-#endif /* sfio */
 
 #ifndef O_ACCMODE
 #define O_ACCMODE 3             /* Assume traditional implementation */
@@ -234,14 +231,7 @@ PerlIO_destruct(pTHX)
 int
 PerlIO_binmode(pTHX_ PerlIO *fp, int iotype, int mode, const char *names)
 {
-#ifdef USE_SFIO
-    PERL_UNUSED_ARG(iotype);
-    PERL_UNUSED_ARG(mode);
-    PERL_UNUSED_ARG(names);
-    return 1;
-#else
     return perlsio_binmode(fp, iotype, mode);
-#endif
 }
 
 PerlIO *
@@ -366,67 +356,6 @@ PerlIO_tmpfile(void)
 
 #else                           /* PERLIO_IS_STDIO */
 
-#ifdef USE_SFIO
-
-#undef HAS_FSETPOS
-#undef HAS_FGETPOS
-
-/*
- * This section is just to make sure these functions get pulled in from
- * libsfio.a
- */
-
-#undef PerlIO_tmpfile
-PerlIO *
-PerlIO_tmpfile(void)
-{
-    return sftmp(0);
-}
-
-void
-PerlIO_init(pTHX)
-{
-    PERL_UNUSED_CONTEXT;
-    /*
-     * Force this file to be included in perl binary. Which allows this
-     * file to force inclusion of other functions that may be required by
-     * loadable extensions e.g. for FileHandle::tmpfile
-     */
-
-    /*
-     * Hack sfio does its own 'autoflush' on stdout in common cases. Flush
-     * results in a lot of lseek()s to regular files and lot of small
-     * writes to pipes.
-     */
-    sfset(sfstdout, SF_SHARE, 0);
-}
-
-/* This is not the reverse of PerlIO_exportFILE(), PerlIO_releaseFILE() is. */
-PerlIO *
-PerlIO_importFILE(FILE *stdio, const char *mode)
-{
-    const int fd = fileno(stdio);
-    if (!mode || !*mode) {
-       mode = "r+";
-    }
-    return PerlIO_fdopen(fd, mode);
-}
-
-FILE *
-PerlIO_findFILE(PerlIO *pio)
-{
-    const int fd = PerlIO_fileno(pio);
-    FILE * f = fdopen(fd, "r+");
-    PerlIO_flush(pio);
-    if (!f && errno == EINVAL)
-       f = fdopen(fd, "w");
-    if (!f && errno == EINVAL)
-       f = fdopen(fd, "r");
-    return f;
-}
-
-
-#else                           /* USE_SFIO */
 /*======================================================================================*/
 /*
  * Implement all the PerlIO interface ourselves.
@@ -5063,7 +4992,6 @@ PerlIO_tmpfile(void)
 #undef HAS_FSETPOS
 #undef HAS_FGETPOS
 
-#endif                          /* USE_SFIO */
 #endif                          /* PERLIO_IS_STDIO */
 
 /*======================================================================================*/
@@ -5166,7 +5094,7 @@ PerlIO_getpos(PerlIO *f, SV *pos)
 }
 #endif
 
-#if (defined(PERLIO_IS_STDIO) || !defined(USE_SFIO)) && !defined(HAS_VPRINTF)
+#if !defined(HAS_VPRINTF)
 
 int
 vprintf(char *pat, char *args)
index 34968c3..777c886 100644 (file)
--- a/perlio.h
+++ b/perlio.h
    USE_PERLIO  - The primary Configure variable that enables PerlIO.
                  If USE_PERLIO is _NOT_ set
                    then USE_STDIO above will be set to be conservative.
-                 If USE_PERLIO is set
-                   then there are two modes determined by USE_SFIO:
-
-   USE_SFIO    - If set causes PerlIO_xxx() to be #define-d onto sfio functions.
-                 A backward compatibility mode for some specialist applications.
-
-                 If USE_SFIO is not set then PerlIO_xxx() are real functions
+                 PerlIO_xxx() are real functions
                  defined in perlio.c which implement extra functionality
                  required for utf8 support.
 
 #ifdef PERLIO_IS_STDIO
 /* #define PerlIO_xxxx() as equivalent stdio function */
 #include "perlsdio.h"
-#else                          /* PERLIO_IS_STDIO */
-#ifdef USE_SFIO
-/* #define PerlIO_xxxx() as equivalent sfio function */
-#include "perlsfio.h"
-#endif                         /* USE_SFIO */
 #endif                         /* PERLIO_IS_STDIO */
 
 #ifndef PerlIO
diff --git a/perlsfio.h b/perlsfio.h
deleted file mode 100644 (file)
index 05c81a6..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*    perlsfio.h
- *
- *    Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2005, 2007,
- *    by Larry Wall and others
- *
- *    You may distribute under the terms of either the GNU General Public
- *    License or the Artistic License, as specified in the README file.
- *
- */
-
-/* The next #ifdef should be redundant if Configure behaves ... */
-#ifndef FILE
-#define FILE FILE
-#endif
-#ifdef I_SFIO
-#include <sfio.h>
-#endif
-
-/* sfio 2000 changed _stdopen to _stdfdopen */
-#if SFIO_VERSION >= 20000101L
-#define _stdopen _stdfdopen
-#endif
-
-extern Sfio_t* _stdopen _ARG_((int, const char*));
-extern int     _stdprintf _ARG_((const char*, ...));
-
-#define PerlIO                         Sfio_t
-#define PerlIO_stderr()                        sfstderr
-#define PerlIO_stdout()                        sfstdout
-#define PerlIO_stdin()                 sfstdin
-
-#define PerlIO_isutf8(f)               0
-
-#define PerlIO_printf                  sfprintf
-#define PerlIO_stdoutf                 _stdprintf
-#define PerlIO_vprintf(f,fmt,a)                sfvprintf(f,fmt,a)
-#define PerlIO_read(f,buf,count)       sfread(f,buf,count)
-#define PerlIO_write(f,buf,count)      sfwrite(f,buf,count)
-#define PerlIO_open(path,mode)         sfopen(NULL,path,mode)
-#define PerlIO_fdopen(fd,mode)         _stdopen(fd,mode)
-#define PerlIO_reopen(path,mode,f)     sfopen(f,path,mode)
-#define PerlIO_close(f)                        sfclose(f)
-#define PerlIO_puts(f,s)               sfputr(f,s,-1)
-#define PerlIO_putc(f,c)               sfputc(f,c)
-#define PerlIO_ungetc(f,c)             sfungetc(f,c)
-#define PerlIO_getc(f)                 sfgetc(f)
-#define PerlIO_eof(f)                  sfeof(f)
-#define PerlIO_error(f)                        sferror(f)
-#define PerlIO_fileno(f)               sffileno(f)
-#define PerlIO_clearerr(f)             sfclrerr(f)
-#define PerlIO_flush(f)                        sfsync(f)
-#define PerlIO_tell(f)                 sftell(f)
-#define PerlIO_seek(f,o,w)             sfseek(f,o,w)
-#define PerlIO_rewind(f)               (void) sfseek((f),0L,0)
-#define PerlIO_tmpfile()               sftmp(0)
-#define PerlIO_exportFILE(f,fl)                Perl_croak(aTHX_ "Export to FILE * unimplemented")
-#define PerlIO_releaseFILE(p,f)                Perl_croak(aTHX_ "Release of FILE * unimplemented")
-
-#define PerlIO_setlinebuf(f)           sfset(f,SF_LINE,1)
-
-/* Now our interface to equivalent of Configure's FILE_xxx macros */
-
-#define PerlIO_has_cntptr(f)           1
-#define PerlIO_get_ptr(f)              ((f)->next)
-#define PerlIO_get_cnt(f)              ((f)->endr - (f)->next)
-#define PerlIO_canset_cnt(f)           1
-#define PerlIO_fast_gets(f)            1
-#define PerlIO_set_ptrcnt(f,p,c)       STMT_START {(f)->next = (unsigned char *)(p); assert(PerlIO_get_cnt(f) == (c));} STMT_END
-#define PerlIO_set_cnt(f,c)            STMT_START {(f)->next = (f)->endr - (c);} STMT_END
-
-#define PerlIO_has_base(f)             1
-#define PerlIO_get_base(f)             ((f)->data)
-#define PerlIO_get_bufsiz(f)           ((f)->endr - (f)->data)
-
-/*
- * Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- *
- * ex: set ts=8 sts=4 sw=4 et:
- */
index e130ed8..a7f3cc8 100644 (file)
@@ -90,14 +90,7 @@ functions which call stdio. In this case I<only> PerlIO * is a FILE *.
 This has been the default implementation since the abstraction was
 introduced in perl5.003_02.
 
-=item 2. USE_SFIO
-
-A "legacy" implementation in terms of the "sfio" library. Used for
-some specialist applications on Unix machines ("sfio" is not widely
-ported away from Unix).  Most of above are #define'd to the sfio
-functions. PerlIO * is in this case Sfio_t *.
-
-=item 3. USE_PERLIO
+=item 2. USE_PERLIO
 
 Introduced just after perl5.7.0, this is a re-implementation of the
 above abstraction which allows perl more control over how IO is done
index 72b7c7d..69423d0 100644 (file)
@@ -7883,8 +7883,7 @@ on this.
 Note that C<sysopen> depends on the fdopen() C library function.
 On many Unix systems, fdopen() is known to fail when file descriptors
 exceed a certain value, typically 255.  If you need more file
-descriptors than that, consider rebuilding Perl to use the C<sfio>
-library, or perhaps using the POSIX::open() function.
+descriptors than that, consider using the POSIX::open() function.
 
 See L<perlopentut> for a kinder, gentler explanation of opening files.
 
index a1ac2f0..b01b10e 100644 (file)
@@ -10,8 +10,7 @@ perliol - C API for Perl's implementation of IO in Layers.
 =head1 DESCRIPTION
 
 This document describes the behavior and implementation of the PerlIO
-abstraction described in L<perlapio> when C<USE_PERLIO> is defined (and
-C<USE_SFIO> is not).
+abstraction described in L<perlapio> when C<USE_PERLIO> is defined.
 
 =head2 History and Background
 
index c06e796..74a5450 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3595,7 +3595,7 @@ S_check_type_and_open(pTHX_ SV *name)
        return NULL;
     }
 
-#if !defined(PERLIO_IS_STDIO) && !defined(USE_SFIO)
+#if !defined(PERLIO_IS_STDIO)
     return PerlIO_openn(aTHX_ ":", PERL_SCRIPT_MODE, -1, 0, 0, NULL, 1, &name);
 #else
     return PerlIO_open(p, PERL_SCRIPT_MODE);
diff --git a/proto.h b/proto.h
index 6943041..32dfa1a 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -7990,7 +7990,7 @@ PERL_CALLCONV char*       Perl_sv_collxfrm_flags(pTHX_ SV *const sv, STRLEN *const nxp
        assert(sv); assert(nxp)
 
 #endif
-#if defined(USE_PERLIO) && !defined(USE_SFIO)
+#if defined(USE_PERLIO)
 PERL_CALLCONV void     Perl_PerlIO_clearerr(pTHX_ PerlIO *f);
 PERL_CALLCONV int      Perl_PerlIO_close(pTHX_ PerlIO *f);
 PERL_CALLCONV int      Perl_PerlIO_eof(pTHX_ PerlIO *f);
index 4570f89..0bbfa54 100644 (file)
@@ -19,12 +19,11 @@ use strict;
 # it here too or expect test gratuitous test failures.
 my $useperlio = defined $Config{useperlio} ? $Config{useperlio} eq 'define' ? 1 : 0 : 0;
 my $fflushNULL = defined $Config{fflushNULL} ? $Config{fflushNULL} eq 'define' ? 1 : 0 : 0;
-my $d_sfio = defined $Config{d_sfio} ? $Config{d_sfio} eq 'define' ? 1 : 0 : 0;
 my $fflushall = defined $Config{fflushall} ? $Config{fflushall} eq 'define' ? 1 : 0 : 0;
 my $d_fork = defined $Config{d_fork} ? $Config{d_fork} eq 'define' ? 1 : 0 : 0;
 
 skip_all('fflush(NULL) or equivalent not available')
-    unless $useperlio || $fflushNULL || $d_sfio || $fflushall;
+    unless $useperlio || $fflushNULL || $fflushall;
 
 plan(tests => 7);
 
index 50d589d..fdd8b99 100644 (file)
@@ -147,11 +147,10 @@ SKIP: {
       if $^O eq 'VMS';
 
     SKIP: {
-        # Sfio doesn't report failure when closing a broken pipe
+        # POSIX-BC doesn't report failure when closing a broken pipe
         # that has pending output.  Go figure.
-        # Nor does POSIX-BC.
         skip "Won't report failure on broken pipe", 1
-          if $Config{d_sfio} || $^O eq 'posix-bc';
+          if $^O eq 'posix-bc';
 
         local $SIG{PIPE} = 'IGNORE';
         open NIL, qq{|$Perl -e "exit 0"} or die "open failed: $!";
index f06d192..acf9fe8 100644 (file)
@@ -1,4 +1,4 @@
-# NOTE: this file tests how large files (>2GB) work with perlio (stdio/sfio).
+# NOTE: this file tests how large files (>2GB) work with perlio (or stdio).
 # sysopen(), sysseek(), syswrite(), sysread() are tested in t/lib/syslfs.t.
 # If you modify/add tests here, remember to update also ext/Fcntl/t/syslfs.t.
 
index 372ca90..f4cbb49 100644 (file)
@@ -389,8 +389,8 @@ __END__
 >%.0f<      >0<           >0<
 >%.0f<      >2**38<       >274877906944<   >Should have exact int'l rep'n<
 >%.0f<      >0.1<         >0<
->%.0f<      >0.6<         >1<              >Known to fail with sfio, (irix|nonstop-ux|powerux); -DHAS_LDBL_SPRINTF_BUG may fix<
->%.0f<      >-0.6<        >-1<             >Known to fail with sfio, (irix|nonstop-ux|powerux); -DHAS_LDBL_SPRINTF_BUG may fix<
+>%.0f<      >0.6<         >1<              >Known to fail with (irix|nonstop-ux|powerux); -DHAS_LDBL_SPRINTF_BUG may fix<
+>%.0f<      >-0.6<        >-1<             >Known to fail with (irix|nonstop-ux|powerux); -DHAS_LDBL_SPRINTF_BUG may fix<
 >%.0f<      >1.6<         >2<
 >%.0f<      >-1.6<        >-2<
 >%.0f<      >1<           >1<
index 110ab8d..49ef0a4 100644 (file)
@@ -29,7 +29,7 @@
 #define PERL_IN_UNIVERSAL_C
 #include "perl.h"
 
-#if defined(USE_PERLIO) && !defined(USE_SFIO)
+#if defined(USE_PERLIO)
 #include "perliol.h" /* For the PERLIO_F_XXX */
 #endif
 
@@ -1026,7 +1026,7 @@ XS(XS_PerlIO_get_layers)
     dXSARGS;
     if (items < 1 || items % 2 == 0)
        croak_xs_usage(cv, "filehandle[,args]");
-#if defined(USE_PERLIO) && !defined(USE_SFIO)
+#if defined(USE_PERLIO)
     {
        SV *    sv;
        GV *    gv;
diff --git a/util.c b/util.c
index 26a002a..e305943 100644 (file)
--- 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)
index c8aaea2..a4a4e90 100644 (file)
@@ -748,7 +748,6 @@ CORE_NOCFG_H        =               \
                ..\perl.h       \
                ..\perlapi.h    \
                ..\perlsdio.h   \
-               ..\perlsfio.h   \
                ..\perly.h      \
                ..\pp.h         \
                ..\proto.h      \
index 6a76da9..bdaeef5 100644 (file)
@@ -702,7 +702,6 @@ CORE_NOCFG_H        =               \
                ..\perl.h       \
                ..\perlapi.h    \
                ..\perlsdio.h   \
-               ..\perlsfio.h   \
                ..\perly.h      \
                ..\pp.h         \
                ..\proto.h      \
index c077544..82599a8 100644 (file)
@@ -856,7 +856,6 @@ CORE_NOCFG_H        =               \
                ..\perl.h       \
                ..\perlapi.h    \
                ..\perlsdio.h   \
-               ..\perlsfio.h   \
                ..\perly.h      \
                ..\pp.h         \
                ..\proto.h      \
index bf91b76..c708439 100644 (file)
@@ -42,7 +42,7 @@
 
 /* #include "config.h" */
 
-#if !defined(PERLIO_IS_STDIO) && !defined(USE_SFIO)
+#if !defined(PERLIO_IS_STDIO)
 #  define PerlIO FILE
 #endif
 
index 15d80f9..63147cc 100644 (file)
@@ -13,7 +13,7 @@
 
 #define PERLIO_NOT_STDIO 0
 
-#if !defined(PERLIO_IS_STDIO) && !defined(USE_SFIO)
+#if !defined(PERLIO_IS_STDIO)
 #define PerlIO FILE
 #endif