In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/7ff1117359e03ce00638e9ee1daad537321e75d6?hp=fb177060d22211d76166a17b30fa8fd7880b2d76>
- Log ----------------------------------------------------------------- commit 7ff1117359e03ce00638e9ee1daad537321e75d6 Merge: fb17706 61d9d36 Author: Nicholas Clark <[email protected]> Date: Fri Dec 27 16:22:45 2013 +0100 Merge the sfio removal to blead. commit 61d9d3620e681c533afc54123fbfaeeda15db491 Author: Nicholas Clark <[email protected]> Date: Fri Dec 27 16:20:08 2013 +0100 Add the removal of the sfio support to perldelta. Given that this code no longer works, it doesn't feel important to list it in the headlines. It's not clear where the best section for it is. M pod/perldelta.pod commit 0b39d4dc4ab8382898c5a64491df5ec27b73c197 Author: Nicholas Clark <[email protected]> Date: Tue Dec 10 19:32:59 2013 +0100 Purge sfio support from configure.com, Configure and related files. Most of these are actually generated, so the maintenance complexity reduction is not as impressive as the diffstat suggests. (Incorporating a fix from Merijn) M Configure M Cross/config.sh-arm-linux M Cross/config.sh-arm-linux-n770 M NetWare/config.wc M NetWare/config_H.wc M Porting/Glossary M Porting/config.sh M Porting/config_H M config_h.SH M configure.com M cpan/Config-Perl-V/t/20_plv510.t M cpan/Config-Perl-V/t/21_plv518.t M myconfig.SH M plan9/config.plan9 M plan9/config_h.sample M plan9/config_sh.sample M symbian/config.sh M uconfig.h M uconfig.sh M uconfig64.sh M win32/config.ce M win32/config.gc M win32/config.vc M win32/config_H.ce M win32/config_H.gc M win32/config_H.vc commit 97cb92d6c0700e9454bd4ae6d4ab867918bf7861 Author: Nicholas Clark <[email protected]> Date: Mon Dec 9 22:18:22 2013 +0100 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. M MANIFEST M NetWare/Makefile M configpm M doio.c M embed.fnc M embed.h M ext/PerlIO-encoding/encoding.pm M ext/PerlIO-encoding/encoding.xs M makedef.pl M perl.h M perlio.c M perlio.h D perlsfio.h M pod/perlapio.pod M pod/perlfunc.pod M pod/perliol.pod M pp_ctl.c M proto.h M t/io/fflush.t M t/io/pipe.t M t/op/lfs.t M t/op/sprintf.t M universal.c M util.c M win32/Makefile M win32/Makefile.ce M win32/makefile.mk M win32/win32.c M win32/wince.c commit b122cba11755f8bed9555c4070f718e5321f3c79 Author: Nicholas Clark <[email protected]> Date: Mon Dec 9 09:15:10 2013 +0100 Fix sfio breakage caused by the fix for RT #78494. Commit 2e0cfa16dea85dd3 (Feb 2011) fixed RT #78494, but inadvertently broke non-PerlIO configurations. -Uuseperlio was restored in March 2011 with commit b6ae43b72863e12d, but this change is needed to restore the sfio build. This is the last fix needed to get blead building with -Dusesfio, after 10 years of breakage. However, many many tests still fail (and one hangs). Note, specifically this is only tested with sfio97. Perl is making a couple of cheating assumptions which break with sfio2005, and I've not attempted to fix Perl's naughtiness to get it to build with current sfio. (Nor has anyone else in the past 8 years, it would seem. Or even reported a problem.) M util.c commit d183113e9d20c519bfcbd56d436133db3e6a9ec1 Author: Nicholas Clark <[email protected]> Date: Sun Dec 8 21:50:53 2013 +0100 Fix a typo introduced in Nov 2008 by commit 4ee3916907333148. One use of dSAVE_ERRNO was mistyped as dSAVED_ERRNO, but as it was in the sfio-only code it was not spotted. M util.c commit 9de9bf34317749e7963a8f3864bd26ca879c1a5b Author: Nicholas Clark <[email protected]> Date: Sun Dec 8 21:11:46 2013 +0100 Fix sfio breakage caused by the addition of PERLIO_TERM in Oct 2006. Commit 6cb8cb214e85c7d6 in Oct 2006 added a new macro PERLIO_TERM, but didn't provide an appropriate definition for the sfio build. Commit 6b29934bd65555b7 (also Oct 2006) plus this change provides a working PERLIO_TERM for sfio. M perl.h commit e4fb8e2ded39e7068dc433a1346c20813c8c8e5c Author: Nicholas Clark <[email protected]> Date: Sun Dec 8 19:15:25 2013 +0100 Fix sfio breakage in PerlIO_findFILE() caused by commit de009b76d60bdeb8. One hunk of commit de009b76d60bdeb8 (April 2005) makes a variable const, which is then assigned to. This is in sfio-specific code, so was not noticed. This change was merged to maint-5.8 as part of commit f1c3982b668c9e30 (Sep 2005). M perlio.c commit 0956f45d301b882c591ec0cc6017e669fb465887 Author: Nicholas Clark <[email protected]> Date: Sun Dec 8 18:47:54 2013 +0100 Also build PerlIO_get_layers with -Dusesfio This extends patch 5fef3b4a7f0c97d3 from April 2003 from fixing the stdio-only build to also fix the sfio build, which was broken when PerlIO_get_layers was added (2 commits previously, 39f7a87036eb8d13). Without this fix, perl would refuse to build with -Dusesfio. Given that 39f7a87036eb8d13 was merged to maint-5.8, this means that the -Dusesfio build was broken for v5.8.1 and later on that branch, as well as for v5.10.0 and all subsequent releases. Given that in the past 10 years, no-one has reported this, it's safe to assume that no-one considers sfio support to be important. M universal.c ----------------------------------------------------------------------- Summary of changes: Configure | 86 +--------------------------------------- Cross/config.sh-arm-linux | 5 +-- Cross/config.sh-arm-linux-n770 | 5 +-- MANIFEST | 1 - NetWare/Makefile | 1 - NetWare/config.wc | 3 -- NetWare/config_H.wc | 12 ------ Porting/Glossary | 15 ------- Porting/config.sh | 5 +-- Porting/config_H | 12 ------ config_h.SH | 12 ------ configpm | 4 +- configure.com | 34 ---------------- cpan/Config-Perl-V/t/20_plv510.t | 1 - cpan/Config-Perl-V/t/21_plv518.t | 1 - doio.c | 7 ---- embed.fnc | 2 +- embed.h | 2 +- ext/PerlIO-encoding/encoding.pm | 2 +- ext/PerlIO-encoding/encoding.xs | 2 +- makedef.pl | 84 +-------------------------------------- myconfig.SH | 1 - perl.h | 13 +----- perlio.c | 74 +--------------------------------- perlio.h | 13 +----- perlsfio.h | 83 -------------------------------------- plan9/config.plan9 | 12 ------ plan9/config_h.sample | 12 ------ plan9/config_sh.sample | 5 +-- pod/perlapio.pod | 9 +---- pod/perldelta.pod | 16 ++++++++ pod/perlfunc.pod | 3 +- pod/perliol.pod | 3 +- pp_ctl.c | 2 +- proto.h | 2 +- symbian/config.sh | 3 -- t/io/fflush.t | 3 +- t/io/pipe.t | 5 +-- t/op/lfs.t | 2 +- t/op/sprintf.t | 4 +- uconfig.h | 16 +------- uconfig.sh | 3 -- uconfig64.sh | 3 -- universal.c | 4 +- util.c | 13 ++---- win32/Makefile | 1 - win32/Makefile.ce | 1 - win32/config.ce | 3 -- win32/config.gc | 3 -- win32/config.vc | 3 -- win32/config_H.ce | 12 ------ win32/config_H.gc | 12 ------ win32/config_H.vc | 12 ------ win32/makefile.mk | 1 - win32/win32.c | 2 +- win32/wince.c | 2 +- 56 files changed, 54 insertions(+), 598 deletions(-) delete mode 100644 perlsfio.h diff --git a/Configure b/Configure index 854ed8f..9c89339 100755 --- a/Configure +++ b/Configure @@ -706,8 +706,6 @@ d_setservent_r='' setservent_r_proto='' d_setsid='' d_setvbuf='' -d_sfio='' -usesfio='' d_shm='' d_shmat='' d_shmatprototype='' @@ -931,7 +929,6 @@ d_pwgecos='' d_pwpasswd='' d_pwquota='' i_pwd='' -i_sfio='' i_shadow='' i_socks='' i_stdbool='' @@ -1378,7 +1375,7 @@ libswanted_uselargefiles='' : set usesocks on the Configure command line to enable socks. : List of libraries we want. : If anyone needs extra -lxxx, put those in a hint file. -libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun" +libswanted="socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun" libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD" : We probably want to search /usr/shlib before most other libraries. : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. @@ -5330,20 +5327,7 @@ if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; t xxx=`$run ./try` case "$xxx" in "Ok") dflt=n ;; - *) echo 'The program compiled OK, but produced no output.' >> try.msg - case " $libs " in - *" -lsfio "*) - cat >> try.msg <<'EOQS' -If $libs contains -lsfio, and sfio is mis-configured, then it -sometimes (apparently) runs and exits with a 0 status, but with no -output! It may have to do with sfio's use of _exit vs. exit. - -EOQS - rp="You have a big problem. Shall I abort Configure" - dflt=y - ;; - esac - ;; + *) echo 'The program compiled OK, but produced no output.' >> try.msg ;; esac else echo "The program compiled OK, but exited with status $?." >>try.msg @@ -17421,69 +17405,6 @@ eval $inlibc set setvbuf d_setvbuf eval $inlibc -: see if sfio.h is available -set sfio.h i_sfio -eval $inhdr - -: see if sfio library is available -case "$i_sfio" in -$define) - val='' - set sfreserve val - eval $inlibc - ;; -*) - val="$undef" - ;; -esac -: Ok, but do we want to use it. -case "$val" in -$define) - case "$usesfio" in - true|$define|[yY]*) dflt='y';; - *) dflt='n';; - esac - echo "$package can use the sfio library, but it is experimental." - rp="You seem to have sfio available, do you want to try using it?" - . ./myread - case "$ans" in - y|Y) echo "Ok, turning on sfio then." - val="$define" - ;; - *) echo "Ok, avoiding sfio this time. I'll use stdio instead." - val="$undef" - ;; - esac - ;; -*) case "$usesfio" in - true|$define|[yY]*) - echo "Sorry, cannot find sfio on this machine." >&4 - echo "Ignoring your setting of usesfio=$usesfio." >&4 - val="$undef" - ;; - esac - ;; -esac -set d_sfio -eval $setvar -case "$d_sfio" in -$define) usesfio='true';; -*) usesfio='false';; -esac -case "$d_sfio" in -$define) ;; -*) : Remove sfio from list of libraries to use - case "$libs" in - *-lsfio*) - echo "Removing unneeded -lsfio from library list" >&4 - set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'` - shift - libs="$*" - echo "libs = $libs" >&4 - ;; - esac -;; -esac : see if shmctl exists @@ -23112,7 +23033,6 @@ d_setsent='$d_setsent' d_setservent_r='$d_setservent_r' d_setsid='$d_setsid' d_setvbuf='$d_setvbuf' -d_sfio='$d_sfio' d_shm='$d_shm' d_shmat='$d_shmat' d_shmatprototype='$d_shmatprototype' @@ -23350,7 +23270,6 @@ i_prot='$i_prot' i_pthread='$i_pthread' i_pwd='$i_pwd' i_rpcsvcdbm='$i_rpcsvcdbm' -i_sfio='$i_sfio' i_sgtty='$i_sgtty' i_shadow='$i_shadow' i_socks='$i_socks' @@ -23723,7 +23642,6 @@ useperlio='$useperlio' useposix='$useposix' usereentrant='$usereentrant' userelocatableinc='$userelocatableinc' -usesfio='$usesfio' useshrplib='$useshrplib' usesitecustomize='$usesitecustomize' usesocks='$usesocks' diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index 0cbf8c0..d7ea683 100644 --- a/Cross/config.sh-arm-linux +++ b/Cross/config.sh-arm-linux @@ -439,7 +439,6 @@ d_setsent='define' d_setservent_r='undef' d_setsid='define' d_setvbuf='define' -d_sfio='undef' d_shm='define' d_shmat='define' d_shmatprototype='define' @@ -676,7 +675,6 @@ i_prot='undef' i_pthread='define' i_pwd='define' i_rpcsvcdbm='undef' -i_sfio='undef' i_sgtty='undef' i_shadow='define' i_socks='undef' @@ -780,7 +778,7 @@ libsdirs=' /usr/lib' libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so' libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so' libspath=' /usr/local/lib /lib /usr/lib' -libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun m crypt sec util c cposix posix ucb BSD' +libswanted='socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun m crypt sec util c cposix posix ucb BSD' libswanted_uselargefiles='' line='' lint='' @@ -1043,7 +1041,6 @@ useperlio='define' useposix='true' usereentrant='undef' userelocatableinc='undef' -usesfio='false' useshrplib='true' usesitecustomize='undef' usesocks='undef' diff --git a/Cross/config.sh-arm-linux-n770 b/Cross/config.sh-arm-linux-n770 index e3aaf0b..158252d 100644 --- a/Cross/config.sh-arm-linux-n770 +++ b/Cross/config.sh-arm-linux-n770 @@ -416,7 +416,6 @@ d_setsent='define' d_setservent_r='undef' d_setsid='define' d_setvbuf='define' -d_sfio='undef' d_shm='define' d_shmat='define' d_shmatprototype='define' @@ -648,7 +647,6 @@ i_prot='undef' i_pthread='define' i_pwd='define' i_rpcsvcdbm='undef' -i_sfio='undef' i_sgtty='undef' i_shadow='define' i_socks='undef' @@ -751,7 +749,7 @@ libsdirs=' /usr/lib' libsfiles=' libnsl.so libdl.so libm.so libcrypt.so libutil.so libc.so' libsfound=' /usr/lib/libnsl.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so' libspath=' /usr/local/lib /lib /usr/lib' -libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun m crypt sec util c cposix posix ucb BSD' +libswanted='socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun m crypt sec util c cposix posix ucb BSD' libswanted_uselargefiles='' line='' lint='' @@ -1004,7 +1002,6 @@ useperlio='define' useposix='true' usereentrant='undef' userelocatableinc='undef' -usesfio='false' useshrplib='true' usesitecustomize='undef' usesocks='undef' diff --git a/MANIFEST b/MANIFEST index 23fa143..5f2bab1 100644 --- 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) diff --git a/NetWare/Makefile b/NetWare/Makefile index 8691bf4..a002f3f 100644 --- a/NetWare/Makefile +++ b/NetWare/Makefile @@ -764,7 +764,6 @@ CORE_NOCFG_H = \ ..\perl.h \ ..\perlapi.h \ ..\perlsdio.h \ - ..\perlsfio.h \ ..\perly.h \ ..\pp.h \ ..\proto.h \ diff --git a/NetWare/config.wc b/NetWare/config.wc index 033f46e..151d8af 100644 --- a/NetWare/config.wc +++ b/NetWare/config.wc @@ -429,7 +429,6 @@ d_setservent_r='undef' d_setsid='undef' d_setspent='undef' d_setvbuf='define' -d_sfio='undef' d_shm='undef' d_shmat='undef' d_shmatprototype='undef' @@ -658,7 +657,6 @@ i_prot='undef' i_pthread='undef' i_pwd='undef' i_rpcsvcdbm='define' -i_sfio='undef' i_sgtty='undef' i_shadow='undef' i_socks='undef' @@ -1006,7 +1004,6 @@ useperlio='undef' useposix='true' usereentrant='undef' userelocatableinc='undef' -usesfio='false' useshrplib='true' usesitecustomize='undef' usesocks='undef' diff --git a/NetWare/config_H.wc b/NetWare/config_H.wc index 6501733..64f9067 100644 --- a/NetWare/config_H.wc +++ b/NetWare/config_H.wc @@ -784,12 +784,6 @@ */ #define I_NETINET_IN /**/ -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include <sfio.h>. - */ -/*#define I_SFIO /**/ - /* I_STDDEF: * This symbol, if defined, indicates that <stddef.h> exists and should * be included. @@ -1959,12 +1953,6 @@ */ #define HAS_SETVBUF /**/ -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -/*#define USE_SFIO /**/ - /* HAS_SHM: * This symbol, if defined, indicates that the entire shm*(2) library is * supported. diff --git a/Porting/Glossary b/Porting/Glossary index e7523ae..c0d98ea 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -2047,10 +2047,6 @@ d_setvbuf (d_setvbuf.U): indicates to the C program that the setvbuf() routine is available to change buffering on an open stdio stream. -d_sfio (d_sfio.U): - This variable conditionally defines the USE_SFIO symbol, - and indicates whether sfio is available (and should be used). - d_shm (d_shm.U): This variable conditionally defines the HAS_SHM symbol, which indicates that the entire shm*(2) library is present. @@ -3162,10 +3158,6 @@ i_rpcsvcdbm (i_dbm.U): indicates to the C program that <rpcsvc/dbm.h> exists and should be included. Some System V systems might need this instead of <dbm.h>. -i_sfio (i_sfio.U): - This variable conditionally defines the I_SFIO symbol, - and indicates whether a C program should include <sfio.h>. - i_sgtty (i_termio.U): This variable conditionally defines the I_SGTTY symbol, which indicates to the C program that it should include <sgtty.h> rather @@ -5122,13 +5114,6 @@ userelocatableinc (bin.U): containing the perl binary, and a logical cleanup of the path is then made around the join point (removing "dir/../" pairs) -usesfio (d_sfio.U): - This variable is set to true when the user agrees to use sfio. - It is set to false when sfio is not available or when the user - explicitly requests not to use sfio. It is here primarily so - that command-line settings can override the auto-detection of - d_sfio without running into a "WHOA THERE". - useshrplib (libperl.U): This variable is set to 'true' if the user wishes to build a shared libperl, and 'false' otherwise. diff --git a/Porting/config.sh b/Porting/config.sh index d8e3ae6..e0ce05a 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -449,7 +449,6 @@ d_setsent='define' d_setservent_r='undef' d_setsid='define' d_setvbuf='define' -d_sfio='undef' d_shm='define' d_shmat='define' d_shmatprototype='define' @@ -687,7 +686,6 @@ i_prot='undef' i_pthread='define' i_pwd='define' i_rpcsvcdbm='undef' -i_sfio='undef' i_sgtty='undef' i_shadow='define' i_socks='undef' @@ -793,7 +791,7 @@ libsdirs=' /usr/lib' libsfiles=' libnsl.so libgdbm.so libdb.so libdl.so libm.so libcrypt.so libutil.so libc.so libgdbm_compat.so' libsfound=' /usr/lib/libnsl.so /usr/lib/libgdbm.so /usr/lib/libdb.so /usr/lib/libdl.so /usr/lib/libm.so /usr/lib/libcrypt.so /usr/lib/libutil.so /usr/lib/libc.so /usr/lib/libgdbm_compat.so' libspath=' /pro/local/lib /lib /usr/lib /usr/local/lib' -libswanted='sfio socket inet nsl nm gdbm dbm db malloc dl ld sun m crypt sec util c cposix posix ucb BSD gdbm_compat' +libswanted='socket inet nsl nm gdbm dbm db malloc dl ld sun m crypt sec util c cposix posix ucb BSD gdbm_compat' libswanted_uselargefiles='' line='' lint='' @@ -1060,7 +1058,6 @@ useperlio='define' useposix='true' usereentrant='undef' userelocatableinc='undef' -usesfio='false' useshrplib='false' usesitecustomize='undef' usesocks='undef' diff --git a/Porting/config_H b/Porting/config_H index e048329..6843838 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -707,12 +707,6 @@ */ #define I_NETINET_IN /**/ -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include <sfio.h>. - */ -/*#define I_SFIO / **/ - /* I_STDBOOL: * This symbol, if defined, indicates that <stdbool.h> exists and should * be included. @@ -3666,12 +3660,6 @@ */ /*#define HAS_SETPROCTITLE / **/ -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -/*#define USE_SFIO / **/ - /* HAS_SIGNBIT: * This symbol, if defined, indicates that the signbit routine is * available to check if the given number has the sign bit set. diff --git a/config_h.SH b/config_h.SH index 4cb1684..c56867b 100755 --- a/config_h.SH +++ b/config_h.SH @@ -738,12 +738,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$i_niin I_NETINET_IN /**/ -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include <sfio.h>. - */ -#$i_sfio I_SFIO /**/ - /* I_STDDEF: * This symbol, if defined, indicates that <stddef.h> exists and should * be included. @@ -3927,12 +3921,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_setproctitle HAS_SETPROCTITLE /**/ -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -#$d_sfio USE_SFIO /**/ - /* HAS_SIGNBIT: * This symbol, if defined, indicates that the signbit routine is * available to check if the given number has the sign bit set. diff --git a/configpm b/configpm index fbc4710..cf105ba 100755 --- 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/configure.com b/configure.com index c9afdc7..6135dfa 100644 --- a/configure.com +++ b/configure.com @@ -4454,38 +4454,6 @@ $ tmp = "setvbuf" $ GOSUB inlibc $ d_setvbuf = tmp $! -$! see if sfio.h is available -$! see if sfio library is available -$! Ok, but do we want to use it. -$! IF F$TYPE(usesfio) .EQS. "" THEN usesfio = "undef" -$! IF val .EQS. "define" -$! THEN -$! IF usesfio .EQS. "define" -$! THEN dflt = "y" -$! ELSE dflt = "n" -$! ENDIF -$! echo "''package' can use the sfio library, but it is experimental." -$! rp="You seem to have sfio available, do you want to try using it? [''dflt'] " -$! GOSUB myread -$! IF ans .EQS. "" THEN ans = dflt -$! IF ans -$! THEN -$! echo "Ok, turning on sfio then." -$! val="define" -$! ELSE -$! echo "Ok, avoiding sfio this time. I'll use stdio instead." -$! val="undef" -$! ENDIF -$! ELSE -$! IF usesfio .EQS. "define" -$! THEN -$! echo4 "Sorry, cannot find sfio on this machine." -$! echo4 "Ignoring your setting of usesfio=''usesfio'." -$! val="undef" -$! ENDIF -$! ENDIF -$! -$! $! Check for the shm* routines. $! $ OS @@ -6272,7 +6240,6 @@ $ WC "d_setruid='undef'" $ WC "d_setsent='" + d_setsent + "'" $ WC "d_setsid='" + d_setsid + "'" $ WC "d_setvbuf='" + d_setvbuf + "'" -$ WC "d_sfio='undef'" $ WC "d_shm='" + d_shm + "'" $ WC "d_shmat='" + d_shmat + "'" $ WC "d_shmatprototype='" + d_shmatprototype + "'" @@ -6480,7 +6447,6 @@ $ WC "i_prot='undef'" $ WC "i_pthread='define'" $ WC "i_pwd='undef'" $ WC "i_rpcsvcdbm='undef'" -$ WC "i_sfio='undef'" $ WC "i_sgtty='undef'" $ WC "i_shadow='" + i_shadow + "'" $ WC "i_socks='" + i_socks + "'" diff --git a/cpan/Config-Perl-V/t/20_plv510.t b/cpan/Config-Perl-V/t/20_plv510.t index 4b1e267..5deb789 100644 --- a/cpan/Config-Perl-V/t/20_plv510.t +++ b/cpan/Config-Perl-V/t/20_plv510.t @@ -32,7 +32,6 @@ Summary of my perl5 (revision 5 version 10 subversion 0) configuration: config_args='-Duse64bitint -des' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef - useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: diff --git a/cpan/Config-Perl-V/t/21_plv518.t b/cpan/Config-Perl-V/t/21_plv518.t index ed0a2a6..298ef2d 100644 --- a/cpan/Config-Perl-V/t/21_plv518.t +++ b/cpan/Config-Perl-V/t/21_plv518.t @@ -61,7 +61,6 @@ Summary of my perl5 (revision 5 version 18 subversion 0) configuration: config_args='-Duse64bitint -Duselongdouble -des' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef - useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=define usemymalloc=n, bincompat5005=undef Compiler: diff --git a/doio.c b/doio.c index fe74cc9..86f366a 100644 --- 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 diff --git a/embed.fnc b/embed.fnc index 2b82824..42ab356 100644 --- 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 --- a/embed.h +++ b/embed.h @@ -822,7 +822,7 @@ #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) diff --git a/ext/PerlIO-encoding/encoding.pm b/ext/PerlIO-encoding/encoding.pm index e3291a5..8d39ed9 100644 --- a/ext/PerlIO-encoding/encoding.pm +++ b/ext/PerlIO-encoding/encoding.pm @@ -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"; diff --git a/ext/PerlIO-encoding/encoding.xs b/ext/PerlIO-encoding/encoding.xs index f522ef1..fababd1 100644 --- a/ext/PerlIO-encoding/encoding.xs +++ b/ext/PerlIO-encoding/encoding.xs @@ -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. diff --git a/makedef.pl b/makedef.pl index 5c49859..c97fdc4 100644 --- a/makedef.pl +++ b/makedef.pl @@ -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/myconfig.SH b/myconfig.SH index eafc458..1808392 100755 --- a/myconfig.SH +++ b/myconfig.SH @@ -37,7 +37,6 @@ Summary of my $package (revision $revision $version_patchlevel_string) configura config_args='$config_args' hint=$hint, useposix=$useposix, d_sigaction=$d_sigaction useithreads=$useithreads, usemultiplicity=$usemultiplicity - useperlio=$useperlio, d_sfio=$d_sfio, uselargefiles=$uselargefiles, usesocks=$usesocks use64bitint=$use64bitint, use64bitall=$use64bitall, uselongdouble=$uselongdouble usemymalloc=$usemymalloc, bincompat5005=undef Compiler: diff --git a/perl.h b/perl.h index 2d611e9..f245ad9 100644 --- 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 -#ifdef USE_PERLIO +#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 diff --git a/perlio.c b/perlio.c index d89b9bb..5d41e76 100644 --- 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 * const 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) diff --git a/perlio.h b/perlio.h index 34968c3..777c886 100644 --- a/perlio.h +++ b/perlio.h @@ -21,13 +21,7 @@ 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. @@ -80,11 +74,6 @@ #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 index 05c81a6..0000000 --- a/perlsfio.h +++ /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: - */ diff --git a/plan9/config.plan9 b/plan9/config.plan9 index 1508fab..5820e9c 100644 --- a/plan9/config.plan9 +++ b/plan9/config.plan9 @@ -782,12 +782,6 @@ */ #define I_NETINET_IN /* config-skip */ -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include <sfio.h>. - */ -/*#define I_SFIO / **/ - /* I_STDDEF: * This symbol, if defined, indicates that <stddef.h> exists and should * be included. @@ -2318,12 +2312,6 @@ */ #define HAS_SETVBUF /**/ -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -/*#define USE_SFIO / **/ - /* HAS_SHM: * This symbol, if defined, indicates that the entire shm*(2) library is * supported. diff --git a/plan9/config_h.sample b/plan9/config_h.sample index b0876b8..2632187 100644 --- a/plan9/config_h.sample +++ b/plan9/config_h.sample @@ -746,12 +746,6 @@ */ #define I_NETINET_IN /**/ -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include <sfio.h>. - */ -/*#define I_SFIO / **/ - /* I_STDDEF: * This symbol, if defined, indicates that <stddef.h> exists and should * be included. @@ -2271,12 +2265,6 @@ */ #define HAS_SETVBUF /**/ -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -/*#define USE_SFIO / **/ - /* HAS_SHM: * This symbol, if defined, indicates that the entire shm*(2) library is * supported. diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample index cfc1bd2..778992f 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -439,7 +439,6 @@ d_setsent='undef' d_setservent_r='undef' d_setsid='define' d_setvbuf='define' -d_sfio='undef' d_shm='undef' d_shmat='undef' d_shmatprototype='undef' @@ -670,7 +669,6 @@ i_prot='undef' i_pthread='undef' i_pwd='define' i_rpcsvcdbm='undef' -i_sfio='undef' i_sgtty='undef' i_shadow='undef' i_socks='undef' @@ -762,7 +760,7 @@ libsdirs='' libsfiles='' libsfound='' libspath=' /lib' -libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun m c cposix posix ndir dir crypt sec ucb bsd BSD PW x util' +libswanted='socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun m c cposix posix ndir dir crypt sec ucb bsd BSD PW x util' libswanted_uselargefiles='' line='' lint='' @@ -1014,7 +1012,6 @@ useperlio='define' useposix='true' usereentrant='undef' userelocatableinc='undef' -usesfio='false' useshrplib='false' usesitecustomize='undef' usesocks='undef' diff --git a/pod/perlapio.pod b/pod/perlapio.pod index e130ed8..a7f3cc8 100644 --- a/pod/perlapio.pod +++ b/pod/perlapio.pod @@ -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 diff --git a/pod/perldelta.pod b/pod/perldelta.pod index a167726..5c4c982 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -272,6 +272,22 @@ XXX Any changes to platform support should be listed in the sections below. [ Within the sections, list each platform as a =item entry with specific changes as paragraphs below it. ] +=over 4 + +=item * + +Code related to supporting C<sfio> has been removed. + +Perl 5.004 added support to use the native API of C<sfio>, AT&T's Safe/Fast +I/O library. This code still built with v5.8.0, albeit with many regression +tests failing, but was inadvertently broken before the v5.8.1 release, +meaning that it has not worked on any version of Perl released since then. +In over a decade we have received no bug reports about this, hence it is clear +that no-one is using this functionality on any version of Perl that is still +supported to any degree. + +=back + =head2 New Platforms XXX List any platforms that this version of perl compiles on, that previous diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 72b7c7d..69423d0 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -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. diff --git a/pod/perliol.pod b/pod/perliol.pod index a1ac2f0..b01b10e 100644 --- a/pod/perliol.pod +++ b/pod/perliol.pod @@ -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 diff --git a/pp_ctl.c b/pp_ctl.c index c06e796..74a5450 100644 --- 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 --- 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); diff --git a/symbian/config.sh b/symbian/config.sh index 4e45ce1..1f85eee 100644 --- a/symbian/config.sh +++ b/symbian/config.sh @@ -385,7 +385,6 @@ d_setsent='undef' d_setservent_r='undef' d_setsid='undef' d_setvbuf='define' -d_sfio='undef' d_shm='undef' d_shmat='undef' d_shmatprototype='undef' @@ -597,7 +596,6 @@ i_prot='undef' i_pthread='undef' i_pwd='define' i_rpcsvcdbm='undef' -i_sfio='undef' i_sgtty='undef' i_shadow='undef' i_socks='undef' @@ -829,7 +827,6 @@ useperlio='define' useposix='true' usereentrant='undef' userelocatableinc='undef' -usesfio='false' useshrplib='false' usesitecustomize='undef' usesocks='undef' diff --git a/t/io/fflush.t b/t/io/fflush.t index 4570f89..0bbfa54 100644 --- a/t/io/fflush.t +++ b/t/io/fflush.t @@ -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); diff --git a/t/io/pipe.t b/t/io/pipe.t index 50d589d..fdd8b99 100644 --- a/t/io/pipe.t +++ b/t/io/pipe.t @@ -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: $!"; diff --git a/t/op/lfs.t b/t/op/lfs.t index f06d192..acf9fe8 100644 --- a/t/op/lfs.t +++ b/t/op/lfs.t @@ -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. diff --git a/t/op/sprintf.t b/t/op/sprintf.t index 372ca90..f4cbb49 100644 --- a/t/op/sprintf.t +++ b/t/op/sprintf.t @@ -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< diff --git a/uconfig.h b/uconfig.h index dcba397..36dcf2e 100644 --- a/uconfig.h +++ b/uconfig.h @@ -703,12 +703,6 @@ */ /*#define I_NETINET_IN / **/ -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include <sfio.h>. - */ -/*#define I_SFIO / **/ - /* I_STDDEF: * This symbol, if defined, indicates that <stddef.h> exists and should * be included. @@ -3892,12 +3886,6 @@ */ /*#define HAS_SETPROCTITLE / **/ -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -/*#define USE_SFIO / **/ - /* HAS_SIGNBIT: * This symbol, if defined, indicates that the signbit routine is * available to check if the given number has the sign bit set. @@ -4730,6 +4718,6 @@ #endif /* Generated from: - * a5419b542988f62ae47b915c24316f8127992c16da312dc275d2f68fdd37a3ea config_h.SH - * e9bb6377fb6bf7c21e01a97266c80d028aaecf5bf71f855ca6cca3b30d94882c uconfig.sh + * 63850d620b5f962e8fbbf7c826eb9cba1b8ac13f3443c80eee1c9061756fae69 config_h.SH + * 71b0dcf437b30c409fc23b5c4c6ec2c988fc419295a650fe80f93a6d5fb0ff94 uconfig.sh * ex: set ro: */ diff --git a/uconfig.sh b/uconfig.sh index ca535de..5ae90b9 100644 --- a/uconfig.sh +++ b/uconfig.sh @@ -378,7 +378,6 @@ d_setsent='undef' d_setservent_r='undef' d_setsid='undef' d_setvbuf='undef' -d_sfio='undef' d_shm='undef' d_shmat='undef' d_shmatprototype='undef' @@ -583,7 +582,6 @@ i_prot='undef' i_pthread='undef' i_pwd='undef' i_rpcsvcdbm='undef' -i_sfio='undef' i_sgtty='undef' i_shadow='undef' i_socks='undef' @@ -797,7 +795,6 @@ useperlio='undef' useposix='true' usereentrant='undef' userelocatableinc='undef' -usesfio='false' useshrplib='false' usesitecustomize='undef' usesocks='undef' diff --git a/uconfig64.sh b/uconfig64.sh index 1585ea8..580e0c1 100644 --- a/uconfig64.sh +++ b/uconfig64.sh @@ -379,7 +379,6 @@ d_setsent='undef' d_setservent_r='undef' d_setsid='undef' d_setvbuf='undef' -d_sfio='undef' d_shm='undef' d_shmat='undef' d_shmatprototype='undef' @@ -584,7 +583,6 @@ i_prot='undef' i_pthread='undef' i_pwd='undef' i_rpcsvcdbm='undef' -i_sfio='undef' i_sgtty='undef' i_shadow='undef' i_socks='undef' @@ -797,7 +795,6 @@ useperlio='undef' useposix='true' usereentrant='undef' userelocatableinc='undef' -usesfio='false' useshrplib='false' usesitecustomize='undef' usesocks='undef' diff --git a/universal.c b/universal.c index b217c14..49ef0a4 100644 --- a/universal.c +++ b/universal.c @@ -29,7 +29,7 @@ #define PERL_IN_UNIVERSAL_C #include "perl.h" -#ifdef USE_PERLIO +#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]"); -#ifdef USE_PERLIO +#if defined(USE_PERLIO) { SV * sv; GV * gv; diff --git a/util.c b/util.c index 3bb368f..e305943 100644 --- a/util.c +++ b/util.c @@ -26,7 +26,7 @@ #include "perl.h" #include "reentr.h" -#ifdef USE_PERLIO +#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 */ - dSAVED_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; -#ifdef USE_PERLIO +#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) diff --git a/win32/Makefile b/win32/Makefile index c8aaea2..a4a4e90 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -748,7 +748,6 @@ CORE_NOCFG_H = \ ..\perl.h \ ..\perlapi.h \ ..\perlsdio.h \ - ..\perlsfio.h \ ..\perly.h \ ..\pp.h \ ..\proto.h \ diff --git a/win32/Makefile.ce b/win32/Makefile.ce index 6a76da9..bdaeef5 100644 --- a/win32/Makefile.ce +++ b/win32/Makefile.ce @@ -702,7 +702,6 @@ CORE_NOCFG_H = \ ..\perl.h \ ..\perlapi.h \ ..\perlsdio.h \ - ..\perlsfio.h \ ..\perly.h \ ..\pp.h \ ..\proto.h \ diff --git a/win32/config.ce b/win32/config.ce index c20e1bf..5e329b1 100644 --- a/win32/config.ce +++ b/win32/config.ce @@ -427,7 +427,6 @@ d_setservent_r='undef' d_setsid='undef' d_setspent='undef' d_setvbuf='undef' -d_sfio='undef' d_shm='undef' d_shmat='undef' d_shmatprototype='undef' @@ -654,7 +653,6 @@ i_prot='undef' i_pthread='undef' i_pwd='undef' i_rpcsvcdbm='undef' -i_sfio='undef' i_sgtty='undef' i_shadow='undef' i_socks='undef' @@ -996,7 +994,6 @@ useperlio='~USE_PERLIO~' useposix='true' usereentrant='undef' userelocatableinc='undef' -usesfio='false' useshrplib='true' usesitecustomize='undef' usesocks='undef' diff --git a/win32/config.gc b/win32/config.gc index e426c9b..23ef3e3 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -427,7 +427,6 @@ d_setsent='undef' d_setservent_r='undef' d_setsid='undef' d_setvbuf='define' -d_sfio='undef' d_shm='undef' d_shmat='undef' d_shmatprototype='undef' @@ -666,7 +665,6 @@ i_prot='undef' i_pthread='undef' i_pwd='undef' i_rpcsvcdbm='undef' -i_sfio='undef' i_sgtty='undef' i_shadow='undef' i_socks='undef' @@ -1040,7 +1038,6 @@ useperlio='undef' useposix='true' usereentrant='undef' userelocatableinc='undef' -usesfio='false' useshrplib='true' usesitecustomize='undef' usesocks='undef' diff --git a/win32/config.vc b/win32/config.vc index 8f2803f..a15b926 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -427,7 +427,6 @@ d_setsent='undef' d_setservent_r='undef' d_setsid='undef' d_setvbuf='define' -d_sfio='undef' d_shm='undef' d_shmat='undef' d_shmatprototype='undef' @@ -665,7 +664,6 @@ i_prot='undef' i_pthread='undef' i_pwd='undef' i_rpcsvcdbm='undef' -i_sfio='undef' i_sgtty='undef' i_shadow='undef' i_socks='undef' @@ -1039,7 +1037,6 @@ useperlio='undef' useposix='true' usereentrant='undef' userelocatableinc='undef' -usesfio='false' useshrplib='true' usesitecustomize='undef' usesocks='undef' diff --git a/win32/config_H.ce b/win32/config_H.ce index f6be13a..e7adb97 100644 --- a/win32/config_H.ce +++ b/win32/config_H.ce @@ -728,12 +728,6 @@ */ /*#define I_NETINET_IN /**/ -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include <sfio.h>. - */ -/*#define I_SFIO /**/ - /* I_STDDEF: * This symbol, if defined, indicates that <stddef.h> exists and should * be included. @@ -2267,12 +2261,6 @@ */ /*#define HAS_SETVBUF /**/ -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -/*#define USE_SFIO /**/ - /* HAS_SHM: * This symbol, if defined, indicates that the entire shm*(2) library is * supported. diff --git a/win32/config_H.gc b/win32/config_H.gc index 2b15a18..0db5206 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -703,12 +703,6 @@ */ /*#define I_NETINET_IN / **/ -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include <sfio.h>. - */ -/*#define I_SFIO / **/ - /* I_STDDEF: * This symbol, if defined, indicates that <stddef.h> exists and should * be included. @@ -3898,12 +3892,6 @@ */ /*#define HAS_SETPROCTITLE / **/ -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -/*#define USE_SFIO / **/ - /* HAS_SIGNBIT: * This symbol, if defined, indicates that the signbit routine is * available to check if the given number has the sign bit set. diff --git a/win32/config_H.vc b/win32/config_H.vc index f980639..f55a6d2 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -703,12 +703,6 @@ */ /*#define I_NETINET_IN / **/ -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include <sfio.h>. - */ -/*#define I_SFIO / **/ - /* I_STDDEF: * This symbol, if defined, indicates that <stddef.h> exists and should * be included. @@ -3892,12 +3886,6 @@ */ /*#define HAS_SETPROCTITLE / **/ -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -/*#define USE_SFIO / **/ - /* HAS_SIGNBIT: * This symbol, if defined, indicates that the signbit routine is * available to check if the given number has the sign bit set. diff --git a/win32/makefile.mk b/win32/makefile.mk index c077544..82599a8 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -856,7 +856,6 @@ CORE_NOCFG_H = \ ..\perl.h \ ..\perlapi.h \ ..\perlsdio.h \ - ..\perlsfio.h \ ..\perly.h \ ..\pp.h \ ..\proto.h \ diff --git a/win32/win32.c b/win32/win32.c index bf91b76..c708439 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -42,7 +42,7 @@ /* #include "config.h" */ -#if !defined(PERLIO_IS_STDIO) && !defined(USE_SFIO) +#if !defined(PERLIO_IS_STDIO) # define PerlIO FILE #endif diff --git a/win32/wince.c b/win32/wince.c index 15d80f9..63147cc 100644 --- a/win32/wince.c +++ b/win32/wince.c @@ -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 -- Perl5 Master Repository
