mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.0248: MS-Windows: dealing with deprecation is too complicated
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)
This commit is contained in:
parent
3b0ef8cfdb
commit
2f18975088
1
Filelist
1
Filelist
@ -529,7 +529,6 @@ SRC_DOS = \
|
|||||||
src/uninstall.c \
|
src/uninstall.c \
|
||||||
src/vim.def \
|
src/vim.def \
|
||||||
src/vim.rc \
|
src/vim.rc \
|
||||||
src/vimio.h \
|
|
||||||
src/gvim.exe.mnf \
|
src/gvim.exe.mnf \
|
||||||
src/vimrun.c \
|
src/vimrun.c \
|
||||||
src/xpm_w32.c \
|
src/xpm_w32.c \
|
||||||
|
@ -658,7 +658,8 @@ OPTFLAG = /Ox
|
|||||||
OPTFLAG = $(OPTFLAG) /GL
|
OPTFLAG = $(OPTFLAG) /GL
|
||||||
! endif
|
! endif
|
||||||
# Visual Studio 2005 has 'deprecated' many of the standard CRT functions
|
# Visual Studio 2005 has 'deprecated' many of the standard CRT functions
|
||||||
CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
|
CFLAGS_DEPR = /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
|
||||||
|
CFLAGS = $(CFLAGS) $(CFLAGS_DEPR)
|
||||||
! endif
|
! endif
|
||||||
|
|
||||||
# (/Wp64 is deprecated in VC9 and generates an obnoxious warning.)
|
# (/Wp64 is deprecated in VC9 and generates an obnoxious warning.)
|
||||||
@ -1348,15 +1349,17 @@ $(VIM): $(VIM).exe
|
|||||||
$(OUTDIR):
|
$(OUTDIR):
|
||||||
if not exist $(OUTDIR)/nul mkdir $(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
|
install.exe: dosinst.c dosinst.h version.h
|
||||||
$(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib \
|
$(CC) $(CFLAGS_INST) dosinst.c kernel32.lib shell32.lib \
|
||||||
user32.lib ole32.lib advapi32.lib uuid.lib \
|
user32.lib ole32.lib advapi32.lib uuid.lib \
|
||||||
-link -subsystem:$(SUBSYSTEM_TOOLS)
|
-link -subsystem:$(SUBSYSTEM_TOOLS)
|
||||||
- if exist install.exe del install.exe
|
- if exist install.exe del install.exe
|
||||||
ren dosinst.exe install.exe
|
ren dosinst.exe install.exe
|
||||||
|
|
||||||
uninstall.exe: uninstall.c dosinst.h version.h
|
uninstall.exe: uninstall.c dosinst.h version.h
|
||||||
$(CC) /nologo -DNDEBUG -DWIN32 uninstall.c shell32.lib advapi32.lib \
|
$(CC) $(CFLAGS_INST) uninstall.c shell32.lib advapi32.lib \
|
||||||
-link -subsystem:$(SUBSYSTEM_TOOLS)
|
-link -subsystem:$(SUBSYSTEM_TOOLS)
|
||||||
|
|
||||||
vimrun.exe: vimrun.c
|
vimrun.exe: vimrun.c
|
||||||
|
@ -10,12 +10,6 @@
|
|||||||
* dosinst.h: Common code for dosinst.c and uninstall.c
|
* 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 <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -23,7 +17,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#ifndef UNIX_LINT
|
#ifndef UNIX_LINT
|
||||||
# include "vimio.h"
|
# include <io.h>
|
||||||
# include <ctype.h>
|
# include <ctype.h>
|
||||||
|
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
|
@ -742,6 +742,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
248,
|
||||||
/**/
|
/**/
|
||||||
247,
|
247,
|
||||||
/**/
|
/**/
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MSWIN
|
#ifdef MSWIN
|
||||||
# include "vimio.h"
|
# include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ============ the header file puzzle: order matters =========
|
// ============ the header file puzzle: order matters =========
|
||||||
|
13
src/vimio.h
13
src/vimio.h
@ -1,13 +0,0 @@
|
|||||||
/* 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 <io.h>
|
|
||||||
#endif
|
|
@ -14,7 +14,6 @@
|
|||||||
* Also used by Cygwin, using os_unix.c.
|
* Also used by Cygwin, using os_unix.c.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "vimio.h"
|
|
||||||
#include "vim.h"
|
#include "vim.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user