summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-24 22:17:03 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-24 22:17:03 +0100
commit3e53c700a2bcbe7fafb51cd01f3e6428fd803099 (patch)
tree19e54e4f0837c62605a66ddad417d4fb8f208690
parent65591001e405cbaaf9772c9375d0bb6049cf9a3a (diff)
downloadvim-git-3e53c700a2bcbe7fafb51cd01f3e6428fd803099.tar.gz
patch 7.4.1174v7.4.1174
Problem: Netbeans contains dead code insde #ifdef. Solution: Remove the dead code.
-rw-r--r--src/netbeans.c41
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 37 deletions
diff --git a/src/netbeans.c b/src/netbeans.c
index 14f274df1..0b9ea134f 100644
--- 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
- 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;
diff --git a/src/version.c b/src/version.c
index 49b5225cc..042454f06 100644
--- 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,