mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.2052: win32: using deprecated wsock32 api
Problem: win32: using deprecated wsock32 api Solution: Use winsock2 (ws2_32) consistently win32: Stop using wsock32 We have already used ws2_32 (winsock2) and already dropped support for Windows 95 and NT4. So, we don't need to care about wsock32. Use ws2_32 consistently. closes: #13383 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Ken Takata <kentkt@csc.jp>
This commit is contained in:
parent
00b55370b3
commit
c6944913f0
@ -923,7 +923,7 @@ endif
|
|||||||
|
|
||||||
ifeq ($(CHANNEL),yes)
|
ifeq ($(CHANNEL),yes)
|
||||||
OBJ += $(OUTDIR)/job.o $(OUTDIR)/channel.o
|
OBJ += $(OUTDIR)/job.o $(OUTDIR)/channel.o
|
||||||
LIB += -lwsock32 -lws2_32
|
LIB += -lws2_32
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(DIRECTX),yes)
|
ifeq ($(DIRECTX),yes)
|
||||||
|
@ -420,7 +420,6 @@ NBDEBUG_DEFS = -DNBDEBUG
|
|||||||
NBDEBUG_INCL = nbdebug.h
|
NBDEBUG_INCL = nbdebug.h
|
||||||
NBDEBUG_SRC = nbdebug.c
|
NBDEBUG_SRC = nbdebug.c
|
||||||
! endif
|
! endif
|
||||||
NETBEANS_LIB = WSock32.lib
|
|
||||||
! endif
|
! endif
|
||||||
|
|
||||||
# DirectWrite (DirectX)
|
# DirectWrite (DirectX)
|
||||||
@ -473,7 +472,7 @@ CHANNEL_PRO = proto/job.pro proto/channel.pro
|
|||||||
CHANNEL_OBJ = $(OBJDIR)/job.obj $(OBJDIR)/channel.obj
|
CHANNEL_OBJ = $(OBJDIR)/job.obj $(OBJDIR)/channel.obj
|
||||||
CHANNEL_DEFS = -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP
|
CHANNEL_DEFS = -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DHAVE_INET_NTOP
|
||||||
|
|
||||||
NETBEANS_LIB = WSock32.lib Ws2_32.lib
|
NETBEANS_LIB = Ws2_32.lib
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
# need advapi32.lib for GetUserName()
|
# need advapi32.lib for GetUserName()
|
||||||
|
@ -10,13 +10,6 @@
|
|||||||
* Implements communication through a socket or any file handle.
|
* Implements communication through a socket or any file handle.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
// Must include winsock2.h before windows.h since it conflicts with winsock.h
|
|
||||||
// (included in windows.h).
|
|
||||||
# include <winsock2.h>
|
|
||||||
# include <ws2tcpip.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "vim.h"
|
#include "vim.h"
|
||||||
|
|
||||||
#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
|
#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
|
||||||
|
@ -24,17 +24,6 @@
|
|||||||
# define _USE_32BIT_TIME_T
|
# define _USE_32BIT_TIME_T
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* Prevent including winsock.h. perl.h tries to detect whether winsock.h is
|
|
||||||
* already included before including winsock2.h, because winsock2.h isn't
|
|
||||||
* compatible with winsock.h. However the detection doesn't work with some
|
|
||||||
* versions of MinGW. If WIN32_LEAN_AND_MEAN is defined, windows.h will not
|
|
||||||
* include winsock.h.
|
|
||||||
*/
|
|
||||||
#ifdef WIN32
|
|
||||||
# define WIN32_LEAN_AND_MEAN
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "vim.h"
|
#include "vim.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
@ -85,6 +85,10 @@
|
|||||||
# define COBJMACROS // For OLE: Enable "friendlier" access to objects
|
# define COBJMACROS // For OLE: Enable "friendlier" access to objects
|
||||||
#endif
|
#endif
|
||||||
#ifndef PROTO
|
#ifndef PROTO
|
||||||
|
// Must include winsock2.h before windows.h since it conflicts with winsock.h
|
||||||
|
// (included in windows.h).
|
||||||
|
# include <winsock2.h>
|
||||||
|
# include <ws2tcpip.h>
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
|
||||||
// Weird: rpcndr.h defines "small" to "char", which causes trouble
|
// Weird: rpcndr.h defines "small" to "char", which causes trouble
|
||||||
|
@ -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 */
|
||||||
|
/**/
|
||||||
|
2052,
|
||||||
/**/
|
/**/
|
||||||
2051,
|
2051,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user