This file will be built if you specify --enable-perlinterp=yes
to configure
.
The code is surrounded by #if defined(USE_SFIO)
~ #endif
.
There seems to be no mechanism to define USE_SFIO
.
When I define USE_SFIO
and build, I get an error.
$ LANG=C make CFLAGS+='-DUSE_SFIO' Starting make in the src directory. If there are problems, cd to the src directory and run make there cd src && make first make[1]: Entering directory '/home/h_east/samba/github/vim/src' gcc -c -I. -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.38/CORE -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/webp -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -DUSE_SFIO -o objects/if_perlsfio.o if_perlsfio.c if_perlsfio.c:29:5: error: unknown type name 'Sfio_t' 29 | Sfio_t *f, // stream involved | ^~~~~~ if_perlsfio.c:32:5: error: unknown type name 'Sfdisc_t' 32 | Sfdisc_t *disc) // discipline | ^~~~~~~~ if_perlsfio.c:49:5: error: unknown type name 'Sfdisc_t' 49 | Sfdisc_t * | ^~~~~~~~ if_perlsfio.c: In function 'sfdcnewvim': if_perlsfio.c:52:5: error: unknown type name 'Sfdisc_t' 52 | Sfdisc_t *disc; | ^~~~~~~~ In file included from if_perlsfio.c:16: if_perlsfio.c:54:22: error: 'Sfdisc_t' undeclared (first use in this function) 54 | disc = ALLOC_ONE(Sfdisc_t); | ^~~~~~~~ vim.h:1774:27: note: in definition of macro 'ALLOC_ONE' 1774 | #define ALLOC_ONE(type) (type *)alloc(sizeof(type)) | ^~~~ if_perlsfio.c:54:22: note: each undeclared identifier is reported only once for each function it appears in 54 | disc = ALLOC_ONE(Sfdisc_t); | ^~~~~~~~ vim.h:1774:27: note: in definition of macro 'ALLOC_ONE' 1774 | #define ALLOC_ONE(type) (type *)alloc(sizeof(type)) | ^~~~ vim.h:1774:33: error: expected expression before ')' token 1774 | #define ALLOC_ONE(type) (type *)alloc(sizeof(type)) | ^ if_perlsfio.c:54:12: note: in expansion of macro 'ALLOC_ONE' 54 | disc = ALLOC_ONE(Sfdisc_t); | ^~~~~~~~~ if_perlsfio.c:58:9: error: request for member 'readf' in something not a structure or union 58 | disc->readf = (Sfread_f)NULL; | ^~ if_perlsfio.c:58:20: error: 'Sfread_f' undeclared (first use in this function); did you mean 'fread'? 58 | disc->readf = (Sfread_f)NULL; | ^~~~~~~~ | fread if_perlsfio.c:59:9: error: request for member 'writef' in something not a structure or union 59 | disc->writef = sfvimwrite; | ^~ if_perlsfio.c:59:20: error: 'sfvimwrite' undeclared (first use in this function); did you mean 'vim_write'? 59 | disc->writef = sfvimwrite; | ^~~~~~~~~~ | vim_write if_perlsfio.c:60:9: error: request for member 'seekf' in something not a structure or union 60 | disc->seekf = (Sfseek_f)NULL; | ^~ if_perlsfio.c:60:20: error: 'Sfseek_f' undeclared (first use in this function); did you mean 'fseeko'? 60 | disc->seekf = (Sfseek_f)NULL; | ^~~~~~~~ | fseeko if_perlsfio.c:61:9: error: request for member 'exceptf' in something not a structure or union 61 | disc->exceptf = (Sfexcept_f)NULL; | ^~ if_perlsfio.c:61:22: error: 'Sfexcept_f' undeclared (first use in this function); did you mean 'except_T'? 61 | disc->exceptf = (Sfexcept_f)NULL; | ^~~~~~~~~~ | except_T make[1]: *** [Makefile:3375: objects/if_perlsfio.o] Error 1
USE_SFIO
There is little information when searching online, but the following site came up.
https://linux.die.net/man/1/perlapio
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 *.
I could not find Sfio_t
in the Perl-related system header files in my environment (Ubuntu 25.04).
Q. Would it be better to delete src/if_perlsfio.c
, which seems to be legacy, and delete the USE_SFIO
references in src/if_perl.xs
?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Closed #18496 as completed via 723f34f.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.