From 6d8f7c99d6105c3e91ba7907750682703fe0414b Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Wed, 21 Jul 2010 18:00:07 -0700 Subject: [PATCH] Get rid of obsolete PerlCRT.dll support PerlCRT.dll was a patched version of MSVCRT.dll that fixed/worked around a few known issues with Microsoft's C runtime library. These issues have long been fixed by updates to MSVCRT.dll, and AFAIK nobody has used PerlCRT.dll in almost 10 years now. --- pod/perlxstut.pod | 8 -------- win32/Makefile | 28 +++------------------------- win32/makefile.mk | 25 +++---------------------- 3 files changed, 6 insertions(+), 55 deletions(-) diff --git a/pod/perlxstut.pod b/pod/perlxstut.pod index 62bef3b0c5f3..de5b32a5121f 100644 --- a/pod/perlxstut.pod +++ b/pod/perlxstut.pod @@ -198,14 +198,6 @@ been deleted): You can safely ignore the line about "prototyping behavior" - it is explained in L. -If you are on a Win32 system, and the build process fails with linker -errors for functions in the C library, check if your Perl is configured -to use PerlCRT (running B should show you if this is the -case). If Perl is configured to use PerlCRT, you have to make sure -PerlCRT.lib is copied to the same location that msvcrt.lib lives in, -so that the compiler can find it on its own. msvcrt.lib is usually -found in the Visual C compiler's lib directory (e.g. C:/DevStudio/VC/lib). - Perl has its own special way of easily writing test scripts, but for this example only, we'll create our own test script. Create a file called hello that looks like this: diff --git a/win32/Makefile b/win32/Makefile index 4d5690fbc8fe..40aa60f06648 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -123,17 +123,6 @@ CCTYPE = MSVC60 # #CFG = Debug -# -# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler. -# It has patches that fix known bugs in older versions of MSVCRT.DLL. -# This currently requires VC 5.0 with Service Pack 3 or later. -# Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/ -# and follow the directions in the package to install. -# -# Not recommended if you have VC 6.x and you're not running Windows 9x. -# -#USE_PERLCRT = define - # # uncomment to enable linking with setargv.obj under the Visual C # compiler. Setting this options enables perl to expand wildcards in @@ -308,10 +297,6 @@ USE_PERLIO = undef USE_LARGE_FILES = undef !ENDIF -!IF "$(USE_PERLCRT)" == "" -USE_PERLCRT = undef -!ENDIF - !IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef" USE_MULTI = define !ENDIF @@ -444,11 +429,7 @@ LOCDEFS = -DPERLDLL -DPERL_CORE SUBSYS = console CXX_FLAG = -TP -EHsc -!IF "$(USE_PERLCRT)" != "define" LIBC = msvcrt.lib -!ELSE -LIBC = PerlCRT.lib -!ENDIF !IF "$(CFG)" == "Debug" ! IF "$(CCTYPE)" == "MSVC20" @@ -490,13 +471,11 @@ OPTIMIZE = $(OPTIMIZE) -fp:precise DEFINES = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE !ENDIF -# Use the MSVCRT read() fix if the PerlCRT was not chosen, but only when using -# VC++ 6.x or earlier. Later versions use MSVCR70.dll, MSVCR71.dll, etc, which -# do not require the fix. +# Use the MSVCRT read() fix only when using VC++ 6.x or earlier. Later +# versions use MSVCR70.dll, MSVCR71.dll, etc, which do not require the +# fix. !IF "$(CCTYPE)" == "MSVC20" || "$(CCTYPE)" == "MSVC" || "$(CCTYPE)" == "MSVC60" -! IF "$(USE_PERLCRT)" != "define" BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX -! ENDIF !ENDIF LIBBASEFILES = $(CRYPT_LIB) \ @@ -513,7 +492,6 @@ LIBBASEFILES = $(CRYPT_LIB) \ LIBBASEFILES = $(LIBBASEFILES) bufferoverflowU.lib !ENDIF -# we add LIBC here, since we may be using PerlCRT.dll LIBFILES = $(LIBBASEFILES) $(LIBC) #EXTRACFLAGS = -nologo -GF -W4 -wd4127 -wd4706 diff --git a/win32/makefile.mk b/win32/makefile.mk index 3dab6e8f0179..7488bde137fc 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -139,17 +139,6 @@ CCTYPE *= GCC # #CFG *= Debug -# -# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler. -# It has patches that fix known bugs in older versions of MSVCRT.DLL. -# This currently requires VC 5.0 with Service Pack 3 or later. -# Get it from CPAN at http://www.cpan.org/authors/id/D/DO/DOUGL/ -# and follow the directions in the package to install. -# -# Not recommended if you have VC 6.x and you're not running Windows 9x. -# -#USE_PERLCRT *= define - # # uncomment to enable linking with setargv.obj under the Visual C # compiler. Setting this options enables perl to expand wildcards in @@ -334,7 +323,6 @@ USE_ITHREADS *= undef USE_IMP_SYS *= undef USE_PERLIO *= undef USE_LARGE_FILES *= undef -USE_PERLCRT *= undef .IF "$(USE_IMP_SYS)" == "define" PERL_MALLOC = undef @@ -589,11 +577,7 @@ LOCDEFS = -DPERLDLL -DPERL_CORE SUBSYS = console CXX_FLAG = -TP -EHsc -.IF "$(USE_PERLCRT)" != "define" LIBC = msvcrt.lib -.ELSE -LIBC = PerlCRT.lib -.ENDIF .IF "$(CFG)" == "Debug" .IF "$(CCTYPE)" == "MSVC20" @@ -635,14 +619,12 @@ OPTIMIZE += -Wp64 -fp:precise DEFINES += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE .ENDIF -# Use the MSVCRT read() fix if the PerlCRT was not chosen, but only when using -# VC++ 6.x or earlier. Later versions use MSVCR70.dll, MSVCR71.dll, etc, which -# do not require the fix. +# Use the MSVCRT read() fix only when using VC++ 6.x or earlier. Later +# versions use MSVCR70.dll, MSVCR71.dll, etc, which do not require the +# fix. .IF "$(CCTYPE)" == "MSVC20" || "$(CCTYPE)" == "MSVC" || "$(CCTYPE)" == "MSVC60" -.IF "$(USE_PERLCRT)" != "define" BUILDOPT += -DPERL_MSVCRT_READFIX .ENDIF -.ENDIF LIBBASEFILES = $(CRYPT_LIB) \ oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \ @@ -658,7 +640,6 @@ LIBBASEFILES = $(CRYPT_LIB) \ LIBBASEFILES += bufferoverflowU.lib .ENDIF -# we add LIBC here, since we may be using PerlCRT.dll LIBFILES = $(LIBBASEFILES) $(LIBC) EXTRACFLAGS = -nologo -GF -W3