4848#include <EXTERN.h>
4949#include <perl.h>
5050#include <XSUB.h>
51- #if defined(PERLIO_LAYERS ) && !defined( USE_SFIO )
51+ #if defined(PERLIO_LAYERS )
5252# include <perliol.h>
5353#endif
5454
@@ -80,7 +80,6 @@ const char PL_memory_wrap[] = "panic: memory wrap";
8080#ifndef PROTO
8181# ifndef __MINGW32__
8282# include "proto/if_perl.pro"
83- # include "proto/if_perlsfio.pro"
8483# endif
8584#endif
8685
@@ -324,7 +323,7 @@ typedef int perl_key;
324323# define Perl_av_fetch dll_Perl_av_fetch
325324# define Perl_av_len dll_Perl_av_len
326325# define Perl_sv_2nv_flags dll_Perl_sv_2nv_flags
327- # if defined(PERLIO_LAYERS ) && !defined( USE_SFIO )
326+ # if defined(PERLIO_LAYERS )
328327# define PerlIOBase_pushed dll_PerlIOBase_pushed
329328# define PerlIO_define_layer dll_PerlIO_define_layer
330329# endif
@@ -497,7 +496,7 @@ static SV * (*Perl_hv_iterval)(pTHX_ HV *, HE *);
497496static SV * * (* Perl_av_fetch )(pTHX_ AV * , SSize_t , I32 );
498497static SSize_t (* Perl_av_len )(pTHX_ AV * );
499498static NV (* Perl_sv_2nv_flags )(pTHX_ SV * const , const I32 );
500- # if defined(PERLIO_LAYERS ) && !defined( USE_SFIO )
499+ # if defined(PERLIO_LAYERS )
501500static IV (* PerlIOBase_pushed )(pTHX_ PerlIO * , const char * , SV * , PerlIO_funcs * );
502501static void (* PerlIO_define_layer )(pTHX_ PerlIO_funcs * );
503502# endif
@@ -655,7 +654,7 @@ static struct {
655654 {"Perl_av_fetch" , (PERL_PROC * )& Perl_av_fetch },
656655 {"Perl_av_len" , (PERL_PROC * )& Perl_av_len },
657656 {"Perl_sv_2nv_flags" , (PERL_PROC * )& Perl_sv_2nv_flags },
658- # if defined(PERLIO_LAYERS ) && ! defined ( USE_SFIO )
657+ # if defined(PERLIO_LAYERS )
659658 {"PerlIOBase_pushed" , (PERL_PROC * )& PerlIOBase_pushed },
660659 {"PerlIO_define_layer" , (PERL_PROC * )& PerlIO_define_layer },
661660# endif
@@ -721,7 +720,7 @@ perl_enabled(int verbose)
721720}
722721#endif /* DYNAMIC_PERL */
723722
724- #if defined(PERLIO_LAYERS ) && !defined( USE_SFIO )
723+ #if defined(PERLIO_LAYERS )
725724static void vim_IOLayer_init (void );
726725#endif
727726
@@ -745,12 +744,7 @@ perl_init(void)
745744 perl_parse (perl_interp , xs_init , argc , argv , 0 );
746745 perl_call_argv ("VIM::bootstrap" , (long )G_DISCARD , bootargs );
747746 VIM_init ();
748- #ifdef USE_SFIO
749- sfdisc (PerlIO_stdout (), sfdcnewvim ());
750- sfdisc (PerlIO_stderr (), sfdcnewvim ());
751- sfsetbuf (PerlIO_stdout (), NULL , 0 );
752- sfsetbuf (PerlIO_stderr (), NULL , 0 );
753- #elif defined(PERLIO_LAYERS )
747+ #if defined(PERLIO_LAYERS )
754748 vim_IOLayer_init ();
755749#endif
756750}
@@ -1399,7 +1393,7 @@ err:
13991393 }
14001394}
14011395
1402- #if defined(PERLIO_LAYERS ) && !defined( USE_SFIO )
1396+ #if defined(PERLIO_LAYERS )
14031397typedef struct {
14041398 struct _PerlIO base ;
14051399 int attr ;
@@ -1470,7 +1464,7 @@ vim_IOLayer_init(void)
14701464 (void )eval_pv ( "binmode(STDOUT, ':Vim')"
14711465 " && binmode(STDERR, ':Vim(ErrorMsg)');" , 0 );
14721466}
1473- #endif /* PERLIO_LAYERS && !USE_SFIO */
1467+ #endif /* PERLIO_LAYERS */
14741468
14751469#ifdef DYNAMIC_PERL
14761470
0 commit comments