0
0
mirror of https://github.com/vim/vim.git synced 2025-10-15 07:14:09 -04:00

patch 9.1.1832: if_perl: contains references to legacy if_perlsfio

Problem:  if_perl: contains references to legacy if_perlsfio.{c,pro} and
          USE_SFIO
Solution: Remove those references (Hirohito Higashi)

fixes: #18496
closes: #18500

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Hirohito Higashi
2025-10-06 17:59:10 +00:00
committed by Christian Brabandt
parent 882452644c
commit 723f34f3de
13 changed files with 22 additions and 116 deletions

2
.github/labeler.yml vendored
View File

@@ -45,9 +45,7 @@ if_perl:
- changed-files: - changed-files:
- any-glob-to-any-file: - any-glob-to-any-file:
- 'src/if_perl.xs' - 'src/if_perl.xs'
- 'src/if_perlsfio.c'
- 'src/proto/if_perl.pro' - 'src/proto/if_perl.pro'
- 'src/proto/if_perlsfio.pro'
- 'runtime/doc/if_perl.txt' - 'runtime/doc/if_perl.txt'
if_python: if_python:

View File

@@ -550,7 +550,6 @@ SRC_DOS_UNIX = \
src/if_mzsch.c \ src/if_mzsch.c \
src/if_mzsch.h \ src/if_mzsch.h \
src/if_perl.xs \ src/if_perl.xs \
src/if_perlsfio.c \
src/if_python.c \ src/if_python.c \
src/if_python3.c \ src/if_python3.c \
src/if_py_both.h \ src/if_py_both.h \
@@ -561,7 +560,6 @@ SRC_DOS_UNIX = \
src/proto/if_lua.pro \ src/proto/if_lua.pro \
src/proto/if_mzsch.pro \ src/proto/if_mzsch.pro \
src/proto/if_perl.pro \ src/proto/if_perl.pro \
src/proto/if_perlsfio.pro \
src/proto/if_python.pro \ src/proto/if_python.pro \
src/proto/if_python3.pro \ src/proto/if_python3.pro \
src/proto/if_ruby.pro \ src/proto/if_ruby.pro \

View File

@@ -294,7 +294,7 @@ from CVS mirror ftp://ftp.polarhome.com/pub/cvs/SOURCE/
7.1.3 feature_OBJ = code1.obj code2.obj 7.1.3 feature_OBJ = code1.obj code2.obj
Lists objects created from source codes listed in feature_SRC Lists objects created from source codes listed in feature_SRC
Example: PERL_OBJ = if_perlsfio.obj if_perl.obj Example: PERL_OBJ = if_perl.obj
7.1.4 feature_LIB = ,OS_VMS_TCL.OPT/OPT 7.1.4 feature_LIB = ,OS_VMS_TCL.OPT/OPT

View File

