m32r-elf target on MinGW.

Masaki MURANAKA
2006-04-15T16:47:24Z

Hello,

This is a patch that enables to build m32r-elf target on MinGW host.
The base version of this patch is gdb-6.4.

----
2006-04-16 Masaki MURANAKA <monaka@monami-software.com>

* m32r-rom.c: On MinGW, include winsock.h instead of socket.h
* remote-m32r-sdi.c: On MinGW, include winsock.h instead of
socket.h. And calls WSAStartup().
----

Index: gdb/m32r-rom.c
===================================================================
RCS file: /home/cvs/pizzafactory/gdb/gdb/m32r-rom.c,v
retrieving revision 1.1.1.4
diff -r1.1.1.4 m32r-rom.c
49a50,52
> #ifdef __MINGW32__
> #include <winsock.h>
> #else
55c58
<
---
> #endif
414a418,424
> #ifdef __MINGW32__
> WSADATA wd;
> /* Winsock initialization. */
> if (WSAStartup (MAKEWORD (1, 1), &wd))
> error (_("Couldn't initialize WINSOCK."));
> #endif
>
Index: gdb/remote-m32r-sdi.c
===================================================================
RCS file: /home/cvs/pizzafactory/gdb/gdb/remote-m32r-sdi.c,v
retrieving revision 1.1.1.2
diff -r1.1.1.2 remote-m32r-sdi.c
33a34,36
> #ifdef __MINGW32__
> #include <winsock.h>
> #else
34a38
> #endif

--
Masaki Muranaka
Monami software