diff options
author | Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> | 2006-04-19 06:36:37 +0000 |
---|---|---|
committer | Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> | 2006-04-19 06:36:37 +0000 |
commit | cbba9205ada30ff191b4fad2936986f9b293d3ce (patch) | |
tree | c0cc8251d93a66c9ecab039671712e3de5079de5 /gdb | |
parent | 7c6646cd4bb737511abda361b27386a8a77a1147 (diff) | |
download | gdb-cbba9205ada30ff191b4fad2936986f9b293d3ce.zip gdb-cbba9205ada30ff191b4fad2936986f9b293d3ce.tar.gz gdb-cbba9205ada30ff191b4fad2936986f9b293d3ce.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/m32r-rom.c | 11 | ||||
-rw-r--r-- | gdb/remote-m32r-sdi.c | 4 |
3 files changed, 23 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b2f1e91..3597bc0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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 diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c index ca8b29e..a31e0d2 100644 --- a/gdb/m32r-rom.c +++ b/gdb/m32r-rom.c @@ -46,12 +46,16 @@ /* * 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) diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c index 8da4fd3..b203316 100644 --- a/gdb/remote-m32r-sdi.c +++ b/gdb/remote-m32r-sdi.c @@ -31,7 +31,11 @@ #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> |