To: vim_dev@googlegroups.com Subject: Patch 8.2.4220 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4220 Problem: MS-Windows: some old compiler support remains. Solution: Remove obsolete compiler support. (Ken Takata, closes #9627) Files: src/Make_mvc.mak, src/vim.h *** ../vim-8.2.4219/src/Make_mvc.mak 2022-01-25 10:30:52.473915958 +0000 --- src/Make_mvc.mak 2022-01-26 11:11:48.985391426 +0000 *************** *** 274,290 **** MSVCRT_VER = ($(MSVCVER) / 100 * 10 - 50) !endif ! # Calculate MSVC_FULL for Visual C++ 8 and up. ! !if $(MSVC_MAJOR) >= 8 ! ! if [echo MSVC_FULL=_MSC_FULL_VER> msvcfullver.c && $(CC) /EP msvcfullver.c > msvcfullver.~ 2> nul] ! ! message *** ERROR ! ! message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH. ! ! message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed. ! ! error Make aborted. ! ! else ! ! include msvcfullver.~ ! ! if [del msvcfullver.c msvcfullver.~] ! ! endif ! endif !endif --- 274,288 ---- MSVCRT_VER = ($(MSVCVER) / 100 * 10 - 50) !endif ! # Calculate MSVC_FULL. ! !if [echo MSVC_FULL=_MSC_FULL_VER> msvcfullver.c && $(CC) /EP msvcfullver.c > msvcfullver.~ 2> nul] ! ! message *** ERROR ! ! message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH. ! ! message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed. ! ! error Make aborted. ! !else ! ! include msvcfullver.~ ! ! if [del msvcfullver.c msvcfullver.~] ! endif !endif *************** *** 310,318 **** WINVER = 0x0501 !endif - # Flag to turn on Win64 compatibility warnings for VC7.x and VC8. - WP64CHECK = /Wp64 - # Use multiprocess build USE_MP = yes --- 308,313 ---- *************** *** 495,510 **** NETBEANS_LIB = WSock32.lib Ws2_32.lib !endif - # Set which version of the CRT to use - !if defined(USE_MSVCRT) - # CVARS = $(cvarsdll) - # !elseif defined(MULTITHREADED) - # CVARS = $(cvarsmt) - !else - # CVARS = $(cvars) - # CVARS = $(cvarsmt) - !endif - # need advapi32.lib for GetUserName() # need shell32.lib for ExtractIcon() # need netapi32.lib for NetUserEnum() --- 490,495 ---- *************** *** 522,528 **** #VIMRCLOC = somewhere #VIMRUNTIMEDIR = somewhere ! CFLAGS = -c /W3 /GF /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \ $(CSCOPE_DEFS) $(TERM_DEFS) $(SOUND_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \ $(NBDEBUG_DEFS) $(XPM_DEFS) $(SOD_DEFS) $(SOD_INC) \ $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) --- 507,513 ---- #VIMRCLOC = somewhere #VIMRUNTIMEDIR = somewhere ! CFLAGS = -c /W3 /GF /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 \ $(CSCOPE_DEFS) $(TERM_DEFS) $(SOUND_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \ $(NBDEBUG_DEFS) $(XPM_DEFS) $(SOD_DEFS) $(SOD_INC) \ $(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) *************** *** 556,623 **** !endif # Convert processor ID to MVC-compatible number - !if $(MSVC_MAJOR) < 8 - ! if "$(CPUNR)" == "i586" - CPUARG = /G5 - ! elseif "$(CPUNR)" == "i686" - CPUARG = /G6 - ! elseif "$(CPUNR)" == "sse" - CPUARG = /G6 /arch:SSE - ! elseif "$(CPUNR)" == "sse2" - CPUARG = /G7 /arch:SSE2 - ! elseif "$(CPUNR)" == "avx" || "$(CPUNR)" == "avx2" - ! message AVX/AVX2 Instruction Sets are not supported by Visual C++ v$(MSVC_MAJOR) - ! message Falling back to SSE2 - CPUARG = /G7 /arch:SSE2 - ! elseif "$(CPUNR)" == "any" - CPUARG = - ! endif - !else # IA32/SSE/SSE2 are only supported on x86 ! ! if "$(ASSEMBLY_ARCHITECTURE)" == "i386" && ("$(CPUNR)" == "i586" || "$(CPUNR)" == "i686" || "$(CPUNR)" == "any") # VC<11 generates fp87 code by default ! ! if $(MSVC_MAJOR) < 11 CPUARG = # VC>=11 needs explicit instructions to generate fp87 code ! ! else CPUARG = /arch:IA32 ! ! endif ! ! elseif "$(ASSEMBLY_ARCHITECTURE)" == "i386" && "$(CPUNR)" == "sse" CPUARG = /arch:SSE ! ! elseif "$(ASSEMBLY_ARCHITECTURE)" == "i386" && "$(CPUNR)" == "sse2" CPUARG = /arch:SSE2 ! ! elseif "$(CPUNR)" == "avx" # AVX is only supported by VC 10 and up ! ! if $(MSVC_MAJOR) < 10 ! ! message AVX Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR) ! ! if "$(ASSEMBLY_ARCHITECTURE)" == "i386" ! ! message Falling back to SSE2 CPUARG = /arch:SSE2 - ! else - CPUARG = - ! endif ! else ! CPUARG = /arch:AVX ! endif ! ! elseif "$(CPUNR)" == "avx2" # AVX is only supported by VC 10 and up ! ! if $(MSVC_MAJOR) < 10 ! ! message AVX2 Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR) ! ! if "$(ASSEMBLY_ARCHITECTURE)" == "i386" ! ! message Falling back to SSE2 CPUARG = /arch:SSE2 ! ! else CPUARG = ! ! endif # AVX2 is only supported by VC 12U2 and up # 180030501 is the full version number for Visual Studio 2013/VC 12 Update 2 ! ! elseif $(MSVC_FULL) < 180030501 ! ! message AVX2 Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR)-$(MSVC_FULL) ! ! message Falling back to AVX CPUARG = /arch:AVX ! ! else CPUARG = /arch:AVX2 - ! endif ! endif !endif --- 541,590 ---- !endif # Convert processor ID to MVC-compatible number # IA32/SSE/SSE2 are only supported on x86 ! !if "$(ASSEMBLY_ARCHITECTURE)" == "i386" && ("$(CPUNR)" == "i586" || "$(CPUNR)" == "i686" || "$(CPUNR)" == "any") # VC<11 generates fp87 code by default ! ! if $(MSVC_MAJOR) < 11 CPUARG = # VC>=11 needs explicit instructions to generate fp87 code ! ! else CPUARG = /arch:IA32 ! ! endif ! !elseif "$(ASSEMBLY_ARCHITECTURE)" == "i386" && "$(CPUNR)" == "sse" CPUARG = /arch:SSE ! !elseif "$(ASSEMBLY_ARCHITECTURE)" == "i386" && "$(CPUNR)" == "sse2" CPUARG = /arch:SSE2 ! !elseif "$(CPUNR)" == "avx" # AVX is only supported by VC 10 and up ! ! if $(MSVC_MAJOR) < 10 ! ! message AVX Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR) ! ! if "$(ASSEMBLY_ARCHITECTURE)" == "i386" ! ! message Falling back to SSE2 CPUARG = /arch:SSE2 ! else ! CPUARG = ! endif ! ! else ! CPUARG = /arch:AVX ! ! endif ! !elseif "$(CPUNR)" == "avx2" # AVX is only supported by VC 10 and up ! ! if $(MSVC_MAJOR) < 10 ! ! message AVX2 Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR) ! ! if "$(ASSEMBLY_ARCHITECTURE)" == "i386" ! ! message Falling back to SSE2 CPUARG = /arch:SSE2 ! ! else CPUARG = ! ! endif # AVX2 is only supported by VC 12U2 and up # 180030501 is the full version number for Visual Studio 2013/VC 12 Update 2 ! ! elseif $(MSVC_FULL) < 180030501 ! ! message AVX2 Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR)-$(MSVC_FULL) ! ! message Falling back to AVX CPUARG = /arch:AVX ! ! else CPUARG = /arch:AVX2 ! endif !endif *************** *** 685,704 **** OPTFLAG = /Ox ! endif - ! if $(MSVC_MAJOR) >= 8 # Use link time code generation if not worried about size ! ! if "$(OPTIMIZE)" != "SPACE" OPTFLAG = $(OPTFLAG) /GL - ! endif - ! endif - - # (/Wp64 is deprecated in VC9 and generates an obnoxious warning.) - ! if ($(MSVC_MAJOR) == 7) || ($(MSVC_MAJOR) == 8) - CFLAGS = $(CFLAGS) $(WP64CHECK) ! endif CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG) ! RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG ! ifdef USE_MSVCRT CFLAGS = $(CFLAGS) /MD LIBC = msvcrt.lib --- 652,664 ---- OPTFLAG = /Ox ! endif # Use link time code generation if not worried about size ! ! if "$(OPTIMIZE)" != "SPACE" OPTFLAG = $(OPTFLAG) /GL ! endif CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG) ! RCFLAGS = -DNDEBUG ! ifdef USE_MSVCRT CFLAGS = $(CFLAGS) /MD LIBC = msvcrt.lib *************** *** 714,720 **** DEBUGINFO = /ZI ! endif CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od ! RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG # The /fixed:no is needed for Quantify. LIBC = /fixed:no ! ifdef USE_MSVCRT --- 674,680 ---- DEBUGINFO = /ZI ! endif CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od ! RCFLAGS = -D_DEBUG -DDEBUG # The /fixed:no is needed for Quantify. LIBC = /fixed:no ! ifdef USE_MSVCRT *************** *** 731,741 **** RCFLAGS = $(RCFLAGS) /D_USING_V110_SDK71_ !endif - !if $(MSVC_MAJOR) >= 8 # Visual Studio 2005 has 'deprecated' many of the standard CRT functions CFLAGS_DEPR = /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE CFLAGS = $(CFLAGS) $(CFLAGS_DEPR) - !endif !include Make_all.mak !include testdir\Make_all.mak --- 691,699 ---- *************** *** 1323,1332 **** # Report link time code generation progress if used. !ifdef NODEBUG ! ! if $(MSVC_MAJOR) >= 8 ! ! if "$(OPTIMIZE)" != "SPACE" LINKARGS1 = $(LINKARGS1) /LTCG:STATUS - ! endif ! endif !endif --- 1281,1288 ---- # Report link time code generation progress if used. !ifdef NODEBUG ! ! if "$(OPTIMIZE)" != "SPACE" LINKARGS1 = $(LINKARGS1) /LTCG:STATUS ! endif !endif *** ../vim-8.2.4219/src/vim.h 2022-01-24 13:54:42.298380706 +0000 --- src/vim.h 2022-01-26 11:11:48.985391426 +0000 *************** *** 352,366 **** # define SCANF_DECIMAL_LONG_U "%llu" # define PRINTF_HEX_LONG_U "0x%llx" #else ! // Microsoft-specific. The __w64 keyword should be specified on any typedefs ! // that change size between 32-bit and 64-bit platforms. For any such type, ! // __w64 should appear only on the 32-bit definition of the typedef. ! // Define __w64 as an empty token for everything but MSVC 7.x or later. ! # ifndef _MSC_VER ! # define __w64 ! # endif ! typedef unsigned long __w64 long_u; ! typedef long __w64 long_i; # define SCANF_HEX_LONG_U "%lx" # define SCANF_DECIMAL_LONG_U "%lu" # define PRINTF_HEX_LONG_U "0x%lx" --- 352,359 ---- # define SCANF_DECIMAL_LONG_U "%llu" # define PRINTF_HEX_LONG_U "0x%llx" #else ! typedef unsigned long long_u; ! typedef long long_i; # define SCANF_HEX_LONG_U "%lx" # define SCANF_DECIMAL_LONG_U "%lu" # define PRINTF_HEX_LONG_U "0x%lx" *** ../vim-8.2.4219/src/version.c 2022-01-25 21:26:13.743440874 +0000 --- src/version.c 2022-01-26 11:13:19.939647605 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4220, /**/ -- Lawmakers made it obligatory for everybody to take at least one bath each week -- on Saturday night. [real standing law in Vermont, United States of America] /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///