New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove vestiges of sfio I/O layer code #17028
Comments
From rich+perl@hyphen-dash-hyphen.infoPerl 5.20 removed support for the sfio I/O system, AT&T's Safe/Fast The attached patch removes the three occurrences that no longer seem This one may hide more than sfio nuances though: If there's good reason to keep this block, maybe just the comment can Regards, |
From rich+perl@hyphen-dash-hyphen.info0001-Remove-code-for-unsupported-sfio-I-O-layer.patchFrom 0371f302f70a301811804271411fa12058fbe665 Mon Sep 17 00:00:00 2001
From: Richard Leach <rich+perl@hyphen-dash-hyphen.info>
Date: Thu, 30 May 2019 22:39:16 +0000
Subject: [PATCH] Remove code for unsupported sfio I/O layer
---
Porting/bisect-runner.pl | 2 +-
hints/dec_osf.sh | 4 +---
pp_sys.c | 3 ---
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl
index 00319211c9..a6e0304544 100755
--- a/Porting/bisect-runner.pl
+++ b/Porting/bisect-runner.pl
@@ -1384,7 +1384,7 @@ unless (extract_from_file('Configure', 'ignore_versioned_solibs')) {
my @libs;
# This is the current libswanted list from Configure, less the libs removed
# by current hints/linux.sh
- foreach my $lib (qw(sfio socket inet nsl nm ndbm gdbm dbm db malloc dl
+ foreach my $lib (qw(socket inet nsl nm ndbm gdbm dbm db malloc dl
ld sun m crypt sec util c cposix posix ucb BSD)) {
foreach my $dir (@paths) {
# Note the wonderful consistency of dot-or-not in the config vars:
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
index f0b772631f..1261b2d328 100644
--- a/hints/dec_osf.sh
+++ b/hints/dec_osf.sh
@@ -46,9 +46,7 @@
#
# "Undefined the ANSI standard macro ..."
#
-# can be ignored, at least while compiling the POSIX extension
-# and especially if using the sfio (the latter is not a standard
-# part of Perl, never mind if it says little to you).
+# can be ignored, at least while compiling the POSIX extension.
#
# If using the DEC compiler we must find out the DEC compiler style:
diff --git a/pp_sys.c b/pp_sys.c
index 304e1b50f8..fffaf0be5f 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3484,9 +3484,6 @@ PP(pp_fttext)
}
len = PerlIO_get_bufsiz(IoIFP(io));
s = (STDCHAR *) PerlIO_get_base(IoIFP(io));
- /* sfio can have large buffers - limit to 512 */
- if (len > 512)
- len = 512;
}
else {
SETERRNO(EBADF,RMS_IFI);
--
2.21.0
|
From rich@hyphen-dash-hyphen.infoOn Thu, May 30, 2019 at 10:57 PM Richard (via RT)
Er, additional patch attached for upper-case matches. Sorry about that |
From rich@hyphen-dash-hyphen.info0001-Remove-various-SFIO-defines.patchFrom 4205cb24ef45543416540e6d1b2505f497c0a5f4 Mon Sep 17 00:00:00 2001
From: Richard Leach <rich+perl@hyphen-dash-hyphen.info>
Date: Thu, 30 May 2019 23:02:52 +0000
Subject: [PATCH] Remove various SFIO defines.
---
dist/IO/IO.xs | 7 -------
fakesdio.h | 5 -----
nostdio.h | 5 -----
3 files changed, 17 deletions(-)
diff --git a/dist/IO/IO.xs b/dist/IO/IO.xs
index 8e857f8e2e..35e643de7e 100644
--- a/dist/IO/IO.xs
+++ b/dist/IO/IO.xs
@@ -30,13 +30,6 @@
#endif
#ifdef PerlIO
-#if defined(MACOS_TRADITIONAL) && defined(USE_SFIO)
-#define PERLIO_IS_STDIO 1
-#undef setbuf
-#undef setvbuf
-#define setvbuf _stdsetvbuf
-#define setbuf(f,b) ( __sf_setbuf(f,b) )
-#endif
typedef int SysRet;
typedef PerlIO * InputStream;
typedef PerlIO * OutputStream;
diff --git a/fakesdio.h b/fakesdio.h
index b8f972a0a9..fb277b1d3b 100644
--- a/fakesdio.h
+++ b/fakesdio.h
@@ -111,11 +111,6 @@
#define _flsbuf(c,f) _CANNOT _flsbuf_
#define getw(f) _CANNOT _getw_
#define putw(v,f) _CANNOT _putw_
-#if SFIO_VERSION < 20000101L
-#define flockfile(f) _CANNOT _flockfile_
-#define ftrylockfile(f) _CANNOT _ftrylockfile_
-#define funlockfile(f) _CANNOT _funlockfile_
-#endif
#define freopen(p,m,f) _CANNOT _freopen_
#define setbuf(f,b) _CANNOT _setbuf_
#define setvbuf(f,b,x,s) _CANNOT _setvbuf_
diff --git a/nostdio.h b/nostdio.h
index 64276aa060..9a5e9bb9f2 100644
--- a/nostdio.h
+++ b/nostdio.h
@@ -113,11 +113,6 @@ struct _FILE;
#define _flsbuf(c,f) _CANNOT _flsbuf_
#define fdopen(fd,p) _CANNOT _fdopen_
#define fileno(f) _CANNOT _fileno_
-#if defined(SFIO_VERSION) && SFIO_VERSION < 20000101L
-#define flockfile(f) _CANNOT _flockfile_
-#define ftrylockfile(f) _CANNOT _ftrylockfile_
-#define funlockfile(f) _CANNOT _funlockfile_
-#endif
#define getc_unlocked(f) _CANNOT _getc_unlocked_
#define putc_unlocked(c,f) _CANNOT _putc_unlocked_
#define popen(c,m) _CANNOT _popen_
--
2.21.0
|
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Thu, 30 May 2019 22:06:21 GMT, rich@hyphen-dash-hyphen.info wrote:
Can you supply a single patch drawn against perl 5 blead (e.g., with git format-patch)? That will be easier to review and apply. Thank you very much. -- |
From rich@hyphen-dash-hyphen.infoOn Fri, May 31, 2019 at 12:29 AM James E Keenan via RT
Single patch attached. Regards, |
From rich@hyphen-dash-hyphen.info0001-Remove-code-for-unsupported-sfio-I-O-layer.patchFrom 0daaa7dc0fb515a12b316521854221c0f24e34e7 Mon Sep 17 00:00:00 2001
From: Richard Leach <rich+perl@hyphen-dash-hyphen.info>
Date: Fri, 31 May 2019 01:02:53 +0000
Subject: [PATCH] Remove-code-for-unsupported-sfio-I-O-layer
---
Porting/bisect-runner.pl | 2 +-
dist/IO/IO.xs | 7 -------
fakesdio.h | 5 -----
hints/dec_osf.sh | 4 +---
nostdio.h | 5 -----
pp_sys.c | 3 ---
6 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl
index 00319211c9..a6e0304544 100755
--- a/Porting/bisect-runner.pl
+++ b/Porting/bisect-runner.pl
@@ -1384,7 +1384,7 @@ unless (extract_from_file('Configure', 'ignore_versioned_solibs')) {
my @libs;
# This is the current libswanted list from Configure, less the libs removed
# by current hints/linux.sh
- foreach my $lib (qw(sfio socket inet nsl nm ndbm gdbm dbm db malloc dl
+ foreach my $lib (qw(socket inet nsl nm ndbm gdbm dbm db malloc dl
ld sun m crypt sec util c cposix posix ucb BSD)) {
foreach my $dir (@paths) {
# Note the wonderful consistency of dot-or-not in the config vars:
diff --git a/dist/IO/IO.xs b/dist/IO/IO.xs
index 8e857f8e2e..35e643de7e 100644
--- a/dist/IO/IO.xs
+++ b/dist/IO/IO.xs
@@ -30,13 +30,6 @@
#endif
#ifdef PerlIO
-#if defined(MACOS_TRADITIONAL) && defined(USE_SFIO)
-#define PERLIO_IS_STDIO 1
-#undef setbuf
-#undef setvbuf
-#define setvbuf _stdsetvbuf
-#define setbuf(f,b) ( __sf_setbuf(f,b) )
-#endif
typedef int SysRet;
typedef PerlIO * InputStream;
typedef PerlIO * OutputStream;
diff --git a/fakesdio.h b/fakesdio.h
index b8f972a0a9..fb277b1d3b 100644
--- a/fakesdio.h
+++ b/fakesdio.h
@@ -111,11 +111,6 @@
#define _flsbuf(c,f) _CANNOT _flsbuf_
#define getw(f) _CANNOT _getw_
#define putw(v,f) _CANNOT _putw_
-#if SFIO_VERSION < 20000101L
-#define flockfile(f) _CANNOT _flockfile_
-#define ftrylockfile(f) _CANNOT _ftrylockfile_
-#define funlockfile(f) _CANNOT _funlockfile_
-#endif
#define freopen(p,m,f) _CANNOT _freopen_
#define setbuf(f,b) _CANNOT _setbuf_
#define setvbuf(f,b,x,s) _CANNOT _setvbuf_
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
index f0b772631f..1261b2d328 100644
--- a/hints/dec_osf.sh
+++ b/hints/dec_osf.sh
@@ -46,9 +46,7 @@
#
# "Undefined the ANSI standard macro ..."
#
-# can be ignored, at least while compiling the POSIX extension
-# and especially if using the sfio (the latter is not a standard
-# part of Perl, never mind if it says little to you).
+# can be ignored, at least while compiling the POSIX extension.
#
# If using the DEC compiler we must find out the DEC compiler style:
diff --git a/nostdio.h b/nostdio.h
index 64276aa060..9a5e9bb9f2 100644
--- a/nostdio.h
+++ b/nostdio.h
@@ -113,11 +113,6 @@ struct _FILE;
#define _flsbuf(c,f) _CANNOT _flsbuf_
#define fdopen(fd,p) _CANNOT _fdopen_
#define fileno(f) _CANNOT _fileno_
-#if defined(SFIO_VERSION) && SFIO_VERSION < 20000101L
-#define flockfile(f) _CANNOT _flockfile_
-#define ftrylockfile(f) _CANNOT _ftrylockfile_
-#define funlockfile(f) _CANNOT _funlockfile_
-#endif
#define getc_unlocked(f) _CANNOT _getc_unlocked_
#define putc_unlocked(c,f) _CANNOT _putc_unlocked_
#define popen(c,m) _CANNOT _popen_
diff --git a/pp_sys.c b/pp_sys.c
index 304e1b50f8..fffaf0be5f 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3484,9 +3484,6 @@ PP(pp_fttext)
}
len = PerlIO_get_bufsiz(IoIFP(io));
s = (STDCHAR *) PerlIO_get_base(IoIFP(io));
- /* sfio can have large buffers - limit to 512 */
- if (len > 512)
- len = 512;
}
else {
SETERRNO(EBADF,RMS_IFI);
--
2.21.0
|
Migrated from rt.perl.org#134152 (status was 'open')
Searchable as RT134152$
The text was updated successfully, but these errors were encountered: