Mercurial > vim
changeset 7753:15e67f90b9b2 v7.4.1174
commit https://github.com/vim/vim/commit/3e53c700a2bcbe7fafb51cd01f3e6428fd803099
Author: Bram Moolenaar <Bram@vim.org>
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 24 Jan 2016 22:30:04 +0100 |
parents | 926d257425e4 |
children | d2c23ce14c65 |
files | src/netbeans.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- 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 <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 +#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;