Change 30140 by [EMAIL PROTECTED] on 2007/02/05 22:01:07
Integrate:
[ 27195]
Subject: [PATCH] Make XCOPY not prompt every two seconds when
rebuilding on Win32
From: demerphq <[EMAIL PROTECTED]>
Date: Mon, 13 Feb 2006 09:41:37 +0100
Message-ID: <[EMAIL PROTECTED]>
[ 27200]
Subject: [PATCH] stat() on Windows doesn't handle trailing
slashes/backslashes correctly
From: "Jan Dubois" <[EMAIL PROTECTED]>
Date: Wed, 15 Feb 2006 17:19:29 -0800
Message-ID: <[EMAIL PROTECTED]>
[ 27283]
Subject: [PATCH] Implement ${^WIN32_SLOPPY_STAT}
From: "Jan Dubois" <[EMAIL PROTECTED]>
Date: Tue, 21 Feb 2006 12:36:31 -0800
Message-ID: <[EMAIL PROTECTED]>
[ 27421]
Get rid of unnecessary "rmdir /s" calls in Win32 makefiles
They only existed for the benefit of old shells that didn't
understand "rmdir /s /q", but since change #27195 effectively
drops support for old shells that don't understand "xcopy /y"
it seems unnecessary now.
Windows NT4, 2000, XP and onwards all support "rmdir /s /q", so
it's probably only the Windows 9x shells that lose out.
[ 27500]
The first step in supporting VC++ 8.0. Added macros for the free .NET
2.0 SDK and Visual Studio
2005. Added these macros to "if" conditions that were appropriate.
Added a fix to prevent
the .NET 1.1 and 2.0 SDK compilers from attempting to build
perlglob.exe (they are both missing
the setargv.obj file necessary to do it).
[ 27503]
Additions to README.win32 and win32/Makefile based on comments from
Steve Hay.
[ 27528]
Subject: [PATCH] win32_pclose() error exit doesn't unlock mutex
From: Jan Dubois <[EMAIL PROTECTED]>
Date: Thu, 16 Mar 2006 16:30:23 -0800
Message-ID: <[EMAIL PROTECTED]>
[ 27530]
Install POD files into "lib\pods" rather than "lib\pod" on Win32
to avoid clashing with "lib\Pod" (cf. perl change #26363)
Also remove a couple of unused macros from the makefiles
[ 27532]
Make "distclean" target on Win32 clean up temporary HTML directory
that gets left behind after running the "install" target.
Also clean up a couple of leftover pod2html cache files.
[ 27555]
Merge some changes from ActivePerl 5.8.8.816
See:
http://downloads.activestate.com/ActivePerl/src/5.8/AP816_diff.txt
These changes provide better support for building XS extension modules
using VC++ or MinGW when perl itself was built with the opposite of
those two compilers.
[ 27556]
Merge some more changes from ActivePerl 5.8.8.816
See (again):
http://downloads.activestate.com/ActivePerl/src/5.8/AP816_diff.txt
These changes improve support for the MS 64-bit compiler in
win32/Makefile (and tentatively make the same changes to
win32/makefile.mk), and also switches the now deprecated -Gf switch to
-GF for all flavours of VC++ instead of just the latest ones.
(See:
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-02/msg00353.html
for a comment on the s/-Gf/-GF/ change.)
[ 27888]
Subject: [PATCH] win32/Makefile changes for Windows 64 bit
From: "Jan Dubois" <[EMAIL PROTECTED]>
Date: Mon, 17 Apr 2006 01:48:34 -0700
Message-ID: <[EMAIL PROTECTED]>
and make similar changes to win32/makefile.mk
and delete a spurious extra line from that file
Affected files ...
... //depot/maint-5.8/perl/README.win32#19 integrate
... //depot/maint-5.8/perl/installperl#33 integrate
... //depot/maint-5.8/perl/win32/Makefile#59 integrate
... //depot/maint-5.8/perl/win32/bin/pl2bat.pl#4 integrate
... //depot/maint-5.8/perl/win32/config_H.gc#34 integrate
... //depot/maint-5.8/perl/win32/config_H.vc#34 integrate
... //depot/maint-5.8/perl/win32/makefile.mk#67 integrate
... //depot/maint-5.8/perl/win32/win32.c#30 integrate
... //depot/maint-5.8/perl/win32/win32io.c#4 integrate
... //depot/maint-5.8/perl/wince/wince.c#12 integrate
Differences ...
==== //depot/maint-5.8/perl/README.win32#19 (text) ====
Index: perl/README.win32
--- perl/README.win32#18~29943~ 2007-01-24 04:06:54.000000000 -0800
+++ perl/README.win32 2007-02-05 14:01:07.000000000 -0800
@@ -54,6 +54,8 @@
"Borland C++ Builder" product. The Microsoft compiler is available as
"Visual C++ Toolkit 2003", and also as part of the ".NET Framework SDK", and
is the same compiler that ships with "Visual Studio .NET 2003 Professional".
+Currently, Perl cannot be compiled with Visual C++ 8.0, which is part of the
+.NET 2.0 Framework SDK and Visual Studio 2005.
This port can also be built on the Intel IA64 using:
==== //depot/maint-5.8/perl/installperl#33 (xtext) ====
Index: perl/installperl
--- perl/installperl#32~28211~ 2006-05-16 10:29:06.000000000 -0700
+++ perl/installperl 2007-02-05 14:01:07.000000000 -0800
@@ -613,7 +613,7 @@
# Install pod pages. Where? I guess in $installprivlib/pod
# ($installprivlib/pods for cygwin).
-my $pod = ($Is_Cygwin || $Is_Darwin || $Is_VMS) ? 'pods' : 'pod';
+my $pod = ($Is_Cygwin || $Is_Darwin || $Is_VMS || $Is_W32) ? 'pods' : 'pod';
if ( !$versiononly || ($installprivlib =~ m/\Q$ver/)) {
mkpath("${installprivlib}/$pod", $verbose, 0777);
==== //depot/maint-5.8/perl/win32/Makefile#59 (text) ====
Index: perl/win32/Makefile
--- perl/win32/Makefile#58~30139~ 2007-02-05 13:19:54.000000000 -0800
+++ perl/win32/Makefile 2007-02-05 14:01:07.000000000 -0800
@@ -2,7 +2,7 @@
# Makefile to build perl on Windows NT using Microsoft NMAKE.
# Supported compilers:
# Visual C++ 2.0 through 7.0 (and possibly newer versions)
-# MS Platform SDK 64-bit compiler and tools **experimental**
+# MS Platform SDK 64-bit compiler and tools
#
# This is set up to build a perl.exe that runs off a shared library
# (perl58.dll). Also makes individual DLLs for the XS extensions.
@@ -110,6 +110,10 @@
#CCTYPE = MSVC70FREE
# Visual C++ 7.x (aka Visual Studio .NET 2003) (full version)
#CCTYPE = MSVC70
+# Visual C++ Toolkit 2005 (free version of Visual C++ 8.x command-line tools)
+#CCTYPE = MSVC80FREE
+# Visual C++ 8.x (aka Visual Studio 2005) (full version)
+#CCTYPE = MSVC80
#
# uncomment next line if you want debug version of perl (big,slow)
@@ -323,11 +327,14 @@
!ENDIF
!IF "$(WIN64)" == ""
+# When we are running from a 32bit cmd.exe on AMD64 then
+# PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
+# is set to AMD64
!IF "$(PROCESSOR_ARCHITEW6432)" != ""
PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITEW6432)
WIN64 = define
!ELSE
-!IF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
+!IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" ==
"IA64"
WIN64 = define
!ELSE
WIN64 = undef
@@ -335,16 +342,24 @@
!ENDIF
!ENDIF
+ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
+!IF "$(ARCHITECTURE)" == "AMD64"
+ARCHITECTURE = x64
+!ENDIF
+!IF "$(ARCHITECTURE)" == "IA64"
+ARCHITECTURE = ia64
+!ENDIF
+
!IF "$(USE_5005THREADS)" == "define"
ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
!ELSE
!IF "$(USE_MULTI)" == "define"
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
+ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
!ELSE
!IF "$(USE_PERLIO)" == "define"
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
+ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
!ELSE
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
+ARCHNAME = MSWin32-$(ARCHITECTURE)
!ENDIF
!ENDIF
!ENDIF
@@ -360,7 +375,8 @@
# Visual Studio 98 and .NET 2003 specific
# VC++ 6.x and 7.x can load DLL's on demand. Makes the test suite run in
# about 10% less time. (The free version of 7.x can't do this, however.)
-!IF "$(CCTYPE)" == "MSVC60" || "$(CCTYPE)" == "MSVC70"
+# The addition of VC++ 8.x is currently an educated guess.
+!IF "$(CCTYPE)" == "MSVC60" || "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" ==
"MSVC80"
DELAYLOAD = -DELAYLOAD:ws2_32.dll -DELAYLOAD:shell32.dll delayimp.lib
!ENDIF
@@ -371,6 +387,7 @@
EXTDIR = ..\ext
PODDIR = ..\pod
EXTUTILSDIR = $(LIBDIR)\ExtUtils
+HTMLDIR = .\html
#
INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
@@ -378,7 +395,6 @@
INST_LIB = $(INST_TOP)$(INST_VER)\lib
INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
INST_COREDIR = $(INST_ARCHLIB)\CORE
-INST_POD = $(INST_LIB)\pod
INST_HTML = $(INST_TOP)$(INST_VER)\html
#
@@ -437,15 +453,7 @@
!IF "$(WIN64)" == "define"
DEFINES = $(DEFINES) -DWIN64 -DCONSERVATIVE
-OPTIMIZE = $(OPTIMIZE) -Wp64 -Op
-!ENDIF
-
-# the string-pooling option -Gf is deprecated in VC++ 7.x and will be removed
-# in later versions, so use read-only string-pooling (-GF) instead
-!IF "$(CCTYPE)" == "MSVC70FREE" || "$(CCTYPE)" == "MSVC70"
-STRPOOL = -GF
-!ELSE
-STRPOOL = -Gf
+OPTIMIZE = $(OPTIMIZE) -Wp64 -fp:precise
!ENDIF
!IF "$(USE_PERLCRT)" != "define"
@@ -456,17 +464,20 @@
oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
- version.lib
+ version.lib odbc32.lib odbccp32.lib
-# win64 doesn't have some libs
-!IF "$(WIN64)" != "define"
-LIBBASEFILES = $(LIBBASEFILES) odbc32.lib odbccp32.lib
+# The 64 bit Platform SDK compilers contain a runtime library that doesn't
+# include the buffer overrun verification code used by the /GS switch.
+# Since the code links against libraries that are compiled with /GS, this
+# "security cookie verification" must be included via bufferoverlow.lib.
+!IF "$(WIN64)" == "define"
+LIBBASEFILES = $(LIBBASEFILES) bufferoverflowU.lib
!ENDIF
# we add LIBC here, since we may be using PerlCRT.dll
LIBFILES = $(LIBBASEFILES) $(LIBC)
-EXTRACFLAGS = -nologo $(STRPOOL) -W3
+EXTRACFLAGS = -nologo -GF -W3
CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
$(PCHFLAGS) $(OPTIMIZE)
LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
@@ -517,6 +528,12 @@
CONFIGPM = ..\lib\Config.pm ..\lib\Config_heavy.pl
MINIMOD = ..\lib\ExtUtils\Miniperl.pm
X2P = ..\x2p\a2p.exe
+
+# With the .NET 2.0 SDK, setargs.obj is not available with the .NET SDK. It
+# only comes with Visual Studio 2005.
+!IF "$(CCTYPE)" != "MSVC80FREE"
+GLOBEXEBUILD =
+!ENDIF
# Unicode data files generated by mktables
UNIDATAFILES = ..\lib\unicore\Canonical.pl ..\lib\unicore\Exact.pl \
@@ -588,8 +605,8 @@
CFGH_TMPL = config_H.vc
!ENDIF
-XCOPY = xcopy /f /r /i /d
-RCOPY = xcopy /f /r /i /e /d
+XCOPY = xcopy /f /r /i /d /y
+RCOPY = xcopy /f /r /i /e /d /y
NOOP = @rem
NULL =
@@ -870,11 +887,6 @@
$(UNICODENORMALIZE_DLL) \
$(WIN32_DLL)
-POD2HTML = $(PODDIR)\pod2html
-POD2MAN = $(PODDIR)\pod2man
-POD2LATEX = $(PODDIR)\pod2latex
-POD2TEXT = $(PODDIR)\pod2text
-
CFG_VARS = \
"INST_DRV=$(INST_DRV)" \
"INST_TOP=$(INST_TOP)" \
@@ -917,8 +929,12 @@
#------------------------------------------------------------
$(GLOBEXE) : perlglob$(o)
+!ifdef GLOBEXEBUILD
$(LINK32) $(LINK_FLAGS) $(LIBFILES) -out:$@ -subsystem:$(SUBSYS) \
perlglob$(o) setargv$(o)
+!else
+ echo Skipping $(GLOBEXE)
+!endif
perlglob$(o) : perlglob.c
@@ -1082,7 +1098,7 @@
#-------------------------------------------------------------------------------
doc: $(PERLEXE)
- $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
+ $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
--podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML::=|)" \
--libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
@@ -1142,8 +1158,6 @@
# Note that the pod cleanup in this next section is parsed (and regenerated
# by pod/buildtoc so please check that script before making changes here
-# the doubled rmdir calls are needed because older cmd shells
-# don't understand /q
distclean: realclean
-del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
$(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
@@ -1176,30 +1190,22 @@
-del /f $(LIBDIR)\Time\HiRes.pm
-del /f $(LIBDIR)\Unicode\Normalize.pm
-del /f $(LIBDIR)\Win32.pm
- -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
- -if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO
-if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
- -if exist $(LIBDIR)\B rmdir /s $(LIBDIR)\B
-if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
- -if exist $(LIBDIR)\Data rmdir /s $(LIBDIR)\Data
-if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
- -if exist $(LIBDIR)\Encode rmdir /s $(LIBDIR)\Encode
-if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
- -if exist $(LIBDIR)\Filter\Util rmdir /s $(LIBDIR)\Filter\Util
-if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
-if exist $(LIBDIR)\MIME rmdir /s $(LIBDIR)\MIME
-if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
-if exist $(LIBDIR)\List rmdir /s $(LIBDIR)\List
-if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
- -if exist $(LIBDIR)\Hash rmdir /s $(LIBDIR)\Hash
+ -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
+ -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
+ -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
-if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
- -if exist $(LIBDIR)\Scalar rmdir /s $(LIBDIR)\Scalar
-if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
- -if exist $(LIBDIR)\Sys rmdir /s $(LIBDIR)\Sys
-if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
- -if exist $(LIBDIR)\threads rmdir /s $(LIBDIR)\threads
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
- -if exist $(LIBDIR)\XS rmdir /s $(LIBDIR)\XS
-cd $(PODDIR) && del /f *.html *.bat checkpods \
perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
@@ -1225,9 +1231,10 @@
-cd .. && del /s *.lib *.map *.pdb *.ilk *.bs *$(o) .exists pm_to_blib
-cd $(EXTDIR) && del /s *.def Makefile Makefile.old
-if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
- -if exist $(AUTODIR) rmdir /s $(AUTODIR)
-if exist $(COREDIR) rmdir /s /q $(COREDIR)
- -if exist $(COREDIR) rmdir /s $(COREDIR)
+ -if exist pod2htmd.tmp del pod2htmd.tmp
+ -if exist pod2htmi.tmp del pod2htmi.tmp
+ -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
install : all installbare installhtml
@@ -1240,7 +1247,7 @@
$(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
installhtml : doc
- $(RCOPY) html\*.* $(INST_HTML)\*.*
+ $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
inst_lib : $(CONFIGPM)
copy splittree.pl ..
@@ -1284,8 +1291,6 @@
$(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
cd ..\win32
-# the doubled rmdir calls are needed because older cmd shells
-# don't understand /q
_clean :
[EMAIL PROTECTED](DEL) miniperlmain$(o)
[EMAIL PROTECTED](DEL) $(MINIPERL)
@@ -1299,11 +1304,8 @@
[EMAIL PROTECTED](DEL) $(PERLDLL)
[EMAIL PROTECTED](DEL) $(CORE_OBJ)
-if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
- -if exist $(MINIDIR) rmdir /s $(MINIDIR)
-if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
- -if exist $(UNIDATADIR1) rmdir /s $(UNIDATADIR1)
-if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
- -if exist $(UNIDATADIR2) rmdir /s $(UNIDATADIR2)
[EMAIL PROTECTED](DEL) $(UNIDATAFILES)
[EMAIL PROTECTED](DEL) $(WIN32_OBJ)
[EMAIL PROTECTED](DEL) $(DLL_OBJ)
==== //depot/maint-5.8/perl/win32/config_H.gc#34 (text+w) ====
Index: perl/win32/config_H.gc
--- perl/win32/config_H.gc#33~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/win32/config_H.gc 2007-02-05 14:01:07.000000000 -0800
@@ -1093,9 +1093,15 @@
* This symbol is intended to be used along with CPPRUN in the same manner
* symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "".
*/
-#define CPPSTDIN "gcc -E"
-#define CPPMINUS "-"
-#define CPPRUN "gcc -E"
+#ifndef _MSC_VER
+# define CPPSTDIN "gcc -E"
+# define CPPMINUS "-"
+# define CPPRUN "gcc -E"
+#else
+# define CPPSTDIN "cppstdin"
+# define CPPMINUS ""
+# define CPPRUN "cl -nologo -E"
+#endif
#define CPPLAST ""
/* HAS__FWALK:
@@ -1128,7 +1134,9 @@
* This symbol is defined if the C compiler can cast negative
* or large floating point numbers to 32-bit ints.
*/
-#define CASTI32 /**/
+#ifndef _MSC_VER
+# define CASTI32 /**/
+#endif
/* CASTNEGFLOAT:
* This symbol is defined if the C compiler can cast negative
@@ -1900,7 +1908,11 @@
*/
#define HAS_LONG_DOUBLE /**/
#ifdef HAS_LONG_DOUBLE
-#define LONG_DOUBLESIZE 12 /**/
+# ifndef _MSC_VER
+# define LONG_DOUBLESIZE 12 /**/
+# else
+# define LONG_DOUBLESIZE 10 /**/
+# endif
#endif
/* HAS_LONG_LONG:
@@ -3055,7 +3067,11 @@
/* Off_t_size:
* This symbol holds the number of bytes used by the Off_t.
*/
-#define Off_t long long /* <offset> type */
+#ifndef _MSC_VER
+# define Off_t long long /* <offset> type */
+#else
+# define Off_t __int64 /* <offset> type */
+#endif
#define LSEEKSIZE 8 /* <offset> size */
#define Off_t_size 8 /* <offset> size */
@@ -3163,8 +3179,13 @@
*/
/*#define HAS_QUAD /**/
#ifdef HAS_QUAD
-# define Quad_t long long /**/
-# define Uquad_t unsigned long long /**/
+# ifndef _MSC_VER
+# define Quad_t long long /**/
+# define Uquad_t unsigned long long /**/
+# else
+# define Quad_t __int64 /**/
+# define Uquad_t unsigned __int64 /**/
+# endif
# define QUADKIND 5 /**/
# define QUAD_IS_INT 1
# define QUAD_IS_LONG 2
@@ -3259,8 +3280,13 @@
#define I32TYPE long /**/
#define U32TYPE unsigned long /**/
#ifdef HAS_QUAD
-#define I64TYPE long long /**/
-#define U64TYPE unsigned long long /**/
+# ifndef _MSC_VER
+# define I64TYPE long long /**/
+# define U64TYPE unsigned long long /**/
+# else
+# define I64TYPE __int64 /**/
+# define U64TYPE unsigned __int64 /**/
+# endif
#endif
#define NVTYPE double /**/
#define IVSIZE 4 /**/
==== //depot/maint-5.8/perl/win32/config_H.vc#34 (text+w) ====
Index: perl/win32/config_H.vc
--- perl/win32/config_H.vc#33~30033~ 2007-01-27 08:40:35.000000000 -0800
+++ perl/win32/config_H.vc 2007-02-05 14:01:07.000000000 -0800
@@ -1093,9 +1093,16 @@
* This symbol is intended to be used along with CPPRUN in the same manner
* symbol CPPMINUS is used with CPPSTDIN. It contains either "-" or "".
*/
-#define CPPSTDIN "cppstdin"
-#define CPPMINUS ""
-#define CPPRUN "cl -nologo -E"
+
+#ifndef __GNUC__
+# define CPPSTDIN "cppstdin"
+# define CPPMINUS ""
+# define CPPRUN "cl -nologo -E"
+#else
+# define CPPSTDIN "gcc -E"
+# define CPPMINUS "-"
+# define CPPRUN "gcc -E"
+#endif
#define CPPLAST ""
/* HAS__FWALK:
@@ -1128,7 +1135,9 @@
* This symbol is defined if the C compiler can cast negative
* or large floating point numbers to 32-bit ints.
*/
-/*#define CASTI32 /**/
+#ifdef __GNUC__
+# define CASTI32 /**/
+#endif
/* CASTNEGFLOAT:
* This symbol is defined if the C compiler can cast negative
@@ -1900,7 +1909,11 @@
*/
#define HAS_LONG_DOUBLE /**/
#ifdef HAS_LONG_DOUBLE
-#define LONG_DOUBLESIZE 10 /**/
+# ifndef __GNUC__
+# define LONG_DOUBLESIZE 10 /**/
+# else
+# define LONG_DOUBLESIZE 12 /**/
+# endif
#endif
/* HAS_LONG_LONG:
@@ -3055,7 +3068,11 @@
/* Off_t_size:
* This symbol holds the number of bytes used by the Off_t.
*/
-#define Off_t __int64 /* <offset> type */
+#ifndef __GNUC__
+# define Off_t __int64 /* <offset> type */
+#else
+# define Off_t long long /* <offset> type */
+#endif
#define LSEEKSIZE 8 /* <offset> size */
#define Off_t_size 8 /* <offset> size */
@@ -3163,8 +3180,13 @@
*/
/*#define HAS_QUAD /**/
#ifdef HAS_QUAD
-# define Quad_t __int64 /**/
-# define Uquad_t unsigned __int64 /**/
+# ifndef __GNUC__
+# define Quad_t __int64 /**/
+# define Uquad_t unsigned __int64 /**/
+# else
+# define Quad_t long long /**/
+# define Uquad_t unsigned long long /**/
+# endif
# define QUADKIND 5 /**/
# define QUAD_IS_INT 1
# define QUAD_IS_LONG 2
@@ -3259,8 +3281,13 @@
#define I32TYPE long /**/
#define U32TYPE unsigned long /**/
#ifdef HAS_QUAD
-#define I64TYPE __int64 /**/
-#define U64TYPE unsigned __int64 /**/
+# ifndef __GNUC__
+# define I64TYPE __int64 /**/
+# define U64TYPE unsigned __int64 /**/
+# else
+# define I64TYPE long long /**/
+# define U64TYPE unsigned long long /**/
+# endif
#endif
#define NVTYPE double /**/
#define IVSIZE 4 /**/
==== //depot/maint-5.8/perl/win32/makefile.mk#67 (text) ====
Index: perl/win32/makefile.mk
--- perl/win32/makefile.mk#66~30139~ 2007-02-05 13:19:54.000000000 -0800
+++ perl/win32/makefile.mk 2007-02-05 14:01:07.000000000 -0800
@@ -326,27 +326,37 @@
PROCESSOR_ARCHITECTURE *= x86
.IF "$(WIN64)" == ""
+# When we are running from a 32bit cmd.exe on AMD64 then
+# PROCESSOR_ARCHITECTURE is set to x86 and PROCESSOR_ARCHITEW6432
+# is set to AMD64
.IF "$(PROCESSOR_ARCHITEW6432)" != ""
PROCESSOR_ARCHITECTURE != $(PROCESSOR_ARCHITEW6432)
WIN64 = define
-.ELIF "$(PROCESSOR_ARCHITECTURE)" == "IA64"
+.ELIF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTURE)" ==
"IA64"
WIN64 = define
.ELSE
WIN64 = undef
.ENDIF
.ENDIF
+ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
+.IF "$(ARCHITECTURE)" == "AMD64"
+ARCHITECTURE = x64
+.ENDIF
+.IF "$(ARCHITECTURE)" == "IA64"
+ARCHITECTURE = ia64
+.ENDIF
+
.IF "$(USE_5005THREADS)" == "define"
ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
.ELIF "$(USE_MULTI)" == "define"
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi
+ARCHNAME = MSWin32-$(ARCHITECTURE)-multi
.ELSE
.IF "$(USE_PERLIO)" == "define"
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio
+ARCHNAME = MSWin32-$(ARCHITECTURE)-perlio
.ELSE
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
+ARCHNAME = MSWin32-$(ARCHITECTURE)
.ENDIF
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
.ENDIF
.IF "$(USE_ITHREADS)" == "define"
@@ -367,6 +377,7 @@
EXTDIR = ..\ext
PODDIR = ..\pod
EXTUTILSDIR = $(LIBDIR)\ExtUtils
+HTMLDIR = .\html
#
INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
@@ -374,7 +385,6 @@
INST_LIB = $(INST_TOP)$(INST_VER)\lib
INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
INST_COREDIR = $(INST_ARCHLIB)\CORE
-INST_POD = $(INST_LIB)\pod
INST_HTML = $(INST_TOP)$(INST_VER)\html
#
@@ -544,15 +554,7 @@
.IF "$(WIN64)" == "define"
DEFINES += -DWIN64 -DCONSERVATIVE
-OPTIMIZE += -Wp64 -Op
-.ENDIF
-
-# the string-pooling option -Gf is deprecated in VC++ 7.x and will be removed
-# in later versions, so use read-only string-pooling (-GF) instead
-.IF "$(CCTYPE)" == "MSVC70FREE" || "$(CCTYPE)" == "MSVC70"
-STRPOOL = -GF
-.ELSE
-STRPOOL = -Gf
+OPTIMIZE += -Wp64 -fp:precise
.ENDIF
.IF "$(USE_PERLCRT)" != "define"
@@ -563,17 +565,20 @@
oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
- version.lib
+ version.lib odbc32.lib odbccp32.lib
-# win64 doesn't have some libs
-.IF "$(WIN64)" != "define"
-LIBBASEFILES += odbc32.lib odbccp32.lib
+# The 64 bit Platform SDK compilers contain a runtime library that doesn't
+# include the buffer overrun verification code used by the /GS switch.
+# Since the code links against libraries that are compiled with /GS, this
+# "security cookie verification" must be included via bufferoverlow.lib.
+.IF "$(WIN64)" == "define"
+LIBBASEFILES = $(LIBBASEFILES) bufferoverflowU.lib
.ENDIF
# we add LIBC here, since we may be using PerlCRT.dll
LIBFILES = $(LIBBASEFILES) $(LIBC)
-EXTRACFLAGS = -nologo $(STRPOOL) -W3
+EXTRACFLAGS = -nologo -GF -W3
CFLAGS = $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) \
$(PCHFLAGS) $(OPTIMIZE)
LINK_FLAGS = -nologo -nodefaultlib $(LINK_DBG) \
@@ -757,8 +762,8 @@
PERLIMPLIB *= ..\perl58$(a)
PERLDLL = ..\perl58.dll
-XCOPY = xcopy /f /r /i /d
-RCOPY = xcopy /f /r /i /e /d
+XCOPY = xcopy /f /r /i /d /y
+RCOPY = xcopy /f /r /i /e /d /y
NOOP = @rem
#
@@ -907,11 +912,6 @@
DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
-POD2HTML = $(PODDIR)\pod2html
-POD2MAN = $(PODDIR)\pod2man
-POD2LATEX = $(PODDIR)\pod2latex
-POD2TEXT = $(PODDIR)\pod2text
-
# vars must be separated by "\t+~\t+", since we're using the tempfile
# version of config_sh.pl (we were overflowing someone's buffer by
# trying to fit them all on the command line)
@@ -1258,7 +1258,7 @@
doc: $(PERLEXE)
- $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=./html \
+ $(PERLEXE) -I..\lib ..\installhtml --podroot=.. --htmldir=$(HTMLDIR) \
--podpath=pod:lib:ext:utils --htmlroot="file://$(INST_HTML:s,:,|,)"\
--libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
@@ -1313,8 +1313,6 @@
# Note that the pod cleanup in this next section is parsed (and regenerated
# by pod/buildtoc so please check that script before making changes here
-# the doubled rmdir calls are needed because older cmd shells
-# don't understand /q
distclean: realclean
-del /f $(MINIPERL) $(PERLEXE) $(PERLDLL) $(GLOBEXE) \
$(PERLIMPLIB) ..\miniperl$(a) $(MINIMOD)
@@ -1346,30 +1344,19 @@
-del /f $(LIBDIR)\Time\HiRes.pm
-del /f $(LIBDIR)\Unicode\Normalize.pm
-del /f $(LIBDIR)\Win32.pm
- -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
- -if exist $(LIBDIR)\IO rmdir /s $(LIBDIR)\IO
-if exist $(LIBDIR)\B rmdir /s /q $(LIBDIR)\B
- -if exist $(LIBDIR)\B rmdir /s $(LIBDIR)\B
-if exist $(LIBDIR)\Data rmdir /s /q $(LIBDIR)\Data
- -if exist $(LIBDIR)\Data rmdir /s $(LIBDIR)\Data
-if exist $(LIBDIR)\Encode rmdir /s /q $(LIBDIR)\Encode
- -if exist $(LIBDIR)\Encode rmdir /s $(LIBDIR)\Encode
-if exist $(LIBDIR)\Filter\Util rmdir /s /q $(LIBDIR)\Filter\Util
- -if exist $(LIBDIR)\Filter\Util rmdir /s $(LIBDIR)\Filter\Util
- -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
- -if exist $(LIBDIR)\MIME rmdir /s $(LIBDIR)\MIME
- -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
- -if exist $(LIBDIR)\List rmdir /s $(LIBDIR)\List
-if exist $(LIBDIR)\Hash rmdir /s /q $(LIBDIR)\Hash
- -if exist $(LIBDIR)\Hash rmdir /s $(LIBDIR)\Hash
+ -if exist $(LIBDIR)\IO rmdir /s /q $(LIBDIR)\IO
+ -if exist $(LIBDIR)\IO\Uncompress rmdir /s /q $(LIBDIR)\IO\Uncompress
+ -if exist $(LIBDIR)\List rmdir /s /q $(LIBDIR)\List
+ -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME
-if exist $(LIBDIR)\Scalar rmdir /s /q $(LIBDIR)\Scalar
- -if exist $(LIBDIR)\Scalar rmdir /s $(LIBDIR)\Scalar
-if exist $(LIBDIR)\Sys rmdir /s /q $(LIBDIR)\Sys
- -if exist $(LIBDIR)\Sys rmdir /s $(LIBDIR)\Sys
-if exist $(LIBDIR)\threads rmdir /s /q $(LIBDIR)\threads
- -if exist $(LIBDIR)\threads rmdir /s $(LIBDIR)\threads
-if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS
- -if exist $(LIBDIR)\XS rmdir /s $(LIBDIR)\XS
-cd $(PODDIR) && del /f *.html *.bat checkpods \
perlaix.pod perlamiga.pod perlapollo.pod perlbeos.pod \
perlbs2000.pod perlce.pod perlcn.pod perlcygwin.pod \
@@ -1395,9 +1382,10 @@
-cd .. && del /s *$(a) *.map *.pdb *.ilk *.tds *.bs *$(o) .exists
pm_to_blib
-cd $(EXTDIR) && del /s *.def Makefile Makefile.old
-if exist $(AUTODIR) rmdir /s /q $(AUTODIR)
- -if exist $(AUTODIR) rmdir /s $(AUTODIR)
-if exist $(COREDIR) rmdir /s /q $(COREDIR)
- -if exist $(COREDIR) rmdir /s $(COREDIR)
+ -if exist pod2htmd.tmp del pod2htmd.tmp
+ -if exist pod2htmi.tmp del pod2htmi.tmp
+ -if exist $(HTMLDIR) rmdir /s /q $(HTMLDIR)
install : all installbare installhtml
@@ -1410,7 +1398,7 @@
$(XCOPY) bin\*.bat $(INST_SCRIPT)\*.*
installhtml : doc
- $(RCOPY) html\*.* $(INST_HTML)\*.*
+ $(RCOPY) $(HTMLDIR)\*.* $(INST_HTML)\*.*
inst_lib : $(CONFIGPM)
copy splittree.pl ..
@@ -1460,8 +1448,6 @@
.ENDIF
cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES)
-# the doubled rmdir calls are needed because older cmd shells
-# don't understand /q
_clean :
[EMAIL PROTECTED] miniperlmain$(o)
[EMAIL PROTECTED] $(MINIPERL)
@@ -1475,11 +1461,8 @@
[EMAIL PROTECTED] $(PERLDLL)
[EMAIL PROTECTED] $(CORE_OBJ)
-if exist $(MINIDIR) rmdir /s /q $(MINIDIR)
- -if exist $(MINIDIR) rmdir /s $(MINIDIR)
-if exist $(UNIDATADIR1) rmdir /s /q $(UNIDATADIR1)
- -if exist $(UNIDATADIR1) rmdir /s $(UNIDATADIR1)
-if exist $(UNIDATADIR2) rmdir /s /q $(UNIDATADIR2)
- -if exist $(UNIDATADIR2) rmdir /s $(UNIDATADIR2)
[EMAIL PROTECTED] $(UNIDATAFILES)
[EMAIL PROTECTED] $(WIN32_OBJ)
[EMAIL PROTECTED] $(DLL_OBJ)
==== //depot/maint-5.8/perl/win32/win32.c#30 (text) ====
Index: perl/win32/win32.c
--- perl/win32/win32.c#29~30138~ 2007-02-05 11:37:53.000000000 -0800
+++ perl/win32/win32.c 2007-02-05 14:01:07.000000000 -0800
@@ -1154,23 +1154,36 @@
char buffer[MAX_PATH+1];
int l = strlen(path);
int res;
- HANDLE handle;
int nlink = 1;
+ BOOL expect_dir = FALSE;
+
+ GV *gv_sloppy = gv_fetchpvs("\027IN32_SLOPPY_STAT",
+ GV_NOTQUAL, SVt_PV);
+ BOOL sloppy = gv_sloppy && SvTRUE(GvSV(gv_sloppy));
if (l > 1) {
switch(path[l - 1]) {
/* FindFirstFile() and stat() are buggy with a trailing
- * backslash, so change it to a forward slash :-( */
+ * slashes, except for the root directory of a drive */
case '\\':
- if (l >= sizeof(buffer)) {
+ case '/':
+ if (l > sizeof(buffer)) {
errno = ENAMETOOLONG;
return -1;
}
- strncpy(buffer, path, l-1);
- buffer[l - 1] = '/';
- buffer[l] = '\0';
- path = buffer;
+ --l;
+ strncpy(buffer, path, l);
+ /* remove additional trailing slashes */
+ while (l > 1 && (buffer[l-1] == '/' || buffer[l-1] == '\\'))
+ --l;
+ /* add back slash if we otherwise end up with just a drive letter
*/
+ if (l == 2 && isALPHA(buffer[0]) && buffer[1] == ':')
+ buffer[l++] = '\\';
+ buffer[l] = '\0';
+ path = buffer;
+ expect_dir = TRUE;
break;
+
/* FindFirstFile() is buggy with "x:", so add a dot :-( */
case ':':
if (l == 2 && isALPHA(path[0])) {
@@ -1185,17 +1198,20 @@
}
}
- /* We *must* open & close the file once; otherwise file attribute changes
*/
- /* might not yet have propagated to "other" hard links of the same file.
*/
- /* This also gives us an opportunity to determine the number of links.
*/
path = PerlDir_mapA(path);
l = strlen(path);
- handle = CreateFileA(path, 0, 0, NULL, OPEN_EXISTING, 0, NULL);
- if (handle != INVALID_HANDLE_VALUE) {
- BY_HANDLE_FILE_INFORMATION bhi;
- if (GetFileInformationByHandle(handle, &bhi))
- nlink = bhi.nNumberOfLinks;
- CloseHandle(handle);
+
+ if (!sloppy) {
+ /* We must open & close the file once; otherwise file attribute
changes */
+ /* might not yet have propagated to "other" hard links of the same
file. */
+ /* This also gives us an opportunity to determine the number of links.
*/
+ HANDLE handle = CreateFileA(path, 0, 0, NULL, OPEN_EXISTING, 0, NULL);
+ if (handle != INVALID_HANDLE_VALUE) {
+ BY_HANDLE_FILE_INFORMATION bhi;
+ if (GetFileInformationByHandle(handle, &bhi))
+ nlink = bhi.nNumberOfLinks;
+ CloseHandle(handle);
+ }
}
/* path will be mapped correctly above */
@@ -1232,6 +1248,10 @@
return -1;
}
}
+ if (expect_dir && !S_ISDIR(sbuf->st_mode)) {
+ errno = ENOTDIR;
+ return -1;
+ }
#ifdef __BORLANDC__
if (S_ISDIR(sbuf->st_mode))
sbuf->st_mode |= S_IWRITE | S_IEXEC;
@@ -2782,6 +2802,7 @@
childpid = 0;
if (!childpid) {
+ UNLOCK_FDPID_MUTEX;
errno = EBADF;
return -1;
}
==== //depot/maint-5.8/perl/wince/wince.c#12 (text) ====
Index: perl/wince/wince.c
--- perl/wince/wince.c#11~30138~ 2007-02-05 11:37:53.000000000 -0800
+++ perl/wince/wince.c 2007-02-05 14:01:07.000000000 -0800
@@ -2886,6 +2886,7 @@
childpid = 0;
if (!childpid) {
+ UNLOCK_FDPID_MUTEX;
errno = EBADF;
return -1;
}
End of Patch.