@@ -1129,7 +1129,7 @@ CFLAGS = $(CFLAGS) -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"$(PERL_DLL)\"
PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl
PERL_INC = /I $(PERL_INCDIR) PERL_INC = /I $(PERL_INCDIR)
PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj PERL_OBJ = $(OUTDIR)\if_perl.obj
XSUBPP = $(PERL)\lib\ExtUtils\xsubpp XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
! IF exist($(XSUBPP)) ! IF exist($(XSUBPP))
XSUBPP = $(PERL_EXE) $(XSUBPP) XSUBPP = $(PERL_EXE) $(XSUBPP)
@@ -1647,9 +1647,6 @@ auto/if_perl.c: if_perl.xs typemap
$(OUTDIR)/if_perl.obj: $(OUTDIR) auto/if_perl.c $(INCL) $(OUTDIR)/if_perl.obj: $(OUTDIR) auto/if_perl.c $(INCL)
$(CC) $(CFLAGS_OUTDIR) $(PERL_INC) auto/if_perl.c $(CC) $(CFLAGS_OUTDIR) $(PERL_INC) auto/if_perl.c
$(OUTDIR)/if_perlsfio.obj: $(OUTDIR) if_perlsfio.c $(INCL)
$(CC) $(CFLAGS_OUTDIR) $(PERL_INC) if_perlsfio.c
$(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(MZSCHEME_INCL) $(INCL) \ $(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c $(MZSCHEME_INCL) $(INCL) \
$(MZSCHEME_EXTRA_DEP) $(MZSCHEME_EXTRA_DEP)
$(CC) $(CFLAGS_OUTDIR) if_mzsch.c \ $(CC) $(CFLAGS_OUTDIR) if_mzsch.c \

View File

@@ -359,9 +359,8 @@ LIBS =
# Perl related setup. # Perl related setup.
PERL = perl PERL = perl
PERL_DEF = ,"FEAT_PERL" PERL_DEF = ,"FEAT_PERL"
PERL_SRC = if_perlsfio.c if_perl.xs PERL_SRC = if_perl.xs
PERL_OBJ = \ PERL_OBJ = \
[.$(DEST)]if_perlsfio.obj \
[.$(DEST)]if_perl.obj [.$(DEST)]if_perl.obj
PERL_LIB = ,OS_VMS_PERL.OPT/OPT PERL_LIB = ,OS_VMS_PERL.OPT/OPT
@@ -1506,10 +1505,6 @@ lua_env :
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
errors.h globals.h errors.h globals.h
[.$(DEST)]if_perlsfio.obj : if_perlsfio.c vim.h [.$(DEST)]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
errors.h globals.h
[.$(DEST)]if_python.obj : if_python.c vim.h [.$(DEST)]config.h feature.h os_unix.h \ [.$(DEST)]if_python.obj : if_python.c vim.h [.$(DEST)]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \ ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \ gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \

View File

@@ -1620,7 +1620,7 @@ SRC = $(BASIC_SRC) \
$(RUBY_SRC) \ $(RUBY_SRC) \
$(WAYLAND_SRC) $(WAYLAND_SRC)
EXTRA_SRC = if_lua.c if_mzsch.c auto/if_perl.c if_perlsfio.c \ EXTRA_SRC = if_lua.c if_mzsch.c auto/if_perl.c \
if_python.c if_python3.c if_tcl.c if_ruby.c \ if_python.c if_python3.c if_tcl.c if_ruby.c \
gui_beval.c netbeans.c job.c channel.c \ gui_beval.c netbeans.c job.c channel.c \
$(GRESOURCE_SRC) $(GRESOURCE_SRC)
@@ -3397,9 +3397,6 @@ mzscheme_base.c:
objects/if_perl.o: auto/if_perl.c objects/if_perl.o: auto/if_perl.c
$(CCC_NF) $(PERL_CFLAGS) $(ALL_CFLAGS) $(PERL_CFLAGS_EXTRA) -o $@ auto/if_perl.c $(CCC_NF) $(PERL_CFLAGS) $(ALL_CFLAGS) $(PERL_CFLAGS_EXTRA) -o $@ auto/if_perl.c
objects/if_perlsfio.o: if_perlsfio.c
$(CCC_NF) $(PERL_CFLAGS) $(ALL_CFLAGS) $(PERL_CFLAGS_EXTRA) -o $@ if_perlsfio.c
objects/if_python.o: if_python.c if_py_both.h objects/if_python.o: if_python.c if_py_both.h
$(CCC_NF) $(PYTHON_CFLAGS) $(ALL_CFLAGS) $(PYTHON_CFLAGS_EXTRA) -o $@ if_python.c $(CCC_NF) $(PYTHON_CFLAGS) $(ALL_CFLAGS) $(PYTHON_CFLAGS_EXTRA) -o $@ if_python.c
@@ -4513,11 +4510,6 @@ objects/if_perl.o: auto/if_perl.c vim.h protodef.h auto/config.h feature.h \
beval.h proto/gui_beval.pro structs.h regexp.h gui.h \ beval.h proto/gui_beval.pro structs.h regexp.h gui.h \
libvterm/include/vterm.h libvterm/include/vterm_keycodes.h alloc.h \ libvterm/include/vterm.h libvterm/include/vterm_keycodes.h alloc.h \
ex_cmds.h spell.h proto.h globals.h errors.h ex_cmds.h spell.h proto.h globals.h errors.h
objects/if_perlsfio.o: if_perlsfio.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h \
beval.h proto/gui_beval.pro structs.h regexp.h gui.h \
libvterm/include/vterm.h libvterm/include/vterm_keycodes.h alloc.h \
ex_cmds.h spell.h proto.h globals.h errors.h
objects/if_python.o: if_python.c vim.h protodef.h auto/config.h feature.h \ objects/if_python.o: if_python.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h \ os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h \
beval.h proto/gui_beval.pro structs.h regexp.h gui.h \ beval.h proto/gui_beval.pro structs.h regexp.h gui.h \

8
src/auto/configure vendored
View File

@@ -6967,9 +6967,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
fi fi
fi fi
PERL_LIBS=$perllibs PERL_LIBS=$perllibs
PERL_SRC="auto/if_perl.c if_perlsfio.c" PERL_SRC="auto/if_perl.c"
PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o" PERL_OBJ="objects/if_perl.o"
PERL_PRO="if_perl.pro if_perlsfio.pro" PERL_PRO="if_perl.pro"
printf "%s\n" "#define FEAT_PERL 1" >>confdefs.h printf "%s\n" "#define FEAT_PERL 1" >>confdefs.h
fi fi
@@ -6995,7 +6995,7 @@ printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
if test -n "$PERL"; then if test -n "$PERL"; then
PERL_DIR="$dir" PERL_DIR="$dir"
PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE" PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a" PERL_OBJ="objects/if_perl.o $darwindir/auto/DynaLoader/DynaLoader.a"
PERL_LIBS="-L$darwindir/CORE -lperl" PERL_LIBS="-L$darwindir/CORE -lperl"
fi fi
PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'` PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`

View File

@@ -1246,9 +1246,9 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
fi fi
fi fi
PERL_LIBS=$perllibs PERL_LIBS=$perllibs
PERL_SRC="auto/if_perl.c if_perlsfio.c" PERL_SRC="auto/if_perl.c"
PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o" PERL_OBJ="objects/if_perl.o"
PERL_PRO="if_perl.pro if_perlsfio.pro" PERL_PRO="if_perl.pro"
AC_DEFINE(FEAT_PERL) AC_DEFINE(FEAT_PERL)
fi fi
fi fi
@@ -1274,7 +1274,7 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
if test -n "$PERL"; then if test -n "$PERL"; then
PERL_DIR="$dir" PERL_DIR="$dir"
PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE" PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a" PERL_OBJ="objects/if_perl.o $darwindir/auto/DynaLoader/DynaLoader.a"
PERL_LIBS="-L$darwindir/CORE -lperl" PERL_LIBS="-L$darwindir/CORE -lperl"
fi fi
dnl Perl on Mac OS X 10.5 adds "-arch" flags but these should only dnl Perl on Mac OS X 10.5 adds "-arch" flags but these should only

View File

@@ -48,7 +48,7 @@
#include <EXTERN.h> #include <EXTERN.h>
#include <perl.h> #include <perl.h>
#include <XSUB.h> #include <XSUB.h>
#if defined(PERLIO_LAYERS) && !defined(USE_SFIO) #if defined(PERLIO_LAYERS)
# include <perliol.h> # include <perliol.h>
#endif #endif
@@ -80,7 +80,6 @@ const char PL_memory_wrap[] = "panic: memory wrap";
#ifndef PROTO #ifndef PROTO
# ifndef __MINGW32__ # ifndef __MINGW32__
# include "proto/if_perl.pro" # include "proto/if_perl.pro"
# include "proto/if_perlsfio.pro"
# endif # endif
#endif #endif
@@ -324,7 +323,7 @@ typedef int perl_key;
# define Perl_av_fetch dll_Perl_av_fetch # define Perl_av_fetch dll_Perl_av_fetch
# define Perl_av_len dll_Perl_av_len # define Perl_av_len dll_Perl_av_len
# define Perl_sv_2nv_flags dll_Perl_sv_2nv_flags # define Perl_sv_2nv_flags dll_Perl_sv_2nv_flags
# if defined(PERLIO_LAYERS) && !defined(USE_SFIO) # if defined(PERLIO_LAYERS)
# define PerlIOBase_pushed dll_PerlIOBase_pushed # define PerlIOBase_pushed dll_PerlIOBase_pushed
# define PerlIO_define_layer dll_PerlIO_define_layer # define PerlIO_define_layer dll_PerlIO_define_layer
# endif # endif
@@ -497,7 +496,7 @@ static SV * (*Perl_hv_iterval)(pTHX_ HV *, HE *);
static SV** (*Perl_av_fetch)(pTHX_ AV *, SSize_t, I32); static SV** (*Perl_av_fetch)(pTHX_ AV *, SSize_t, I32);
static SSize_t (*Perl_av_len)(pTHX_ AV *); static SSize_t (*Perl_av_len)(pTHX_ AV *);
static NV (*Perl_sv_2nv_flags)(pTHX_ SV *const, const I32); static NV (*Perl_sv_2nv_flags)(pTHX_ SV *const, const I32);
# if defined(PERLIO_LAYERS) && !defined(USE_SFIO) # if defined(PERLIO_LAYERS)
static IV (*PerlIOBase_pushed)(pTHX_ PerlIO *, const char *, SV *, PerlIO_funcs *); static IV (*PerlIOBase_pushed)(pTHX_ PerlIO *, const char *, SV *, PerlIO_funcs *);
static void (*PerlIO_define_layer)(pTHX_ PerlIO_funcs *); static void (*PerlIO_define_layer)(pTHX_ PerlIO_funcs *);
# endif # endif
@@ -655,7 +654,7 @@ static struct {
{"Perl_av_fetch", (PERL_PROC*)&Perl_av_fetch}, {"Perl_av_fetch", (PERL_PROC*)&Perl_av_fetch},
{"Perl_av_len", (PERL_PROC*)&Perl_av_len}, {"Perl_av_len", (PERL_PROC*)&Perl_av_len},
{"Perl_sv_2nv_flags", (PERL_PROC*)&Perl_sv_2nv_flags}, {"Perl_sv_2nv_flags", (PERL_PROC*)&Perl_sv_2nv_flags},
# if defined(PERLIO_LAYERS) && !defined(USE_SFIO) # if defined(PERLIO_LAYERS)
{"PerlIOBase_pushed", (PERL_PROC*)&PerlIOBase_pushed}, {"PerlIOBase_pushed", (PERL_PROC*)&PerlIOBase_pushed},
{"PerlIO_define_layer", (PERL_PROC*)&PerlIO_define_layer}, {"PerlIO_define_layer", (PERL_PROC*)&PerlIO_define_layer},
# endif # endif
@@ -721,7 +720,7 @@ perl_enabled(int verbose)
} }
#endif /* DYNAMIC_PERL */ #endif /* DYNAMIC_PERL */
#if defined(PERLIO_LAYERS) && !defined(USE_SFIO) #if defined(PERLIO_LAYERS)
static void vim_IOLayer_init(void); static void vim_IOLayer_init(void);
#endif #endif
@@ -745,12 +744,7 @@ perl_init(void)
perl_parse(perl_interp, xs_init, argc, argv, 0); perl_parse(perl_interp, xs_init, argc, argv, 0);
perl_call_argv("VIM::bootstrap", (long)G_DISCARD, bootargs); perl_call_argv("VIM::bootstrap", (long)G_DISCARD, bootargs);
VIM_init(); VIM_init();
#ifdef USE_SFIO #if defined(PERLIO_LAYERS)
sfdisc(PerlIO_stdout(), sfdcnewvim());
sfdisc(PerlIO_stderr(), sfdcnewvim());
sfsetbuf(PerlIO_stdout(), NULL, 0);
sfsetbuf(PerlIO_stderr(), NULL, 0);
#elif defined(PERLIO_LAYERS)
vim_IOLayer_init(); vim_IOLayer_init();
#endif #endif
} }
@@ -1399,7 +1393,7 @@ err:
} }
} }
#if defined(PERLIO_LAYERS) && !defined(USE_SFIO) #if defined(PERLIO_LAYERS)
typedef struct { typedef struct {
struct _PerlIO base; struct _PerlIO base;
int attr; int attr;
@@ -1470,7 +1464,7 @@ vim_IOLayer_init(void)
(void)eval_pv( "binmode(STDOUT, ':Vim')" (void)eval_pv( "binmode(STDOUT, ':Vim')"
" && binmode(STDERR, ':Vim(ErrorMsg)');", 0); " && binmode(STDERR, ':Vim(ErrorMsg)');", 0);
} }
#endif /* PERLIO_LAYERS && !USE_SFIO */ #endif /* PERLIO_LAYERS */
#ifdef DYNAMIC_PERL #ifdef DYNAMIC_PERL

