summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1998-07-09 17:43:14 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1998-07-09 17:43:14 +0000
commitf4ab0aee3a71652bb55138d6f6fc61d628859ffc (patch)
treee6b1182c4773fd6b83d01c3547b2f91220faa7a0 /win32
parentfc657161c79c5094cda4af53f8d9a4421dfe9959 (diff)
parent429b3afa3ef714dd9afb83b1ee6d98d1c8b77ba6 (diff)
downloadperl-f4ab0aee3a71652bb55138d6f6fc61d628859ffc.tar.gz
Integrate mainline (_071-ish)
p4raw-id: //depot/ansiperl@1400
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile32
-rw-r--r--win32/bin/pl2bat.pl193
-rw-r--r--win32/config.bc10
-rw-r--r--win32/config.gc10
-rw-r--r--win32/config.vc10
-rw-r--r--win32/config_H.bc16
-rw-r--r--win32/config_H.gc16
-rw-r--r--win32/config_H.vc16
-rw-r--r--win32/config_h.PL1
-rw-r--r--win32/config_sh.PL2
-rw-r--r--win32/makedef.pl40
-rw-r--r--win32/makefile.mk35
-rw-r--r--win32/perlhost.h19
-rw-r--r--win32/win32.c12
-rw-r--r--win32/win32sck.c7
15 files changed, 254 insertions, 165 deletions
diff --git a/win32/Makefile b/win32/Makefile
index 8cc01bb27a..6eaa3ee392 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -25,7 +25,7 @@ INST_TOP = $(INST_DRV)\perl
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-INST_VER = \5.00469
+INST_VER = \5.00471
#
# uncomment to enable threads-capabilities
@@ -448,7 +448,8 @@ PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
PERL95_OBJ = $(PERL95_OBJ) DynaLoadmt$(o)
!ENDIF
-DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B
+DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
+ Data/Dumper
STATIC_EXT = DynaLoader
NONXS_EXT = Errno
@@ -462,6 +463,8 @@ POSIX = $(EXTDIR)\POSIX\POSIX
ATTRS = $(EXTDIR)\attrs\attrs
THREAD = $(EXTDIR)\Thread\Thread
B = $(EXTDIR)\B\B
+RE = $(EXTDIR)\re\re
+DUMPER = $(EXTDIR)\Data\Dumper\Dumper
ERRNO = $(EXTDIR)\Errno\Errno
SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
@@ -473,6 +476,8 @@ POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
B_DLL = $(AUTODIR)\B\B.dll
+DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
+RE_DLL = $(AUTODIR)\re\re.dll
ERRNO_PM = $(LIBDIR)\Errno.pm
@@ -485,6 +490,8 @@ EXTENSION_C = \
$(POSIX).c \
$(ATTRS).c \
$(THREAD).c \
+ $(RE).c \
+ $(DUMPER).c \
$(B).c
EXTENSION_DLL = \
@@ -495,6 +502,7 @@ EXTENSION_DLL = \
$(IO_DLL) \
$(POSIX_DLL) \
$(ATTRS_DLL) \
+ $(DUMPER_DLL) \
$(B_DLL)
EXTENSION_PM = \
@@ -503,7 +511,8 @@ EXTENSION_PM = \
!IF "$(OBJECT)" == ""
EXTENSION_DLL = \
$(EXTENSION_DLL)\
- $(THREAD_DLL)
+ $(THREAD_DLL) \
+ $(RE_DLL)
!ENDIF
POD2HTML = $(PODDIR)\pod2html
@@ -580,6 +589,7 @@ $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(XCOPY) *.h $(COREDIR)\*.*
+ $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
$(RCOPY) include $(COREDIR)\*.*
$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
|| $(MAKE) $(MAKEFLAGS) $(CONFIGPM)
@@ -709,6 +719,18 @@ $(CAPILIB) : PerlCAPI.cpp PerlCAPI$(o)
$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
+$(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
+ cd $(EXTDIR)\Data\$(*B)
+ ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
+ $(MAKE)
+ cd ..\..\..\win32
+
+$(RE_DLL): $(PERLEXE) $(RE).xs
+ cd $(EXTDIR)\$(*B)
+ ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
+ $(MAKE)
+ cd ..\..\win32
+
$(B_DLL): $(PERLEXE) $(B).xs
cd $(EXTDIR)\$(*B)
..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
@@ -794,10 +816,12 @@ distclean: clean
-del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
-del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
-del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
- -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm
+ -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
+ -del /f $(LIBDIR)\Data\Dumper.pm
-rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
-rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
-rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
+ -rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
-del /f $(PODDIR)\*.html
-del /f $(PODDIR)\*.bat
cd ..\utils
diff --git a/win32/bin/pl2bat.pl b/win32/bin/pl2bat.pl
index 73ae87164d..121d7843d3 100644
--- a/win32/bin/pl2bat.pl
+++ b/win32/bin/pl2bat.pl
@@ -1,73 +1,119 @@
-#!perl -w
+ eval 'exec perl -x -S "$0" ${1+"$@"}'
+ if 0; # In case running under some shell
+
require 5;
use Getopt::Std;
+use Config;
$0 =~ s|.*[/\\]||;
my $usage = <<EOT;
-Usage: $0 [-h] [-a argstring] [-s stripsuffix] [files]
+Usage: $0 [-h]
+ or: $0 [-w] [-u] [-a argstring] [-s stripsuffix] [files]
+ or: $0 [-w] [-u] [-n ntargs] [-o otherargs] [-s stripsuffix] [files]
+ -n ntargs arguments to invoke perl with in generated file
+ when run from Windows NT. Defaults to
+ '-x -S "%0" %*'.
+ -o otherargs arguments to invoke perl with in generated file
+ other than when run from Windows NT. Defaults
+ to '-x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9'.
-a argstring arguments to invoke perl with in generated file
- Defaults to "-x -S %0 %*" on WindowsNT,
- "-x -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9" otherwise
+ ignoring operating system (for compatibility
+ with previous pl2bat versions).
+ -u update files that may have already been processed
+ by (some version of) pl2bat.
+ -w include "-w" on the /^#!.*perl/ line (unless
+ a /^#!.*perl/ line was already present).
-s stripsuffix strip this suffix from file before appending ".bat"
- Not case-sensitive
+ Not case-sensitive
Can be a regex if it begins with `/'
- Defaults to "/\.pl/"
+ Defaults to "/\.plx?/"
-h show this help
EOT
my %OPT = ();
-warn($usage), exit(0) if !getopts('ha:s:',\%OPT) or $OPT{'h'};
-$OPT{'a'} = ($^O eq 'MSWin32' and &Win32::IsWinNT
- ? '-x -S %0 %*'
- : '-x -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9')
- unless exists $OPT{'a'};
-$OPT{'s'} = '.pl' unless exists $OPT{'s'};
+warn($usage), exit(0) if !getopts('whun:o:a:s:',\%OPT) or $OPT{'h'};
+$OPT{'n'} = '-x -S "%0" %*' unless exists $OPT{'n'};
+$OPT{'o'} = '-x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9' unless exists $OPT{'o'};
+$OPT{'s'} = '/\\.plx?/' unless exists $OPT{'s'};
$OPT{'s'} = ($OPT{'s'} =~ m|^/([^/]*)| ? $1 : "\Q$OPT{'s'}\E");
-(my $head = <<EOT) =~ s/^\t//gm;
+my $head;
+if( defined( $OPT{'a'} ) ) {
+ $head = <<EOT;
\@rem = '--*-Perl-*--
\@echo off
perl $OPT{'a'}
goto endofperl
\@rem ';
EOT
+} else {
+ $head = <<EOT;
+ \@rem = '--*-Perl-*--
+ \@echo off
+ if "%OS%" == "Windows_NT" goto WinNT
+ perl $OPT{'o'}
+ goto endofperl
+ :WinNT
+ perl $OPT{'n'}
+ if NOT "%COMSPEC%" == "%SystemRoot%\\system32\\cmd.exe" goto endofperl
+ if %errorlevel% == 9009 echo You do not have Perl in your PATH.
+ goto endofperl
+ \@rem ';
+EOT
+}
+$head =~ s/^\t//gm;
my $headlines = 2 + ($head =~ tr/\n/\n/);
my $tail = "__END__\n:endofperl\n";
@ARGV = ('-') unless @ARGV;
-process(@ARGV);
+foreach ( @ARGV ) {
+ process($_);
+}
sub process {
- LOOP:
- foreach ( @_ ) {
- my $myhead = $head;
- my $linedone = 0;
- my $linenum = $headlines;
- my $line;
- open( FILE, $_ ) or die "$0: Can't open $_: $!";
- @file = <FILE>;
- foreach $line ( @file ) {
- $linenum++;
- if ( $line =~ /^:endofperl/) {
- warn "$0: $_ has already been converted to a batch file!\n";
- next LOOP;
+ my( $file )= @_;
+ my $myhead = $head;
+ my $linedone = 0;
+ my $taildone = 0;
+ my $linenum = 0;
+ my $skiplines = 0;
+ my $line;
+ open( FILE, $file ) or die "$0: Can't open $file: $!";
+ @file = <FILE>;
+ foreach $line ( @file ) {
+ $linenum++;
+ if ( $line =~ /^:endofperl\b/ ) {
+ if( ! exists $OPT{'u'} ) {
+ warn "$0: $file has already been converted to a batch file!\n";
+ return;
}
- if ( not $linedone and $line =~ /^#!.*perl/ ) {
- $line .= "#line $linenum\n";
- $linedone++;
+ $taildone++;
+ }
+ if ( not $linedone and $line =~ /^#!.*perl/ ) {
+ if( exists $OPT{'u'} ) {
+ $skiplines = $linenum - 1;
+ $line .= "#line ".(1+$headlines)."\n";
+ } else {
+ $line .= "#line ".($linenum+$headlines)."\n";
}
- }
- close( FILE );
- s/$OPT{'s'}$//oi;
- $_ .= '.bat' unless /\.bat$/i or /^-$/;
- open( FILE, ">$_" ) or die "Can't open $_: $!";
- print FILE $myhead;
- print FILE "#!perl\n#line " . ($headlines+1) . "\n" unless $linedone;
- print FILE @file, $tail;
- close( FILE );
+ $linedone++;
+ }
+ if ( $line =~ /^#\s*line\b/ and $linenum == 2 + $skiplines ) {
+ $line = "";
+ }
}
+ close( FILE );
+ $file =~ s/$OPT{'s'}$//oi;
+ $file .= '.bat' unless $file =~ /\.bat$/i or $file =~ /^-$/;
+ open( FILE, ">$file" ) or die "Can't open $file: $!";
+ print FILE $myhead;
+ print FILE $Config{startperl}, ( $OPT{'w'} ? " -w" : "" ),
+ "\n#line ", ($headlines+1), "\n" unless $linedone;
+ print FILE @file[$skiplines..$#file];
+ print FILE $tail unless $taildone;
+ close( FILE );
}
__END__
@@ -77,7 +123,11 @@ pl2bat - wrap perl code into a batch file
=head1 SYNOPSIS
-B<pl2bat> [B<-h>] S<[B<-a> I<argstring>]> S<[B<-s> I<stripsuffix>]> [files]
+B<pl2bat> B<-h>
+
+B<pl2bat> [B<-w>] S<[B<-a> I<argstring>]> S<[B<-s> I<stripsuffix>]> [files]
+
+B<pl2bat> [B<-w>] S<[B<-n> I<ntargs>]> S<[B<-o> I<otherargs>]> S<[B<-s> I<stripsuffix>]> [files]
=head1 DESCRIPTION
@@ -88,32 +138,64 @@ Note that by default, the ".pl" suffix will be stripped before adding
a ".bat" suffix to the supplied file names. This can be controlled
with the C<-s> option.
-The default behavior on WindowsNT is to generate a batch file that
+The default behavior is to have the batch file compare the C<OS>
+environment variable against C<"Windows_NT">. If they match, it
uses the C<%*> construct to refer to all the command line arguments
that were given to it, so you'll need to make sure that works on your
variant of the command shell. It is known to work in the cmd.exe shell
under WindowsNT. 4DOS/NT users will want to put a C<ParameterChar = *>
line in their initialization file, or execute C<setdos /p*> in
-the shell startup file. On Windows95 and other platforms a nine
-argument limit is imposed on command-line arguments given to the
-generated batch file, since they may not support C<%*> in batch files.
-This can be overridden using the C<-a> option.
+the shell startup file.
+
+On Windows95 and other platforms a nine-argument limit is imposed
+on command-line arguments given to the generated batch file, since
+they may not support C<%*> in batch files.
+
+These can be overridden using the C<-n> and C<-o> options or the
+deprecated C<-a> option.
=head1 OPTIONS
=over 8
+=item B<-n> I<ntargs>
+
+Arguments to invoke perl with in generated batch file when run from
+Windows NT (or Windows 98, probably). Defaults to S<'-x -S "%0" %*'>.
+
+=item B<-o> I<otherargs>
+
+Arguments to invoke perl with in generated batch file except when
+run from Windows NT (ie. when run from DOS, Windows 3.1, or Windows 95).
+Defaults to S<'-x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9'>.
+
=item B<-a> I<argstring>
-Arguments to invoke perl with in generated batch file. Defaults to
-S<"-x -S %0 %*"> on WindowsNT, S<"-x -S %0 %1 %2 %3 %4 %5 %6 %7 %8 %9">
-on other platforms.
+Arguments to invoke perl with in generated batch file. Specifying
+B<-a> prevents the batch file from checking the C<OS> environment
+variable to determine which operating system it is being run from.
=item B<-s> I<stripsuffix>
Strip a suffix string from file name before appending a ".bat"
-suffix. The suffix is not case-sensitive. It can be a regex if it
-begins with `/' (the trailing '/' being optional. Defaults to ".pl".
+suffix. The suffix is not case-sensitive. It can be a regex if
+it begins with `/' (the trailing '/' is optional and a trailing
+C<$> is always assumed). Defaults to C</.plx?/>.
+
+=item B<-w>
+
+If no line matching C</^#!.*perl/> is found in the script, then such
+a line is inserted just after the new preamble. The exact line
+depends on C<$Config{startperl}> [see L<Config>]. With the B<-w>
+option, C<" -w"> is added after the value of C<$Config{startperl}>.
+If a line matching C</^#!.*perl/> already exists in the script,
+then it is not changed and the B<-w> option is ignored.
+
+=item B<-u>
+
+If the script appears to have already been processed by B<pl2bat>,
+then the script is skipped and not processed unless B<-u> was
+specified. If B<-u> is specified, the existing preamble is replaced.
=item B<-h>
@@ -135,6 +217,13 @@ Show command line usage.
print scalar reverse "rekcah lrep rehtona tsuj\n";
^Z
[..another.bat is now a certified japh application..]
+
+ C:\> ren *.bat *.pl
+ C:\> pl2bat -u *.pl
+ [..updates the wrapping of some previously wrapped scripts..]
+
+ C:\> pl2bat -u -s .bat *.bat
+ [..same as previous example except more dangerous..]
=head1 BUGS
@@ -142,8 +231,8 @@ C<$0> will contain the full name, including the ".bat" suffix
when the generated batch file runs. If you don't like this,
see runperl.bat for an alternative way to invoke perl scripts.
-Default behavior is to invoke Perl with the -S flag, so Perl will
-search the PATH to find the script. This may have undesirable
+Default behavior is to invoke Perl with the B<-S> flag, so Perl will
+search the PATH to find the script. This may have undesirable
effects.
=head1 SEE ALSO
diff --git a/win32/config.bc b/win32/config.bc
index 447a999462..615ead8c1b 100644
--- a/win32/config.bc
+++ b/win32/config.bc
@@ -279,7 +279,6 @@ date='date'
db_hashtype='int'
db_prefixtype='int'
defvoidused='15'
-devtype='dev_t'
direntrytype='struct direct'
dlext='dll'
dlsrc='dl_win32.xs'
@@ -292,7 +291,7 @@ emacs=''
eunicefix=':'
exe_ext='.exe'
expr='expr'
-extensions='~static_ext~ ~dynamic_ext~'
+extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
find='find'
firstmakefile='makefile'
flex=''
@@ -372,6 +371,8 @@ installarchlib='~INST_TOP~~INST_VER~\lib\~archname~'
installbin='~INST_TOP~~INST_VER~\bin\~archname~'
installman1dir='~INST_TOP~~INST_VER~\man\man1'
installman3dir='~INST_TOP~~INST_VER~\man\man3'
+installhtmldir='~INST_TOP~~INST_VER~\html'
+installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp'
installprivlib='~INST_TOP~~INST_VER~\lib'
installscript='~INST_TOP~~INST_VER~\bin'
installsitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
@@ -448,7 +449,7 @@ osvers='4.0'
package='perl5'
pager='more /e'
passcat=''
-patchlevel='2'
+patchlevel='~PATCHLEVEL~'
path_sep=';'
perl='perl'
perladmin=''
@@ -459,7 +460,7 @@ pidtype='int'
plibpth=''
pmake=''
pr=''
-prefix='~INST_DRV~'
+prefix='~INST_TOP~'
prefixexp='~INST_DRV~'
privlib='~INST_TOP~~INST_VER~\lib'
privlibexp='~INST_TOP~~INST_VER~\lib'
@@ -542,6 +543,7 @@ usethreads='undef'
usevfork='false'
usrinc='/usr/include'
uuname=''
+version='~VERSION~'
vi=''
voidflags='15'
xlibpth='/usr/lib/386 /lib/386'
diff --git a/win32/config.gc b/win32/config.gc
index 0c5f5e039e..c31c53ada4 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -279,7 +279,6 @@ date='date'
db_hashtype='int'
db_prefixtype='int'
defvoidused='15'
-devtype='dev_t'
direntrytype='struct direct'
dlext='dll'
dlsrc='dl_win32.xs'
@@ -292,7 +291,7 @@ emacs=''
eunicefix=':'
exe_ext='.exe'
expr='expr'
-extensions='~static_ext~ ~dynamic_ext~'
+extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
find='find'
firstmakefile='makefile'
flex=''
@@ -372,6 +371,8 @@ installarchlib='~INST_TOP~~INST_VER~\lib\~archname~'
installbin='~INST_TOP~~INST_VER~\bin\~archname~'
installman1dir='~INST_TOP~~INST_VER~\man\man1'
installman3dir='~INST_TOP~~INST_VER~\man\man3'
+installhtmldir='~INST_TOP~~INST_VER~\html'
+installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp'
installprivlib='~INST_TOP~~INST_VER~\lib'
installscript='~INST_TOP~~INST_VER~\bin'
installsitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
@@ -448,7 +449,7 @@ osvers='4.0'
package='perl5'
pager='more /e'
passcat=''
-patchlevel='2'
+patchlevel='~PATCHLEVEL~'
path_sep=';'
perl='perl'
perladmin=''
@@ -459,7 +460,7 @@ pidtype='int'
plibpth=''
pmake=''
pr=''
-prefix='~INST_DRV~'
+prefix='~INST_TOP~'
prefixexp='~INST_DRV~'
privlib='~INST_TOP~~INST_VER~\lib'
privlibexp='~INST_TOP~~INST_VER~\lib'
@@ -542,6 +543,7 @@ usethreads='undef'
usevfork='false'
usrinc='/usr/include'
uuname=''
+version='~VERSION~'
vi=''
voidflags='15'
xlibpth='/usr/lib/386 /lib/386'
diff --git a/win32/config.vc b/win32/config.vc
index 4740b50d08..1ecdd50cde 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -279,7 +279,6 @@ date='date'
db_hashtype='int'
db_prefixtype='int'
defvoidused='15'
-devtype='dev_t'
direntrytype='struct direct'
dlext='dll'
dlsrc='dl_win32.xs'
@@ -292,7 +291,7 @@ emacs=''
eunicefix=':'
exe_ext='.exe'
expr='expr'
-extensions='~static_ext~ ~dynamic_ext~'
+extensions='~static_ext~ ~dynamic_ext~ ~nonxs_ext~'
find='find'
firstmakefile='makefile'
flex=''
@@ -372,6 +371,8 @@ installarchlib='~INST_TOP~~INST_VER~\lib\~archname~'
installbin='~INST_TOP~~INST_VER~\bin\~archname~'
installman1dir='~INST_TOP~~INST_VER~\man\man1'
installman3dir='~INST_TOP~~INST_VER~\man\man3'
+installhtmldir='~INST_TOP~~INST_VER~\html'
+installhtmlhelpdir='~INST_TOP~~INST_VER~\htmlhelp'
installprivlib='~INST_TOP~~INST_VER~\lib'
installscript='~INST_TOP~~INST_VER~\bin'
installsitearch='~INST_TOP~\site~INST_VER~\lib\~archname~'
@@ -448,7 +449,7 @@ osvers='4.0'
package='perl5'
pager='more /e'
passcat=''
-patchlevel='2'
+patchlevel='~PATCHLEVEL~'
path_sep=';'
perl='perl'
perladmin=''
@@ -459,7 +460,7 @@ pidtype='int'
plibpth=''
pmake=''
pr=''
-prefix='~INST_DRV~'
+prefix='~INST_TOP~'
prefixexp='~INST_DRV~'
privlib='~INST_TOP~~INST_VER~\lib'
privlibexp='~INST_TOP~~INST_VER~\lib'
@@ -542,6 +543,7 @@ usethreads='undef'
usevfork='false'
usrinc='/usr/include'
uuname=''
+version='~VERSION~'
vi=''
voidflags='15'
xlibpth='/usr/lib/386 /lib/386'
diff --git a/win32/config_H.bc b/win32/config_H.bc
index 3d8501d825..70022f8e09 100644
--- a/win32/config_H.bc
+++ b/win32/config_H.bc
@@ -34,8 +34,8 @@
* This symbol is the filename expanded version of the BIN symbol, for
* programs that do not want to deal with that at run-time.
*/
-#define BIN "c:\\perl\\5.00469\\bin\\MSWin32-x86" /**/
-#define BIN_EXP "c:\\perl\\5.00469\\bin\\MSWin32-x86" /**/
+#define BIN "c:\\perl\\5.00471\\bin\\MSWin32-x86" /**/
+#define BIN_EXP "c:\\perl\\5.00471\\bin\\MSWin32-x86" /**/
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
@@ -1471,7 +1471,7 @@
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define ARCHLIB "c:\\perl\\5.00469\\lib\\MSWin32-x86" /**/
+#define ARCHLIB "c:\\perl\\5.00471\\lib\\MSWin32-x86" /**/
/*#define ARCHLIB_EXP "" /**/
/* CAT2:
@@ -1773,8 +1773,8 @@
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "c:\\perl\\5.00469\\lib" /**/
-#define PRIVLIB_EXP (win32_get_privlib("5.00469")) /**/
+#define PRIVLIB "c:\\perl\\5.00471\\lib" /**/
+#define PRIVLIB_EXP (win32_get_privlib("5.00471")) /**/
/* SIG_NAME:
* This symbol contains a list of signal names in order of
@@ -1820,7 +1820,7 @@
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "c:\\perl\\site\\5.00469\\lib\\MSWin32-x86" /**/
+#define SITEARCH "c:\\perl\\site\\5.00471\\lib\\MSWin32-x86" /**/
/*#define SITEARCH_EXP "" /**/
/* SITELIB:
@@ -1836,8 +1836,8 @@
* This symbol contains the ~name expanded version of SITELIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITELIB "c:\\perl\\site\\5.00469\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib("5.00469")) /**/
+#define SITELIB "c:\\perl\\site\\5.00471\\lib" /**/
+#define SITELIB_EXP (win32_get_sitelib("5.00471")) /**/
/* DLSYM_NEEDS_UNDERSCORE:
* This symbol, if defined, indicates that we need to prepend an
diff --git a/win32/config_H.gc b/win32/config_H.gc
index b74a6677ef..2ada949ad2 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -34,8 +34,8 @@
* This symbol is the filename expanded version of the BIN symbol, for
* programs that do not want to deal with that at run-time.
*/
-#define BIN "c:\\perl.gcc\\5.00469\\bin\\MSWin32-x86" /**/
-#define BIN_EXP "c:\\perl.gcc\\5.00469\\bin\\MSWin32-x86" /**/
+#define BIN "c:\\perl.gcc\\5.00471\\bin\\MSWin32-x86" /**/
+#define BIN_EXP "c:\\perl.gcc\\5.00471\\bin\\MSWin32-x86" /**/
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
@@ -1471,7 +1471,7 @@
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define ARCHLIB "c:\\perl.gcc\\5.00469\\lib\\MSWin32-x86" /**/
+#define ARCHLIB "c:\\perl\\5.00471\\lib\\MSWin32-x86" /**/
/*#define ARCHLIB_EXP "" /**/
/* CAT2:
@@ -1773,8 +1773,8 @@
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "c:\\perl.gcc\\5.00469\\lib" /**/
-#define PRIVLIB_EXP (win32_get_privlib("5.00469")) /**/
+#define PRIVLIB "c:\\perl\\5.00471\\lib" /**/
+#define PRIVLIB_EXP (win32_get_privlib("5.00471")) /**/
/* SIG_NAME:
* This symbol contains a list of signal names in order of
@@ -1820,7 +1820,7 @@
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "c:\\perl.gcc\\site\\5.00469\\lib\\MSWin32-x86" /**/
+#define SITEARCH "c:\\perl\\site\\5.00471\\lib\\MSWin32-x86" /**/
/*#define SITEARCH_EXP "" /**/
/* SITELIB:
@@ -1836,8 +1836,8 @@
* This symbol contains the ~name expanded version of SITELIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITELIB "c:\\perl.gcc\\site\\5.00469\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib("5.00469")) /**/
+#define SITELIB "c:\\perl\\site\\5.00471\\lib" /**/
+#define SITELIB_EXP (win32_get_sitelib("5.00471")) /**/
/* DLSYM_NEEDS_UNDERSCORE:
* This symbol, if defined, indicates that we need to prepend an
diff --git a/win32/config_H.vc b/win32/config_H.vc
index 09a6dbbe48..b5c5c496b1 100644
--- a/win32/config_H.vc
+++ b/win32/config_H.vc
@@ -34,8 +34,8 @@
* This symbol is the filename expanded version of the BIN symbol, for
* programs that do not want to deal with that at run-time.
*/
-#define BIN "c:\\perl\\5.00469\\bin\\MSWin32-x86" /**/
-#define BIN_EXP "c:\\perl\\5.00469\\bin\\MSWin32-x86" /**/
+#define BIN "c:\\perl\\5.00471\\bin\\MSWin32-x86" /**/
+#define BIN_EXP "c:\\perl\\5.00471\\bin\\MSWin32-x86" /**/
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
@@ -1471,7 +1471,7 @@
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define ARCHLIB "c:\\perl\\5.00469\\lib\\MSWin32-x86" /**/
+#define ARCHLIB "c:\\perl\\5.00471\\lib\\MSWin32-x86" /**/
/*#define ARCHLIB_EXP "" /**/
/* CAT2:
@@ -1773,8 +1773,8 @@
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "c:\\perl\\5.00469\\lib" /**/
-#define PRIVLIB_EXP (win32_get_privlib("5.00469")) /**/
+#define PRIVLIB "c:\\perl\\5.00471\\lib" /**/
+#define PRIVLIB_EXP (win32_get_privlib("5.00471")) /**/
/* SIG_NAME:
* This symbol contains a list of signal names in order of
@@ -1820,7 +1820,7 @@
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "c:\\perl\\site\\5.00469\\lib\\MSWin32-x86" /**/
+#define SITEARCH "c:\\perl\\site\\5.00471\\lib\\MSWin32-x86" /**/
/*#define SITEARCH_EXP "" /**/
/* SITELIB:
@@ -1836,8 +1836,8 @@
* This symbol contains the ~name expanded version of SITELIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITELIB "c:\\perl\\site\\5.00469\\lib" /**/
-#define SITELIB_EXP (win32_get_sitelib("5.00469")) /**/
+#define SITELIB "c:\\perl\\site\\5.00471\\lib" /**/
+#define SITELIB_EXP (win32_get_sitelib("5.00471")) /**/
/* DLSYM_NEEDS_UNDERSCORE:
* This symbol, if defined, indicates that we need to prepend an
diff --git a/win32/config_h.PL b/win32/config_h.PL
index 26a2430fb0..62a83dcc4a 100644
--- a/win32/config_h.PL
+++ b/win32/config_h.PL
@@ -13,6 +13,7 @@ while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/)
}
my $patchlevel = $opt{INST_VER};
$patchlevel = s|^[\\/]||;
+$patchlevel = s|~VERSION~|$]|g;
$patchlevel ||= $];
$patchlevel = qq["$patchlevel"];
diff --git a/win32/config_sh.PL b/win32/config_sh.PL
index 45c1ba4e27..59e64f9675 100644
--- a/win32/config_sh.PL
+++ b/win32/config_sh.PL
@@ -5,6 +5,8 @@ while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/)
shift(@ARGV);
}
+$opt{VERSION} = $];
+$opt{INST_VER} =~ s|~VERSION~|$]|g;
if ($] =~ /\.(\d\d\d)?(\d\d)?$/) { # should always be true
$opt{PATCHLEVEL} = int($1 || 0);
$opt{SUBVERSION} = $2 || '00';
diff --git a/win32/makedef.pl b/win32/makedef.pl
index 6592e468ed..7d29c9c612 100644
--- a/win32/makedef.pl
+++ b/win32/makedef.pl
@@ -79,15 +79,12 @@ skip_symbols [qw(
Perl_statusvalue_vms
Perl_archpat_auto
Perl_block_type
-Perl_bostr
Perl_additem
Perl_cast_ulong
Perl_check_uni
Perl_checkcomma
Perl_chsize
Perl_ck_aelem
-Perl_colors
-Perl_colorset
Perl_cryptseen
Perl_cx_dump
Perl_DBcv
@@ -110,7 +107,6 @@ Perl_dump_packsubs
Perl_dump_pm
Perl_dump_sub
Perl_expectterm
-Perl_extralen
Perl_fetch_gv
Perl_fetch_io
Perl_force_ident
@@ -148,41 +144,6 @@ Perl_pp_nswitch
Perl_q
Perl_rcsid
Perl_reall_srchlen
-Perl_reg_eval_set
-Perl_reg_flags
-Perl_reg_start_tmp
-Perl_reg_start_tmpl
-Perl_regbol
-Perl_regcc
-Perl_regcode
-Perl_regdata
-Perl_regdummy
-Perl_regdump
-Perl_regfold
-Perl_regendp
-Perl_regeol
-Perl_regflags
-Perl_regindent
-Perl_reginput
-Perl_reglastparen
-Perl_regmyendp
-Perl_regmyp_size
-Perl_regmystartp
-Perl_regnarrate
-Perl_regnaughty
-Perl_regnpar
-Perl_regcomp_parse
-Perl_regprecomp
-Perl_regprev
-Perl_regprogram
-Perl_regprop
-Perl_regsawback
-Perl_regseen
-Perl_regsize
-Perl_regstartp
-Perl_regtill
-Perl_regxend
-Perl_regcomp_rx
Perl_same_dirent
Perl_saw_return
Perl_scan_const
@@ -196,7 +157,6 @@ Perl_scan_str
Perl_scan_subst
Perl_scan_trans
Perl_scan_word
-Perl_seen_zerolen
Perl_setenv_getix
Perl_skipspace
Perl_sort_mutex
diff --git a/win32/makefile.mk b/win32/makefile.mk
index e088db492e..67346bb888 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -29,7 +29,7 @@ INST_TOP *= $(INST_DRV)\perl.gcc
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-INST_VER *= \5.00469
+INST_VER *= \5.00471
#
# uncomment to enable threads-capabilities
@@ -194,8 +194,8 @@ LIBOUT_FLAG =
.ELIF "$(CCTYPE)" == "GCC"
-CC = gcc
-LINK32 = gcc
+CC = gcc
+LINK32 = gcc
LIB32 = ar rc
IMPLIB = dlltool
@@ -562,7 +562,8 @@ PERLEXE_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
PERL95_OBJ += DynaLoadmt$(o)
.ENDIF
-DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B
+DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
+ Data/Dumper
STATIC_EXT = DynaLoader
NONXS_EXT = Errno
@@ -576,6 +577,8 @@ POSIX = $(EXTDIR)\POSIX\POSIX
ATTRS = $(EXTDIR)\attrs\attrs
THREAD = $(EXTDIR)\Thread\Thread
B = $(EXTDIR)\B\B
+RE = $(EXTDIR)\re\re
+DUMPER = $(EXTDIR)\Data\Dumper\Dumper
ERRNO = $(EXTDIR)\Errno\Errno
SOCKET_DLL = $(AUTODIR)\Socket\Socket.dll
@@ -587,6 +590,8 @@ POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
B_DLL = $(AUTODIR)\B\B.dll
+DUMPER_DLL = $(AUTODIR)\Data\Dumper\Dumper.dll
+RE_DLL = $(AUTODIR)\re\re.dll
ERRNO_PM = $(LIBDIR)\Errno.pm
@@ -599,6 +604,8 @@ EXTENSION_C = \
$(POSIX).c \
$(ATTRS).c \
$(THREAD).c \
+ $(RE).c \
+ $(DUMPER).c \
$(B).c
EXTENSION_DLL = \
@@ -609,14 +616,17 @@ EXTENSION_DLL = \
$(IO_DLL) \
$(POSIX_DLL) \
$(ATTRS_DLL) \
+ $(DUMPER_DLL) \
$(B_DLL)
EXTENSION_PM = \
$(ERRNO_PM)
+# re.dll doesn't build with PERL_OBJECT yet
.IF "$(OBJECT)" == ""
EXTENSION_DLL += \
- $(THREAD_DLL)
+ $(THREAD_DLL) \
+ $(RE_DLL)
.ENDIF
POD2HTML = $(PODDIR)\pod2html
@@ -701,6 +711,7 @@ $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(XCOPY) *.h $(COREDIR)\*.*
+ $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
$(RCOPY) include $(COREDIR)\*.*
$(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
|| $(MAKE) $(MAKEMACROS) $(CONFIGPM)
@@ -886,6 +897,16 @@ $(CAPILIB) : PerlCAPI.cpp PerlCAPI$(o)
$(EXTDIR)\DynaLoader\dl_win32.xs: dl_win32.xs
copy dl_win32.xs $(EXTDIR)\DynaLoader\dl_win32.xs
+$(DUMPER_DLL): $(PERLEXE) $(DUMPER).xs
+ cd $(EXTDIR)\Data\$(*B) && \
+ ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
+ cd $(EXTDIR)\Data\$(*B) && $(MAKE)
+
+$(RE_DLL): $(PERLEXE) $(RE).xs
+ cd $(EXTDIR)\$(*B) && \
+ ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
+ cd $(EXTDIR)\$(*B) && $(MAKE)
+
$(B_DLL): $(PERLEXE) $(B).xs
cd $(EXTDIR)\$(*B) && \
..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
@@ -958,10 +979,12 @@ distclean: clean
-del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
-del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
-del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
- -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm
+ -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
+ -del /f $(LIBDIR)\Data\Dumper.pm
-rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
-rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
-rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
+ -rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
-del /f $(PODDIR)\*.html
-del /f $(PODDIR)\*.bat
-cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct *.bat
diff --git a/win32/perlhost.h b/win32/perlhost.h
index a4c2e3ce51..10abef93dc 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -32,13 +32,6 @@ extern CPerlObj *pPerl;
err = errno;\
return ret;
-extern int g_closedir(DIR *dirp);
-extern DIR * g_opendir(char *filename);
-extern struct direct * g_readdir(DIR *dirp);
-extern void g_rewinddir(DIR *dirp);
-extern void g_seekdir(DIR *dirp, long loc);
-extern long g_telldir(DIR *dirp);
-
class CPerlDir : public IPerlDir
{
public:
@@ -57,27 +50,27 @@ public:
};
virtual int Close(DIR *dirp, int &err)
{
- return g_closedir(dirp);
+ return win32_closedir(dirp);
};
virtual DIR *Open(char *filename, int &err)
{
- return g_opendir(filename);
+ return win32_opendir(filename);
};
virtual struct direct *Read(DIR *dirp, int &err)
{
- return g_readdir(dirp);
+ return win32_readdir(dirp);
};
virtual void Rewind(DIR *dirp, int &err)
{
- g_rewinddir(dirp);
+ win32_rewinddir(dirp);
};
virtual void Seek(DIR *dirp, long loc, int &err)
{
- g_seekdir(dirp, loc);
+ win32_seekdir(dirp, loc);
};
virtual long Tell(DIR *dirp, int &err)
{
- return g_telldir(dirp);
+ return win32_telldir(dirp);
};
};
diff --git a/win32/win32.c b/win32/win32.c
index 03552debbf..ef59a8f2ab 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -87,18 +87,6 @@ int _CRT_glob = 0;
#define do_spawn g_do_spawn
#undef do_exec
#define do_exec g_do_exec
-#undef opendir
-#define opendir g_opendir
-#undef readdir
-#define readdir g_readdir
-#undef telldir
-#define telldir g_telldir
-#undef seekdir
-#define seekdir g_seekdir
-#undef rewinddir
-#define rewinddir g_rewinddir
-#undef closedir
-#define closedir g_closedir
#undef getlogin
#define getlogin g_getlogin
#endif
diff --git a/win32/win32sck.c b/win32/win32sck.c
index 74af5d7756..8929ea7d09 100644
--- a/win32/win32sck.c
+++ b/win32/win32sck.c
@@ -310,8 +310,11 @@ win32_select(int nfds, Perl_fd_set* rd, Perl_fd_set* wr, Perl_fd_set* ex, const
* so do the (millisecond) sleep as a special case
*/
if (!(rd || wr || ex)) {
- Sleep(timeout->tv_sec * 1000 +
- timeout->tv_usec / 1000); /* do the best we can */
+ if (timeout)
+ Sleep(timeout->tv_sec * 1000 +
+ timeout->tv_usec / 1000); /* do the best we can */
+ else
+ Sleep(UINT_MAX);
return 0;
}
StartSockets();