2006-04-19 Masaki Muranaka <monaka@monami-software.com>
authorKazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
Wed, 19 Apr 2006 06:36:37 +0000 (06:36 +0000)
committerKazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
Wed, 19 Apr 2006 06:36:37 +0000 (06:36 +0000)
        * m32r-rom.c: On MinGW, include winsock.h instead of sys/types.h,
        netdb.h, netinet/in.h.
        (m32r_upload_command); Add calls WSAStartup().
        * remote-m32r-sdi.c: On MinGW, include winsock.h instead of
        netinet/in.h.

gdb/ChangeLog
gdb/m32r-rom.c
gdb/remote-m32r-sdi.c

index b2f1e91f0186c578a1837bddb424a8c7c6d1b69f..3597bc0e15594494ebfde25cc866d576a54699d6 100644 (file)
@@ -1,3 +1,11 @@
+2006-04-19  Masaki Muranaka  <monaka@monami-software.com>
+
+       * m32r-rom.c: On MinGW, include winsock.h instead of sys/types.h,
+       netdb.h, netinet/in.h.
+       (m32r_upload_command); Add calls WSAStartup().
+       * remote-m32r-sdi.c: On MinGW, include winsock.h instead of
+       netinet/in.h.
+
 2006-04-18  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * breakpoint.c (deprecated_read_memory_nobpt): Update to use
index ca8b29e1c00ccd20176636cbdd08a31bfc7b1805..a31e0d288c00102eba9d61b0423e9f99c0be7a68 100644 (file)
 /*
  * All this stuff just to get my host computer's IP address!
  */
+#ifdef __MINGW32__
+#include <winsock.h>
+#else
 #include <sys/types.h>
 #include <netdb.h>             /* for hostent */
 #include <netinet/in.h>                /* for struct in_addr */
 #if 1
 #include <arpa/inet.h>         /* for inet_ntoa */
 #endif
+#endif
 
 static char *board_addr;       /* user-settable IP address for M32R-EVA */
 static char *server_addr;      /* user-settable IP address for gdb host */
@@ -435,6 +439,13 @@ m32r_upload_command (char *args, int from_tty)
     }
   if (server_addr == 0)
     {
+#ifdef __MINGW32__
+      WSADATA wd;
+      /* Winsock initialization. */
+      if (WSAStartup (MAKEWORD (1, 1), &wd))
+       error (_("Couldn't initialize WINSOCK."));
+#endif
+
       buf[0] = 0;
       gethostname (buf, sizeof (buf));
       if (buf[0] != 0)
index 8da4fd3023aeaccd4bd1a516d1e5bfeafab0f39f..b2033166de396e283e8879dafff14442561683cd 100644 (file)
 #include "gdb_string.h"
 #include <ctype.h>
 #include <signal.h>
+#ifdef __MINGW32__
+#include <winsock.h>
+#else
 #include <netinet/in.h>
+#endif
 #include <sys/types.h>
 #include <sys/time.h>
 #include <signal.h>