mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.1.0502: MS-Windows: too much legacy code
Problem: MS-Windows: too much legacy code Solution: Clean up old code (Ken Takata) * Remove very old codes for Cygwin version of GCC. Nowadays Cygwin GCC cannot be used for building Win32 Vim. (The `-mno-cygwin` option was removed in Cygwin GCC4.) * Remove old codes for old versions of MinGW. Remove `__MINGW32__` as much as possible. * Adjust makefile. closes: #15044 Signed-off-by: K.Takata <kentkt@csc.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
46f2823807
commit
56f587b3f8
@@ -1638,7 +1638,6 @@ $(OUTDIR)/if_tcl.obj: $(OUTDIR) if_tcl.c $(INCL)
|
|||||||
$(CC) $(CFLAGS_OUTDIR) $(TCL_INC) if_tcl.c
|
$(CC) $(CFLAGS_OUTDIR) $(TCL_INC) if_tcl.c
|
||||||
|
|
||||||
$(OUTDIR)/iscygpty.obj: $(OUTDIR) iscygpty.c $(CUI_INCL)
|
$(OUTDIR)/iscygpty.obj: $(OUTDIR) iscygpty.c $(CUI_INCL)
|
||||||
$(CC) $(CFLAGS_OUTDIR) iscygpty.c
|
|
||||||
|
|
||||||
$(OUTDIR)/job.obj: $(OUTDIR) job.c $(INCL)
|
$(OUTDIR)/job.obj: $(OUTDIR) job.c $(INCL)
|
||||||
|
|
||||||
|
@@ -274,13 +274,9 @@ gui_mch_set_rendering_options(char_u *s)
|
|||||||
|
|
||||||
// cproto fails on missing include files
|
// cproto fails on missing include files
|
||||||
#ifndef PROTO
|
#ifndef PROTO
|
||||||
|
# include <shellapi.h>
|
||||||
# ifndef __MINGW32__
|
|
||||||
# include <shellapi.h>
|
|
||||||
# endif
|
|
||||||
# include <commctrl.h>
|
# include <commctrl.h>
|
||||||
# include <windowsx.h>
|
# include <windowsx.h>
|
||||||
|
|
||||||
#endif // PROTO
|
#endif // PROTO
|
||||||
|
|
||||||
#ifdef FEAT_MENU
|
#ifdef FEAT_MENU
|
||||||
|
@@ -102,7 +102,7 @@
|
|||||||
# define WINBYTE BYTE
|
# define WINBYTE BYTE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(MSWIN) || defined(WIN32UNIX)) && !defined(__MINGW32__)
|
#if defined(MSWIN) || defined(WIN32UNIX)
|
||||||
# include <winnls.h>
|
# include <winnls.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -18,20 +18,12 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
|
// cproto fails on missing include files
|
||||||
#ifndef PROTO
|
#ifndef PROTO
|
||||||
# include <process.h>
|
# include <process.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef chdir
|
|
||||||
#ifdef __GNUC__
|
|
||||||
# ifndef __MINGW32__
|
|
||||||
# include <dirent.h>
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef PROTO
|
|
||||||
# if !defined(FEAT_GUI_MSWIN)
|
# if !defined(FEAT_GUI_MSWIN)
|
||||||
# include <shellapi.h>
|
# include <shellapi.h>
|
||||||
# endif
|
# endif
|
||||||
@@ -41,37 +33,8 @@
|
|||||||
# include <winspool.h>
|
# include <winspool.h>
|
||||||
# include <commdlg.h>
|
# include <commdlg.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#endif // PROTO
|
#endif // PROTO
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
|
||||||
# ifndef FROM_LEFT_1ST_BUTTON_PRESSED
|
|
||||||
# define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001
|
|
||||||
# endif
|
|
||||||
# ifndef RIGHTMOST_BUTTON_PRESSED
|
|
||||||
# define RIGHTMOST_BUTTON_PRESSED 0x0002
|
|
||||||
# endif
|
|
||||||
# ifndef FROM_LEFT_2ND_BUTTON_PRESSED
|
|
||||||
# define FROM_LEFT_2ND_BUTTON_PRESSED 0x0004
|
|
||||||
# endif
|
|
||||||
# ifndef FROM_LEFT_3RD_BUTTON_PRESSED
|
|
||||||
# define FROM_LEFT_3RD_BUTTON_PRESSED 0x0008
|
|
||||||
# endif
|
|
||||||
# ifndef FROM_LEFT_4TH_BUTTON_PRESSED
|
|
||||||
# define FROM_LEFT_4TH_BUTTON_PRESSED 0x0010
|
|
||||||
# endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* EventFlags
|
|
||||||
*/
|
|
||||||
# ifndef MOUSE_MOVED
|
|
||||||
# define MOUSE_MOVED 0x0001
|
|
||||||
# endif
|
|
||||||
# ifndef DOUBLE_CLICK
|
|
||||||
# define DOUBLE_CLICK 0x0002
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When generating prototypes for Win32 on Unix, these lines make the syntax
|
* When generating prototypes for Win32 on Unix, these lines make the syntax
|
||||||
* errors disappear. They do not need to be correct.
|
* errors disappear. They do not need to be correct.
|
||||||
@@ -144,37 +107,6 @@ static HWND s_hwnd = 0; // console window handle, set by GetConsoleHwnd()
|
|||||||
int WSInitialized = FALSE; // WinSock is initialized
|
int WSInitialized = FALSE; // WinSock is initialized
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Don't generate prototypes here, because some systems do have these
|
|
||||||
// functions.
|
|
||||||
#if defined(__GNUC__) && !defined(PROTO)
|
|
||||||
# ifndef __MINGW32__
|
|
||||||
int _stricoll(char *a, char *b)
|
|
||||||
{
|
|
||||||
// the ANSI-ish correct way is to use strxfrm():
|
|
||||||
char a_buff[512], b_buff[512]; // file names, so this is enough on Win32
|
|
||||||
strxfrm(a_buff, a, 512);
|
|
||||||
strxfrm(b_buff, b, 512);
|
|
||||||
return strcoll(a_buff, b_buff);
|
|
||||||
}
|
|
||||||
|
|
||||||
char * _fullpath(char *buf, char *fname, int len)
|
|
||||||
{
|
|
||||||
LPTSTR toss;
|
|
||||||
|
|
||||||
return (char *)GetFullPathName(fname, len, buf, &toss);
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# if !defined(__MINGW32__) || (__GNUC__ < 4)
|
|
||||||
int _chdrive(int drive)
|
|
||||||
{
|
|
||||||
char temp [3] = "-:";
|
|
||||||
temp[0] = drive + 'A' - 1;
|
|
||||||
return !SetCurrentDirectory(temp);
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef PROTO
|
#ifndef PROTO
|
||||||
/*
|
/*
|
||||||
|
@@ -34,52 +34,14 @@
|
|||||||
#ifndef PROTO
|
#ifndef PROTO
|
||||||
# include <process.h>
|
# include <process.h>
|
||||||
# include <winternl.h>
|
# include <winternl.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef chdir
|
|
||||||
#ifdef __GNUC__
|
|
||||||
# ifndef __MINGW32__
|
|
||||||
# include <dirent.h>
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef PROTO
|
|
||||||
# if !defined(FEAT_GUI_MSWIN)
|
# if !defined(FEAT_GUI_MSWIN)
|
||||||
# include <shellapi.h>
|
# include <shellapi.h>
|
||||||
# endif
|
# endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FEAT_JOB_CHANNEL
|
# ifdef FEAT_JOB_CHANNEL
|
||||||
# include <tlhelp32.h>
|
# include <tlhelp32.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __MINGW32__
|
|
||||||
# ifndef FROM_LEFT_1ST_BUTTON_PRESSED
|
|
||||||
# define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001
|
|
||||||
# endif
|
|
||||||
# ifndef RIGHTMOST_BUTTON_PRESSED
|
|
||||||
# define RIGHTMOST_BUTTON_PRESSED 0x0002
|
|
||||||
# endif
|
|
||||||
# ifndef FROM_LEFT_2ND_BUTTON_PRESSED
|
|
||||||
# define FROM_LEFT_2ND_BUTTON_PRESSED 0x0004
|
|
||||||
# endif
|
|
||||||
# ifndef FROM_LEFT_3RD_BUTTON_PRESSED
|
|
||||||
# define FROM_LEFT_3RD_BUTTON_PRESSED 0x0008
|
|
||||||
# endif
|
|
||||||
# ifndef FROM_LEFT_4TH_BUTTON_PRESSED
|
|
||||||
# define FROM_LEFT_4TH_BUTTON_PRESSED 0x0010
|
|
||||||
# endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* EventFlags
|
|
||||||
*/
|
|
||||||
# ifndef MOUSE_MOVED
|
|
||||||
# define MOUSE_MOVED 0x0001
|
|
||||||
# endif
|
|
||||||
# ifndef DOUBLE_CLICK
|
|
||||||
# define DOUBLE_CLICK 0x0002
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2762,12 +2724,6 @@ theend:
|
|||||||
#endif // FEAT_GUI_MSWIN
|
#endif // FEAT_GUI_MSWIN
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef PROTO
|
|
||||||
# ifndef __MINGW32__
|
|
||||||
# include <shellapi.h> // required for FindExecutable()
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return TRUE if "name" is an executable file, FALSE if not or it doesn't exist.
|
* Return TRUE if "name" is an executable file, FALSE if not or it doesn't exist.
|
||||||
* When returning TRUE and "path" is not NULL save the path and set "*path" to
|
* When returning TRUE and "path" is not NULL save the path and set "*path" to
|
||||||
@@ -5529,11 +5485,7 @@ mch_call_shell(
|
|||||||
* CTRL-C, Ctrl-Break or illegal instruction might otherwise kill us.
|
* CTRL-C, Ctrl-Break or illegal instruction might otherwise kill us.
|
||||||
*/
|
*/
|
||||||
mch_signal(SIGINT, SIG_IGN);
|
mch_signal(SIGINT, SIG_IGN);
|
||||||
#if defined(__GNUC__) && !defined(__MINGW32__)
|
|
||||||
mch_signal(SIGKILL, SIG_IGN);
|
|
||||||
#else
|
|
||||||
mch_signal(SIGBREAK, SIG_IGN);
|
mch_signal(SIGBREAK, SIG_IGN);
|
||||||
#endif
|
|
||||||
mch_signal(SIGILL, SIG_IGN);
|
mch_signal(SIGILL, SIG_IGN);
|
||||||
mch_signal(SIGFPE, SIG_IGN);
|
mch_signal(SIGFPE, SIG_IGN);
|
||||||
mch_signal(SIGSEGV, SIG_IGN);
|
mch_signal(SIGSEGV, SIG_IGN);
|
||||||
@@ -5768,11 +5720,7 @@ mch_call_shell(
|
|||||||
resettitle();
|
resettitle();
|
||||||
|
|
||||||
mch_signal(SIGINT, SIG_DFL);
|
mch_signal(SIGINT, SIG_DFL);
|
||||||
#if defined(__GNUC__) && !defined(__MINGW32__)
|
|
||||||
mch_signal(SIGKILL, SIG_DFL);
|
|
||||||
#else
|
|
||||||
mch_signal(SIGBREAK, SIG_DFL);
|
mch_signal(SIGBREAK, SIG_DFL);
|
||||||
#endif
|
|
||||||
mch_signal(SIGILL, SIG_DFL);
|
mch_signal(SIGILL, SIG_DFL);
|
||||||
mch_signal(SIGFPE, SIG_DFL);
|
mch_signal(SIGFPE, SIG_DFL);
|
||||||
mch_signal(SIGSEGV, SIG_DFL);
|
mch_signal(SIGSEGV, SIG_DFL);
|
||||||
|
@@ -704,6 +704,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 */
|
||||||
|
/**/
|
||||||
|
502,
|
||||||
/**/
|
/**/
|
||||||
501,
|
501,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user