0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

patch 7.4.1174

Problem:    Netbeans contains dead code insde #ifdef.
Solution:   Remove the dead code.
This commit is contained in:
Bram Moolenaar 2016-01-24 22:17:03 +01:00
parent 65591001e4
commit 3e53c700a2
2 changed files with 6 additions and 37 deletions

View File

@ -27,9 +27,6 @@
#if defined(FEAT_NETBEANS_INTG) || defined(PROTO)
/* TODO: when should this not be defined? */
#define INET_SOCKETS
/* Note: when making changes here also adjust configure.in. */
#ifdef WIN32
# ifdef DEBUG
@ -49,12 +46,8 @@
# define sock_close(sd) closesocket(sd)
# define sleep(t) Sleep(t*1000) /* WinAPI Sleep() accepts milliseconds */
#else
# ifdef INET_SOCKETS
# include <netdb.h>
# include <netinet/in.h>
# else
# include <sys/un.h>
# endif
# include <netdb.h>
# include <netinet/in.h>
# include <sys/socket.h>
# ifdef HAVE_LIBGEN_H
@ -216,16 +209,12 @@ netbeans_close(void)
static int
netbeans_connect(char *params, int doabort)
{
#ifdef INET_SOCKETS
struct sockaddr_in server;
struct hostent * host;
# ifdef FEAT_GUI_W32
#ifdef FEAT_GUI_W32
u_short port;
# else
int port;
# endif
#else
struct sockaddr_un server;
int port;
#endif
int sd;
char buf[32];
@ -309,7 +298,6 @@ netbeans_connect(char *params, int doabort)
channel_init_winsock();
#endif
#ifdef INET_SOCKETS
port = atoi(address);
if ((sd = (sock_T)socket(AF_INET, SOCK_STREAM, 0)) == (sock_T)-1)
@ -332,17 +320,6 @@ netbeans_connect(char *params, int doabort)
goto theend;
}
memcpy((char *)&server.sin_addr, host->h_addr, host->h_length);
#else
if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
{
nbdebug(("error in socket() in netbeans_connect()\n"));
PERROR("socket() in netbeans_connect()");
goto theend;
}
server.sun_family = AF_UNIX;
strcpy(server.sun_path, address);
#endif
/* Connect to server */
if (connect(sd, (struct sockaddr *)&server, sizeof(server)))
{
@ -351,7 +328,6 @@ netbeans_connect(char *params, int doabort)
if (errno == ECONNREFUSED)
{
sock_close(sd);
#ifdef INET_SOCKETS
if ((sd = (sock_T)socket(AF_INET, SOCK_STREAM, 0)) == (sock_T)-1)
{
SOCK_ERRNO;
@ -359,15 +335,6 @@ netbeans_connect(char *params, int doabort)
PERROR("socket()#2 in netbeans_connect()");
goto theend;
}
#else
if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
{
SOCK_ERRNO;
nbdebug(("socket()#2 in netbeans_connect()\n"));
PERROR("socket()#2 in netbeans_connect()");
goto theend;
}
#endif
if (connect(sd, (struct sockaddr *)&server, sizeof(server)))
{
int retries = 36;

View File

@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1174,
/**/
1173,
/**/