Patch 7.4.1174
Problem:    Netbeans contains dead code insde #ifndef INIT_SOCKETS.
Solution:   Remove the dead code.
Files:      src/netbeans.c


*** ../vim-7.4.1173/src/netbeans.c      2016-01-24 20:36:18.854082474 +0100
--- src/netbeans.c      2016-01-24 22:14:35.800374527 +0100
***************
*** 27,35 ****
  
  #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
--- 27,32 ----
***************
*** 49,60 ****
  # 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 <sys/socket.h>
  # ifdef HAVE_LIBGEN_H
--- 46,53 ----
  # define sock_close(sd) closesocket(sd)
  # define sleep(t) Sleep(t*1000) /* WinAPI Sleep() accepts milliseconds */
  #else
! # include <netdb.h>
! # include <netinet/in.h>
  
  # include <sys/socket.h>
  # ifdef HAVE_LIBGEN_H
***************
*** 216,231 ****
      static int
  netbeans_connect(char *params, int doabort)
  {
- #ifdef INET_SOCKETS
      struct sockaddr_in        server;
      struct hostent *  host;
! # ifdef FEAT_GUI_W32
      u_short           port;
- # else
-     int                       port;
- # endif
  #else
!     struct sockaddr_un        server;
  #endif
      int               sd;
      char      buf[32];
--- 209,220 ----
      static int
  netbeans_connect(char *params, int doabort)
  {
      struct sockaddr_in        server;
      struct hostent *  host;
! #ifdef FEAT_GUI_W32
      u_short           port;
  #else
!     int                       port;
  #endif
      int               sd;
      char      buf[32];
***************
*** 309,315 ****
      channel_init_winsock();
  #endif
  
- #ifdef INET_SOCKETS
      port = atoi(address);
  
      if ((sd = (sock_T)socket(AF_INET, SOCK_STREAM, 0)) == (sock_T)-1)
--- 298,303 ----
***************
*** 332,348 ****
        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)))
      {
--- 320,325 ----
***************
*** 351,357 ****
        if (errno == ECONNREFUSED)
        {
            sock_close(sd);
- #ifdef INET_SOCKETS
            if ((sd = (sock_T)socket(AF_INET, SOCK_STREAM, 0)) == (sock_T)-1)
            {
                SOCK_ERRNO;
--- 328,333 ----
***************
*** 359,373 ****
                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;
--- 335,340 ----
*** ../vim-7.4.1173/src/version.c       2016-01-24 21:51:52.838704254 +0100
--- src/version.c       2016-01-24 22:15:19.419916336 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     1174,
  /**/

-- 
You have the right to remain silent. Anything you say will be
misquoted, then used against you.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui