summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2019-10-11 08:10:26 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2019-10-17 08:03:11 +0100
commit7adf247031f6eae5aa06093376968e8665ebd888 (patch)
treea1c82968d78d5f9b11a2a3897bf348c0b6820110 /win32
parentdd469d97d90432366e531534b23dd30f1f8a07ca (diff)
downloadperl-7adf247031f6eae5aa06093376968e8665ebd888.tar.gz
The VC6 Chainsaw Massacre
Remove MS Visual C++ 6.0 support as agreed in the thread starting here: https://www.nntp.perl.org/group/perl.perl5.porters/2019/07/msg255625.html
Diffstat (limited to 'win32')
-rw-r--r--win32/GNUmakefile38
-rw-r--r--win32/Makefile37
-rw-r--r--win32/config_sh.PL3
-rw-r--r--win32/include/sys/socket.h148
-rw-r--r--win32/makefile.mk38
5 files changed, 22 insertions, 242 deletions
diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index 59dbfdab08..b3d9c7b3eb 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -1,7 +1,7 @@
#
# Makefile to build perl on Windows using GMAKE.
# Supported compilers:
-# Microsoft Visual C++ 6.0 or later
+# Microsoft Visual C++ 7.0 or later
# MinGW with gcc-3.4.5 or later with runtime < 3.21
# MinGW64 with gcc-4.4.3 or later
# Windows SDK 64-bit compiler and tools
@@ -126,7 +126,6 @@ USE_LARGE_FILES := define
# Uncomment this if you're building a 32-bit perl and want 64-bit integers.
# (If you're building a 64-bit perl then you will have 64-bit integers whether
# or not this is uncommented.)
-# Note: This option is not supported in 32-bit MSVC60 builds.
#
#USE_64_BIT_INT := define
@@ -160,8 +159,6 @@ DEFAULT_INC_EXCLUDES_DOT := define
#
# uncomment exactly one of the following
#
-# Visual C++ 6.0 (aka Visual C++ 98)
-#CCTYPE := MSVC60
# Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version)
#CCTYPE := MSVC70
# Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools)
@@ -394,8 +391,6 @@ endif
ifeq ($(CCHOME),)
ifeq ($(CCTYPE),GCC)
CCHOME := C:\MinGW
-else ifeq ($(CCTYPE),MSVC60)
-CCHOME := $(MSVCDir)
else ifeq ($(CCTYPE),MSVC70)
CCHOME := $(MSVCDir)
else ifeq ($(CCTYPE),MSVC70FREE)
@@ -446,19 +441,6 @@ ifeq ($(WIN64),define)
USE_64_BIT_INT = define
endif
-# Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
-# both link against MSVCRT.dll (which is part of Windows itself) and
-# not against a compiler specific versioned runtime.
-ifeq ("$(WIN64) $(CCTYPE)","define MSVC60")
-CCTYPE = SDK2003SP1
-endif
-
-# Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler
-# does not support it.
-ifeq ($(CCTYPE),MSVC60)
-USE_64_BIT_INT = undef
-endif
-
# Disable the long double option for MSVC builds since that compiler
# does not support it.
ifneq ($(CCTYPE),GCC)
@@ -672,9 +654,7 @@ EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputre
# Most relevant compiler-specific options fall into two groups:
# either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
-ifeq ($(CCTYPE),MSVC60)
-PREMSVC80 = define
-else ifeq ($(CCTYPE),MSVC70)
+ifeq ($(CCTYPE),MSVC70)
PREMSVC80 = define
else ifeq ($(CCTYPE),MSVC70FREE)
PREMSVC80 = define
@@ -731,23 +711,19 @@ endif
OPTIMIZE = -Od -MDd -Zi -D_DEBUG -DDEBUGGING
LINK_DBG = -debug
else
+# Enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG).
# -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
-OPTIMIZE = -O1 -MD -Zi -DNDEBUG
+OPTIMIZE = -O1 -MD -Zi -DNDEBUG -GL
# we enable debug symbols in release builds also
-LINK_DBG = -debug -opt:ref,icf
+LINK_DBG = -debug -opt:ref,icf -ltcg
# you may want to enable this if you want COFF symbols in the executables
# in addition to the PDB symbols. The default Dr. Watson that ships with
# Windows can use the the former but not latter. The free WinDbg can be
# installed to get better stack traces from just the PDB symbols, so we
# avoid the bloat of COFF symbols by default.
-#LINK_DBG = $(LINK_DBG) -debugtype:both
-ifneq ($(CCTYPE),MSVC60)
-# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
-OPTIMIZE += -GL
-LINK_DBG += -ltcg
+#LINK_DBG += -debugtype:both
LIB_FLAGS = -ltcg
endif
-endif
ifeq ($(WIN64),define)
DEFINES += -DWIN64 -DCONSERVATIVE
@@ -784,7 +760,7 @@ endif
# backward compatibility. We define this symbol here for older 32-bit
# compilers only (which aren't using it at all) for the sole purpose
# of getting it into $Config{ccflags}. That way if someone builds
-# Perl itself with e.g. VC6 but later installs an XS module using VC8
+# Perl itself with e.g. VC7 but later installs an XS module using VC8
# the time_t types will still be compatible.
ifeq ($(WIN64),undef)
ifeq ($(PREMSVC80),define)
diff --git a/win32/Makefile b/win32/Makefile
index 29ae90d4f6..bd61f1afbe 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -1,7 +1,7 @@
#
# Makefile to build perl on Windows using Microsoft NMAKE.
# Supported compilers:
-# Microsoft Visual C++ 6.0 or later
+# Microsoft Visual C++ 7.0 or later
# Windows SDK 64-bit compiler and tools
#
# This is set up to build a perl.exe that runs off a shared library
@@ -91,7 +91,6 @@ USE_LARGE_FILES = define
# Uncomment this if you're building a 32-bit perl and want 64-bit integers.
# (If you're building a 64-bit perl then you will have 64-bit integers whether
# or not this is uncommented.)
-# Note: This option is not supported in 32-bit MSVC60 builds.
#
#USE_64_BIT_INT = define
@@ -111,8 +110,6 @@ DEFAULT_INC_EXCLUDES_DOT = define
#
# uncomment exactly one of the following
#
-# Visual C++ 6.0 (aka Visual C++ 98)
-#CCTYPE = MSVC60
# Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version)
#CCTYPE = MSVC70
# Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools)
@@ -216,8 +213,7 @@ DEFAULT_INC_EXCLUDES_DOT = define
# define $(VCINSTALLDIR) instead, but from VC++ 14.1 we need the subfolder given
# by $(VCToolsInstallDir).
#
-!IF "$(CCTYPE)" == "MSVC60" || \
- "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
+!IF "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
CCHOME = $(MSVCDIR)
!ELSEIF "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
CCHOME = $(VCTOOLSINSTALLDIR)
@@ -362,24 +358,9 @@ WIN64 = undef
USE_64_BIT_INT = define
!ENDIF
-# Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
-# both link against MSVCRT.dll (which is part of Windows itself) and
-# not against a compiler specific versioned runtime.
-!IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60"
-CCTYPE = SDK2003SP1
-!ENDIF
-
-# Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler
-# does not support it.
-!IF "$(CCTYPE)" == "MSVC60"
-!UNDEF USE_64_BIT_INT
-USE_64_BIT_INT = undef
-!ENDIF
-
# Most relevant compiler-specific options fall into two groups:
# either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
-!IF "$(CCTYPE)" == "MSVC60" || \
- "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
+!IF "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
PREMSVC80 = define
!ELSE
PREMSVC80 = undef
@@ -516,22 +497,18 @@ LIBC = msvcrtd.lib
OPTIMIZE = -Od -MDd -Zi -D_DEBUG -DDEBUGGING
LINK_DBG = -debug
!ELSE
+# Enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG).
# -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
-OPTIMIZE = -O1 -MD -Zi -DNDEBUG
+OPTIMIZE = -O1 -MD -Zi -DNDEBUG -GL
# we enable debug symbols in release builds also
-LINK_DBG = -debug -opt:ref,icf
+LINK_DBG = -debug -opt:ref,icf -ltcg
# you may want to enable this if you want COFF symbols in the executables
# in addition to the PDB symbols. The default Dr. Watson that ships with
# Windows can use the the former but not latter. The free WinDbg can be
# installed to get better stack traces from just the PDB symbols, so we
# avoid the bloat of COFF symbols by default.
#LINK_DBG = $(LINK_DBG) -debugtype:both
-! IF "$(CCTYPE)" != "MSVC60"
-# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
-OPTIMIZE = $(OPTIMIZE) -GL
-LINK_DBG = $(LINK_DBG) -ltcg
LIB_FLAGS = -ltcg
-! ENDIF
!ENDIF
!IF "$(WIN64)" == "define"
@@ -565,7 +542,7 @@ DEFINES = $(DEFINES) -DNO_THREAD_SAFE_LOCALE
# backward compatibility. We define this symbol here for older 32-bit
# compilers only (which aren't using it at all) for the sole purpose
# of getting it into $Config{ccflags}. That way if someone builds
-# Perl itself with e.g. VC6 but later installs an XS module using VC8
+# Perl itself with e.g. VC7 but later installs an XS module using VC8
# the time_t types will still be compatible.
!IF "$(WIN64)" == "undef" && "$(PREMSVC80)" == "define"
BUILDOPT = $(BUILDOPT) -D_USE_32BIT_TIME_T
diff --git a/win32/config_sh.PL b/win32/config_sh.PL
index fad4d96fa4..bffd4ecf9f 100644
--- a/win32/config_sh.PL
+++ b/win32/config_sh.PL
@@ -263,9 +263,6 @@ else {
# change some configuration variables based on compiler version
if ($opt{cc} =~ /\bcl/ and $opt{ccversion} =~ /^(\d+)/) {
my $ccversion = $1;
- if ($ccversion < 13) { # VC6
- $opt{ar} ='lib';
- }
if ($ccversion >= 14) { # VC8+
$opt{sGMTIME_max} = 32535291599;
$opt{sLOCALTIME_max} = 32535244799;
diff --git a/win32/include/sys/socket.h b/win32/include/sys/socket.h
index 301aa29351..5374a806f5 100644
--- a/win32/include/sys/socket.h
+++ b/win32/include/sys/socket.h
@@ -15,155 +15,7 @@
/* Too late to include winsock2.h if winsock.h has already been loaded */
#ifndef _WINSOCKAPI_
# include <winsock2.h>
- /* We need to include ws2tcpip.h to get the IPv6 definitions.
- * It will in turn include wspiapi.h. Later versions of that
- * header in the Windows SDK generate C++ template code that
- * can't be compiled with VC6 anymore. The _WSPIAPI_COUNTOF
- * definition below prevents wspiapi.h from generating this
- * incompatible code.
- */
-# define _WSPIAPI_COUNTOF(_Array) (sizeof(_Array) / sizeof(_Array[0]))
# include <ws2tcpip.h>
-
-# ifndef SIO_GET_INTERFACE_LIST_EX
-
-# ifndef MSG_WAITALL
-# define MSG_WAITALL 0x8
-# endif
-
- /* The ws2tcpip.h header included in VC6 doesn't define the
- * sin6_scope_id member of sockaddr_in6. We define our own
- * version and redefine sockaddr_in6 to point to this one
- * instead for compiling e.g. Socket.xs.
- */
-
- struct my_sockaddr_in6 {
- short sin6_family; /* AF_INET6 */
- u_short sin6_port; /* Transport level port number */
- u_long sin6_flowinfo; /* IPv6 flow information */
- struct in_addr6 sin6_addr; /* IPv6 address */
- u_long sin6_scope_id; /* set of interfaces for a scope */
- };
-# define sockaddr_in6 my_sockaddr_in6
-
- /* Provide implementations of IN6ADDR_SETANY() and IN6ADDR_SETLOOPBACK
- * that also initialize the sin6_scope_id field.
- */
-# undef IN6ADDR_SETANY
-# define IN6ADDR_SETANY(x) {\
-(x)->sin6_family = AF_INET6; \
-(x)->sin6_port = 0; \
-(x)->sin6_flowinfo = 0; \
-*((u_long *)((x)->sin6_addr.s6_addr) ) = 0; \
-*((u_long *)((x)->sin6_addr.s6_addr) + 1) = 0; \
-*((u_long *)((x)->sin6_addr.s6_addr) + 2) = 0; \
-*((u_long *)((x)->sin6_addr.s6_addr) + 3) = 0; \
-(x)->sin6_scope_id = 0; \
-}
-
-# undef IN6ADDR_SETLOOPBACK
-# define IN6ADDR_SETLOOPBACK(x) {\
-(x)->sin6_family = AF_INET6; \
-(x)->sin6_port = 0; \
-(x)->sin6_flowinfo = 0; \
-*((u_long *)((x)->sin6_addr.s6_addr) ) = 0; \
-*((u_long *)((x)->sin6_addr.s6_addr) + 1) = 0; \
-*((u_long *)((x)->sin6_addr.s6_addr) + 2) = 0; \
-*((u_long *)((x)->sin6_addr.s6_addr) + 3) = 1; \
-(x)->sin6_scope_id = 0; \
-}
-
-# ifndef IPV6_HDRINCL
-# define IPV6_HDRINCL 2
-# endif
-# ifndef IPV6_UNICAST_HOPS
-# define IPV6_UNICAST_HOPS 4
-# endif
-# ifndef IPV6_MULTICAST_IF
-# define IPV6_MULTICAST_IF 9
-# endif
-# ifndef IPV6_MULTICAST_HOPS
-# define IPV6_MULTICAST_HOPS 10
-# endif
-# ifndef IPV6_MULTICAST_LOOP
-# define IPV6_MULTICAST_LOOP 11
-# endif
-# ifndef IPV6_ADD_MEMBERSHIP
-# define IPV6_ADD_MEMBERSHIP 12
-# endif
-# ifndef IPV6_DROP_MEMBERSHIP
-# define IPV6_DROP_MEMBERSHIP 13
-# endif
-# ifndef IPV6_JOIN_GROUP
-# define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
-# endif
-# ifndef IPV6_LEAVE_GROUP
-# define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
-# endif
-# ifndef IPV6_PKTINFO
-# define IPV6_PKTINFO 19
-# endif
-# ifndef IPV6_HOPLIMIT
-# define IPV6_HOPLIMIT 21
-# endif
-# ifndef IPV6_PROTECTION_LEVEL
-# define IPV6_PROTECTION_LEVEL 23
-# endif
-
- /* The ws2tcpip.h header included in MinGW includes ipv6_mreq already */
-# ifndef __GNUC__
- typedef struct ipv6_mreq {
- struct in_addr6 ipv6mr_multiaddr;
- unsigned int ipv6mr_interface;
- } IPV6_MREQ;
-# endif
-
-# ifndef EAI_AGAIN
-# define EAI_AGAIN WSATRY_AGAIN
-# endif
-# ifndef EAI_BADFLAGS
-# define EAI_BADFLAGS WSAEINVAL
-# endif
-# ifndef EAI_FAIL
-# define EAI_FAIL WSANO_RECOVERY
-# endif
-# ifndef EAI_FAMILY
-# define EAI_FAMILY WSAEAFNOSUPPORT
-# endif
-# ifndef EAI_MEMORY
-# define EAI_MEMORY WSA_NOT_ENOUGH_MEMORY
-# endif
-# ifndef EAI_NODATA
-# define EAI_NODATA WSANO_DATA
-# endif
-# ifndef EAI_NONAME
-# define EAI_NONAME WSAHOST_NOT_FOUND
-# endif
-# ifndef EAI_SERVICE
-# define EAI_SERVICE WSATYPE_NOT_FOUND
-# endif
-# ifndef EAI_SOCKTYPE
-# define EAI_SOCKTYPE WSAESOCKTNOSUPPORT
-# endif
-
-# ifndef NI_NOFQDN
-# define NI_NOFQDN 0x01
-# endif
-# ifndef NI_NUMERICHOST
-# define NI_NUMERICHOST 0x02
-# endif
-# ifndef NI_NAMEREQD
-# define NI_NAMEREQD 0x04
-# endif
-# ifndef NI_NUMERICSERV
-# define NI_NUMERICSERV 0x08
-# endif
-# ifndef NI_DGRAM
-# define NI_DGRAM 0x10
-# endif
-
-# endif
-
#endif
/* Early Platform SDKs have an incorrect definition of EAI_NODATA */
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 9d40c6cfc5..ae0c7a43d6 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -1,7 +1,7 @@
#
# Makefile to build perl on Windows using DMAKE.
# Supported compilers:
-# Microsoft Visual C++ 6.0 or later
+# Microsoft Visual C++ 7.0 or later
# MinGW with gcc-3.4.5 or later with runtime < 3.21
# MinGW64 with gcc-4.4.3 or later
# Windows SDK 64-bit compiler and tools
@@ -98,7 +98,6 @@ USE_LARGE_FILES *= define
# Uncomment this if you're building a 32-bit perl and want 64-bit integers.
# (If you're building a 64-bit perl then you will have 64-bit integers whether
# or not this is uncommented.)
-# Note: This option is not supported in 32-bit MSVC60 builds.
#
#USE_64_BIT_INT *= define
@@ -132,8 +131,6 @@ DEFAULT_INC_EXCLUDES_DOT *= define
#
# uncomment exactly one of the following
#
-# Visual C++ 6.0 (aka Visual C++ 98)
-#CCTYPE *= MSVC60
# Visual C++ .NET 2002/2003 (aka Visual C++ 7.0/7.1) (full version)
#CCTYPE *= MSVC70
# Visual C++ Toolkit 2003 (aka Visual C++ 7.1) (free command-line tools)
@@ -395,8 +392,7 @@ CCTYPE := MSVC$(MSVCVER)
.IF "$(CCHOME)" == ""
.IF "$(CCTYPE)" == "GCC"
CCHOME *= C:\MinGW
-.ELIF "$(CCTYPE)" == "MSVC60" || \
- "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
+.ELIF "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
CCHOME *= $(MSVCDir)
.ELIF "$(CCTYPE)" == "MSVC141" || "$(CCTYPE)" == "MSVC142"
CCHOME *= $(VCToolsInstallDir)
@@ -429,19 +425,6 @@ WIN64 = undef
USE_64_BIT_INT = define
.ENDIF
-# Treat 64-bit MSVC60 (doesn't really exist) as SDK2003SP1 because
-# both link against MSVCRT.dll (which is part of Windows itself) and
-# not against a compiler specific versioned runtime.
-.IF "$(WIN64)" == "define" && "$(CCTYPE)" == "MSVC60"
-CCTYPE = SDK2003SP1
-.ENDIF
-
-# Disable the 64-bit-int option for (32-bit) MSVC60 builds since that compiler
-# does not support it.
-.IF "$(CCTYPE)" == "MSVC60"
-USE_64_BIT_INT != undef
-.ENDIF
-
# Disable the long double option for MSVC builds since that compiler
# does not support it.
.IF "$(CCTYPE)" != "GCC"
@@ -648,8 +631,7 @@ EMBED_DLL_MANI = if exist $@.manifest mt -nologo -manifest $@.manifest -outputre
# Most relevant compiler-specific options fall into two groups:
# either pre-MSVC80 or MSVC80 onwards, so define a macro for this.
-.IF "$(CCTYPE)" == "MSVC60" || \
- "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
+.IF "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE"
PREMSVC80 = define
.ELSE
PREMSVC80 = undef
@@ -696,23 +678,19 @@ LIBC = msvcrtd.lib
OPTIMIZE = -Od -MDd -Zi -D_DEBUG -DDEBUGGING
LINK_DBG = -debug
.ELSE
+# Enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG).
# -O1 yields smaller code, which turns out to be faster than -O2 on x86 and x64
-OPTIMIZE = -O1 -MD -Zi -DNDEBUG
+OPTIMIZE = -O1 -MD -Zi -DNDEBUG -GL
# we enable debug symbols in release builds also
-LINK_DBG = -debug -opt:ref,icf
+LINK_DBG = -debug -opt:ref,icf -ltcg
# you may want to enable this if you want COFF symbols in the executables
# in addition to the PDB symbols. The default Dr. Watson that ships with
# Windows can use the the former but not latter. The free WinDbg can be
# installed to get better stack traces from just the PDB symbols, so we
# avoid the bloat of COFF symbols by default.
-#LINK_DBG = $(LINK_DBG) -debugtype:both
-.IF "$(CCTYPE)" != "MSVC60"
-# enable Whole Program Optimizations (WPO) and Link Time Code Generation (LTCG)
-OPTIMIZE += -GL
-LINK_DBG += -ltcg
+#LINK_DBG += -debugtype:both
LIB_FLAGS = -ltcg
.ENDIF
-.ENDIF
.IF "$(WIN64)" == "define"
DEFINES += -DWIN64 -DCONSERVATIVE
@@ -745,7 +723,7 @@ DEFINES += -DNO_THREAD_SAFE_LOCALE
# backward compatibility. We define this symbol here for older 32-bit
# compilers only (which aren't using it at all) for the sole purpose
# of getting it into $Config{ccflags}. That way if someone builds
-# Perl itself with e.g. VC6 but later installs an XS module using VC8
+# Perl itself with e.g. VC7 but later installs an XS module using VC8
# the time_t types will still be compatible.
.IF "$(WIN64)" == "undef"
.IF "$(PREMSVC80)" == "define"