Skip to content

Commit ce45800

Browse files
Leontnwc10
authored andcommitted
Remove :win32 PerlIO layer
1 parent ddf86ab commit ce45800

14 files changed

+56
-520
lines changed

MANIFEST

-1
Original file line numberDiff line numberDiff line change
@@ -6297,7 +6297,6 @@ win32/vdir.h Perl "host" virtual directory manager for Win32
62976297
win32/vmem.h Perl "host" memory manager for Win32
62986298
win32/win32.c Win32 port
62996299
win32/win32.h Win32 port
6300-
win32/win32io.c Win32 PerlIO layer support
63016300
win32/win32iop.h Win32 port
63026301
win32/win32sck.c Win32 port
63036302
win32/win32thread.c Win32 functions for threads

lib/PerlIO.pm

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package PerlIO;
22

3-
our $VERSION = '1.11';
3+
our $VERSION = '1.12';
44

55
# Map layer name to package that defines it
66
our %alias;
@@ -235,12 +235,6 @@ like C<:utf8>. An example of a possible use might be:
235235
236236
A more elegant (and safer) interface is needed.
237237
238-
=item :win32
239-
240-
On Win32 platforms this I<experimental> layer uses the native "handle" IO
241-
rather than the unix-like numeric file descriptor layer. Known to be
242-
buggy as of Perl 5.8.2.
243-
244238
=back
245239
246240
=head2 Custom Layers

lib/warnings.pm

+41-46
Large diffs are not rendered by default.

perlio.c

-6
Original file line numberDiff line numberDiff line change
@@ -1064,12 +1064,6 @@ PerlIO_default_layers(pTHX)
10641064
PERLIO_FUNCS_DECL(*osLayer) = &PerlIO_unix;
10651065
PL_def_layerlist = PerlIO_list_alloc(aTHX);
10661066
PerlIO_define_layer(aTHX_ PERLIO_FUNCS_CAST(&PerlIO_unix));
1067-
#if defined(WIN32)
1068-
PerlIO_define_layer(aTHX_ PERLIO_FUNCS_CAST(&PerlIO_win32));
1069-
# if 0
1070-
osLayer = &PerlIO_win32;
1071-
# endif
1072-
#endif
10731067
PerlIO_define_layer(aTHX_ PERLIO_FUNCS_CAST(&PerlIO_raw));
10741068
PerlIO_define_layer(aTHX_ PERLIO_FUNCS_CAST(&PerlIO_perlio));
10751069
PerlIO_define_layer(aTHX_ PERLIO_FUNCS_CAST(&PerlIO_stdio));

perliol.h

-3
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ EXTCONST PerlIO_funcs PerlIO_utf8;
114114
EXTCONST PerlIO_funcs PerlIO_byte;
115115
EXTCONST PerlIO_funcs PerlIO_raw;
116116
EXTCONST PerlIO_funcs PerlIO_pending;
117-
#ifdef WIN32
118-
EXTCONST PerlIO_funcs PerlIO_win32;
119-
#endif
120117
PERL_CALLCONV PerlIO *PerlIO_allocate(pTHX);
121118
PERL_CALLCONV SV *PerlIO_arg_fetch(PerlIO_list_t *av, IV n);
122119
#define PerlIOArg PerlIO_arg_fetch(layers,n)

pod/perldiag.pod

-8
Original file line numberDiff line numberDiff line change
@@ -4942,14 +4942,6 @@ and there is a bug in Perl in which the built-in regular expression
49424942
folding rules are not accurate. This may lead to incorrect results.
49434943
Please report this as a bug to L<https://github.com/Perl/perl5/issues>.
49444944

4945-
=item PerlIO layer ':win32' is experimental
4946-
4947-
(S experimental::win32_perlio) The C<:win32> PerlIO layer is
4948-
experimental. If you want to take the risk of using this layer,
4949-
simply disable this warning:
4950-
4951-
no warnings "experimental::win32_perlio";
4952-
49534945
=item Perl_my_%s() not available
49544946

49554947
(F) Your platform has very uncommon byte-order and integer size,

pod/perlexperiment.pod

