summaryrefslogtreecommitdiff
path: root/src/netbeans.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/netbeans.c')
-rw-r--r--src/netbeans.c41
1 files changed, 4 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;