* hppa-tdep.h (hppa_in_solib_call_trampoline)
[deliverable/binutils-gdb.git] / gdb / ser-tcp.c
index abe6ed4a35bee66a8f09abfb5b5f14c5fbc753cc..aed91c27654dcb792ba130e11a6196c4db05ef75 100644 (file)
@@ -1,5 +1,6 @@
-/* Serial interface for raw TCP connections on Un*x like systems
-   Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001
+/* Serial interface for raw TCP connections on Un*x like systems.
+
+   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2005
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -16,8 +17,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #include "defs.h"
 #include "serial.h"
@@ -38,7 +39,7 @@
 #ifdef USE_WIN32API
 #include <winsock2.h>
 #define ETIMEDOUT WSAETIMEDOUT
-#define close closesocket
+#define close(fd) closesocket (fd)
 #define ioctl ioctlsocket
 #else
 #include <netinet/in.h>
 #include <signal.h>
 #include "gdb_string.h"
 
+#ifndef HAVE_SOCKLEN_T
+typedef int socklen_t;
+#endif
+
 static int net_open (struct serial *scb, const char *name);
 static void net_close (struct serial *scb);
 void _initialize_ser_tcp (void);
@@ -187,7 +192,8 @@ net_open (struct serial *scb, const char *name)
 
   /* Got something.  Is it an error? */
   {
-    int res, err, len;
+    int res, err;
+    socklen_t len;
     len = sizeof(err);
     /* On Windows, the fourth parameter to getsockopt is a "char *";
        on UNIX systems it is generally "void *".  The cast to "void *"
This page took 0.027183 seconds and 4 git commands to generate.