To: vim_dev@googlegroups.com Subject: Patch 8.2.0248 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0248 Problem: MS-Windows: dealing with deprecation is too complicated. Solution: Use io.h directly. Move _CRT_SECURE_NO_DEPRECATE to the build file. Suppress C4091 warning by setting "_WIN32_WINNT". (Ken Takata, closes #5626) Files: src/Make_mvc.mak, src/dosinst.h, src/vim.h, src/vimio.h, src/winclip.c, Filelist *** ../vim-8.2.0247/src/Make_mvc.mak 2020-02-11 23:01:35.755291962 +0100 --- src/Make_mvc.mak 2020-02-12 21:09:58.444792484 +0100 *************** *** 658,664 **** OPTFLAG = $(OPTFLAG) /GL ! endif # Visual Studio 2005 has 'deprecated' many of the standard CRT functions ! CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE ! endif # (/Wp64 is deprecated in VC9 and generates an obnoxious warning.) --- 658,665 ---- OPTFLAG = $(OPTFLAG) /GL ! endif # 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 # (/Wp64 is deprecated in VC9 and generates an obnoxious warning.) *************** *** 1348,1362 **** $(OUTDIR): if not exist $(OUTDIR)/nul mkdir $(OUTDIR) install.exe: dosinst.c dosinst.h version.h ! $(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib \ user32.lib ole32.lib advapi32.lib uuid.lib \ -link -subsystem:$(SUBSYSTEM_TOOLS) - if exist install.exe del install.exe ren dosinst.exe install.exe uninstall.exe: uninstall.c dosinst.h version.h ! $(CC) /nologo -DNDEBUG -DWIN32 uninstall.c shell32.lib advapi32.lib \ -link -subsystem:$(SUBSYSTEM_TOOLS) vimrun.exe: vimrun.c --- 1349,1365 ---- $(OUTDIR): if not exist $(OUTDIR)/nul mkdir $(OUTDIR) + CFLAGS_INST = /nologo -DNDEBUG -DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) $(CFLAGS_DEPR) + install.exe: dosinst.c dosinst.h version.h ! $(CC) $(CFLAGS_INST) dosinst.c kernel32.lib shell32.lib \ user32.lib ole32.lib advapi32.lib uuid.lib \ -link -subsystem:$(SUBSYSTEM_TOOLS) - if exist install.exe del install.exe ren dosinst.exe install.exe uninstall.exe: uninstall.c dosinst.h version.h ! $(CC) $(CFLAGS_INST) uninstall.c shell32.lib advapi32.lib \ -link -subsystem:$(SUBSYSTEM_TOOLS) vimrun.exe: vimrun.c *** ../vim-8.2.0247/src/dosinst.h 2019-11-30 18:10:13.000000000 +0100 --- src/dosinst.h 2020-02-12 21:09:58.444792484 +0100 *************** *** 10,21 **** * dosinst.h: Common code for dosinst.c and uninstall.c */ - // Visual Studio 2005 has 'deprecated' many of the standard CRT functions - #if _MSC_VER >= 1400 - # define _CRT_SECURE_NO_DEPRECATE - # define _CRT_NONSTDC_NO_DEPRECATE - #endif - #include #include #include --- 10,15 ---- *************** *** 23,29 **** #include #ifndef UNIX_LINT ! # include "vimio.h" # include # include --- 17,23 ---- #include #ifndef UNIX_LINT ! # include # include # include *** ../vim-8.2.0247/src/vim.h 2020-02-11 23:01:35.759291941 +0100 --- src/vim.h 2020-02-12 21:09:58.444792484 +0100 *************** *** 18,24 **** #endif #ifdef MSWIN ! # include "vimio.h" #endif // ============ the header file puzzle: order matters ========= --- 18,24 ---- #endif #ifdef MSWIN ! # include #endif // ============ the header file puzzle: order matters ========= *** ../vim-8.2.0247/src/vimio.h 2020-02-11 23:01:35.759291941 +0100 --- src/vimio.h 1970-01-01 01:00:00.000000000 +0100 *************** *** 1,13 **** - /* vi:set ts=8 sts=4 sw=4 noet: - * - * VIM - Vi IMproved by Bram Moolenaar - * - * Do ":help uganda" in Vim to read copying and usage conditions. - * Do ":help credits" in Vim to see a list of people who contributed. - * See README.txt for an overview of the Vim source code. - */ - - // cproto fails on missing include files - #ifndef PROTO - # include - #endif --- 0 ---- *** ../vim-8.2.0247/src/winclip.c 2019-12-05 21:43:22.000000000 +0100 --- src/winclip.c 2020-02-12 21:09:58.444792484 +0100 *************** *** 14,20 **** * Also used by Cygwin, using os_unix.c. */ - #include "vimio.h" #include "vim.h" /* --- 14,19 ---- *** ../vim-8.2.0247/Filelist 2020-01-26 22:05:01.030873636 +0100 --- Filelist 2020-02-12 21:14:52.659669120 +0100 *************** *** 529,535 **** src/uninstall.c \ src/vim.def \ src/vim.rc \ - src/vimio.h \ src/gvim.exe.mnf \ src/vimrun.c \ src/xpm_w32.c \ --- 529,534 ---- *** ../vim-8.2.0247/src/version.c 2020-02-12 21:03:28.902269345 +0100 --- src/version.c 2020-02-12 21:12:04.244312675 +0100 *************** *** 744,745 **** --- 744,747 ---- { /* Add new patch number below this line */ + /**/ + 248, /**/ -- hundred-and-one symptoms of being an internet addict: 62. If your doorbell rings, you think that new mail has arrived. And then you're disappointed that it's only someone at the door. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///