-10
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,6 @@ L<[perl #18755]|https://github.com/Perl/perl5/issues/18755>
9595

9696
See L<re/'strict' mode>
9797

98-
=item The <:win32> IO pseudolayer
99-
100-
Using this feature triggers warnings in the category
101-
C<experimental::win32_perlio>.
102-
103-
The ticket for this experiment is
104-
L<[perl #13198]|https://github.com/Perl/perl5/issues/13198>.
105-
106-
See also L<perlrun/PERLIO>
107-
10898
=item Declaring a reference to a variable
10999

110100
Introduced in Perl 5.26.0

pod/perlrun.pod

+1-10
Original file line numberDiff line numberDiff line change
@@ -1098,13 +1098,6 @@ X<:unix>
10981098

10991099
Low-level layer that calls C<read>, C<write>, C<lseek>, etc.
11001100

1101-
=item :win32
1102-
X<:win32>
1103-
1104-
On Win32 platforms this I<experimental> layer uses native "handle" IO
1105-
rather than a Unix-like numeric file descriptor layer. Known to be
1106-
buggy in this release (5.30).
1107-
11081101
=back
11091102

11101103
The default set of layers should give acceptable results on all platforms.
@@ -1120,9 +1113,7 @@ on the version and vendor of the C compiler. Using our own C<:crlf> layer as
11201113
the buffer avoids those issues and makes things more uniform.
11211114

11221115
This release (5.30) uses C<:unix> as the bottom layer on Win32, and so still
1123-
uses the C compiler's numeric file descriptor routines. There is an
1124-
experimental native C<:win32> layer, which is expected to be enhanced and
1125-
may eventually become the default under Win32.
1116+
uses the C compiler's numeric file descriptor routines.
11261117

11271118
The PERLIO environment variable is completely ignored when Perl
11281119
is run in taint mode.

regen/warnings.pl

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
# This script is normally invoked from regen.pl.
1818

19-
$VERSION = '1.51';
19+
$VERSION = '1.52';
2020

2121
BEGIN {
2222
require './regen/regen_lib.pl';
@@ -95,8 +95,6 @@ BEGIN
9595
[ 5.019, DEFAULT_ON ],
9696
'experimental::signatures' =>
9797
[ 5.019, DEFAULT_ON ],
98-
'experimental::win32_perlio' =>
99-
[ 5.021, DEFAULT_ON ],
10098
'experimental::refaliasing' =>
10199
[ 5.021, DEFAULT_ON ],
102100
'experimental::re_strict' =>

t/lib/warnings/perlio

-14
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,3 @@ close F;
5656
END { 1 while unlink "bb" } # KEEP THIS WITH THE LAST TEST.
5757
EXPECT
5858
Unknown PerlIO layer "xyz" at - line 5.
59-
########
60-
# NAME :win32 experimental warning
61-
# SKIP ?$^O ne "MSWin32" && ":win32 only available on Win32"
62-
open my $fh, ">:win32", "temp.txt" or die $^E;
63-
END { unlink "temp.txt"; }
64-
EXPECT
65-
PerlIO layer ':win32' is experimental at - line 1.
66-
########
67-
# NAME :win32 experimental warning disabled
68-
# SKIP ?$^O ne "MSWin32" && ":win32 only available on Win32"
69-
no warnings "experimental::win32_perlio";
70-
open my $fh, ">:win32", "temp.txt" or die $^E;
71-
END { unlink "temp.txt"; }
72-
EXPECT

warnings.h

+12-14
Original file line numberDiff line numberDiff line change
@@ -106,34 +106,33 @@
106106
#define WARN_EXPERIMENTAL__CONST_ATTR 59
107107
#define WARN_EXPERIMENTAL__RE_STRICT 60
108108
#define WARN_EXPERIMENTAL__REFALIASING 61
109-
#define WARN_EXPERIMENTAL__WIN32_PERLIO 62
110-
#define WARN_LOCALE 63
111-
#define WARN_MISSING 64
112-
#define WARN_REDUNDANT 65
109+
#define WARN_LOCALE 62
110+
#define WARN_MISSING 63
111+
#define WARN_REDUNDANT 64
113112

114113
/* Warnings Categories added in Perl 5.025 */
115114

116-
#define WARN_EXPERIMENTAL__DECLARED_REFS 66
115+
#define WARN_EXPERIMENTAL__DECLARED_REFS 65
117116

118117
/* Warnings Categories added in Perl 5.027 */
119118

120-
#define WARN_EXPERIMENTAL__ALPHA_ASSERTIONS 67
121-
#define WARN_EXPERIMENTAL__SCRIPT_RUN 68
122-
#define WARN_SHADOW 69
119+
#define WARN_EXPERIMENTAL__ALPHA_ASSERTIONS 66
120+
#define WARN_EXPERIMENTAL__SCRIPT_RUN 67
121+
#define WARN_SHADOW 68
123122

124123
/* Warnings Categories added in Perl 5.029 */
125124

126-
#define WARN_EXPERIMENTAL__PRIVATE_USE 70
127-
#define WARN_EXPERIMENTAL__UNIPROP_WILDCARDS 71
128-
#define WARN_EXPERIMENTAL__VLB 72
125+
#define WARN_EXPERIMENTAL__PRIVATE_USE 69
126+
#define WARN_EXPERIMENTAL__UNIPROP_WILDCARDS 70
127+
#define WARN_EXPERIMENTAL__VLB 71
129128

130129
/* Warnings Categories added in Perl 5.031 */
131130

132-
#define WARN_EXPERIMENTAL__ISA 73
131+
#define WARN_EXPERIMENTAL__ISA 72
133132

134133
/* Warnings Categories added in Perl 5.033 */
135134

136-
#define WARN_EXPERIMENTAL__TRY 74
135+
#define WARN_EXPERIMENTAL__TRY 73
137136
#define WARNsize 19
138137
#define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125"
139138
#define WARN_NONEstring "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
@@ -305,7 +304,6 @@ category parameters passed.
305304
=for apidoc Amnh||WARN_EXPERIMENTAL__CONST_ATTR
306305
=for apidoc Amnh||WARN_EXPERIMENTAL__RE_STRICT
307306
=for apidoc Amnh||WARN_EXPERIMENTAL__REFALIASING
308-
=for apidoc Amnh||WARN_EXPERIMENTAL__WIN32_PERLIO
309307
=for apidoc Amnh||WARN_LOCALE
310308
=for apidoc Amnh||WARN_MISSING
311309
=for apidoc Amnh||WARN_REDUNDANT

win32/GNUmakefile

-6
Original file line numberDiff line numberDiff line change
@@ -1108,12 +1108,6 @@ WIN32_SRC = \
11081108
.\win32thread.c \
11091109
.\fcrypt.c
11101110

1111-
# We need this for miniperl build unless we override canned
1112-
# config.h #define building mini\*
1113-
#ifeq ($(USE_PERLIO)" == "define"
1114-
WIN32_SRC += .\win32io.c
1115-
#endif
1116-
11171111
CORE_NOCFG_H = \
11181112
..\av.h \
11191113
..\cop.h \

win32/Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,6 @@ EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
794794

795795
WIN32_SRC = \
796796
.\win32.c \
797-
.\win32io.c \
798797
.\win32sck.c \
799798
.\win32thread.c \
800799
.\fcrypt.c

0 commit comments

Comments
 (0)