View File

@@ -1,66 +0,0 @@
/* vi:set ts=8 sts=4 sw=4 noet:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
* See README.txt for an overview of the Vim source code.
*/
/*
* if_perlsfio.c: Special I/O functions for Perl interface.
*/
#define _memory_h // avoid memset redeclaration
#define IN_PERL_FILE // don't include if_perl.pro from prot.h
#include "vim.h"
#if defined(USE_SFIO) || defined(PROTO)
#ifndef USE_SFIO // just generating prototypes
# define Sfio_t int
# define Sfdisc_t int
#endif
#define NIL(type) ((type)0)
static int
sfvimwrite(
Sfio_t *f, // stream involved
char *buf, // buffer to read from
int n, // number of bytes to write
Sfdisc_t *disc) // discipline
{
char_u *str;
str = vim_strnsave((char_u *)buf, n);
if (str == NULL)
return 0;
msg_split((char *)str);
vim_free(str);
return n;
}
/*
* sfdcnewnvi --
* Create Vim discipline
*/
Sfdisc_t *
sfdcnewvim(void)
{
Sfdisc_t *disc;
disc = ALLOC_ONE(Sfdisc_t);
if (disc == NULL)
return NULL;
disc->readf = (Sfread_f)NULL;
disc->writef = sfvimwrite;
disc->seekf = (Sfseek_f)NULL;
disc->exceptf = (Sfexcept_f)NULL;
return disc;
}
#endif // USE_SFIO

View File

@@ -337,7 +337,6 @@ extern char_u *vimpty_getenv(const char_u *string); // in misc2.c
# if defined(FEAT_PERL) && !defined(IN_PERL_FILE) # if defined(FEAT_PERL) && !defined(IN_PERL_FILE)
# define CV void # define CV void
# include "if_perl.pro" # include "if_perl.pro"
# include "if_perlsfio.pro"
# endif # endif
# ifdef MACOS_CONVERT # ifdef MACOS_CONVERT

View File

@@ -1,3 +0,0 @@
/* if_perlsfio.c */
int *sfdcnewvim(void);
/* vim: set ft=c : */

View File

@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1832,
/**/ /**/
1831, 1831,
/**/ /**/