# HG changeset patch # User Christian Brabandt # Date 1453671004 -3600 # Node ID 15e67f90b9b262cc6413b476d8fd4105a39ae4d3 # Parent 926d257425e453b4e37394fb53f0788058a99046 commit https://github.com/vim/vim/commit/3e53c700a2bcbe7fafb51cd01f3e6428fd803099 Author: Bram Moolenaar Date: Sun Jan 24 22:17:03 2016 +0100 patch 7.4.1174 Problem: Netbeans contains dead code insde #ifdef. Solution: Remove the dead code. diff --git a/src/netbeans.c b/src/netbeans.c --- a/src/netbeans.c +++ b/src/netbeans.c @@ -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 -# include -# else -# include -# endif +# include +# include # include # 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 +#else int port; -# endif -#else - struct sockaddr_un server; #endif int sd; char buf[32]; @@ -309,7 +298,6 @@ netbeans_connect(char *params, int doabo 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 doabo 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 doabo 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 doabo 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; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1174, +/**/ 1173, /**/ 1172,