Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Masaki MURANAKA <monaka@monami-software.com>
To: gdb-patches@sourceware.org
Subject: Re: m32r-elf target on MinGW.
Date: Sun, 16 Apr 2006 01:39:00 -0000	[thread overview]
Message-ID: <DAF6D35C-2AD7-4B53-834A-49F4A3FC76C0@monami-software.com> (raw)
In-Reply-To: <D2ECE369-21D3-46C0-AB79-4ECDDCC4D9B3@monami-software.com>

Hello,

On 2006/04/16, at 8:46, Masaki MURANAKA wrote:
> Anyway, I'll test HEAD soon.

Here is a diff from HEAD.


----
2006-04-16  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.
----
Index: m32r-rom.c
===================================================================
RCS file: /cvs/src/src/gdb/m32r-rom.c,v
retrieving revision 1.26
diff -u -r1.26 m32r-rom.c
--- m32r-rom.c  17 Dec 2005 22:34:01 -0000      1.26
+++ m32r-rom.c  16 Apr 2006 01:31:29 -0000
@@ -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 @@
      }
    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: remote-m32r-sdi.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-m32r-sdi.c,v
retrieving revision 1.17
diff -u -r1.17 remote-m32r-sdi.c
--- remote-m32r-sdi.c   24 Jan 2006 22:09:28 -0000      1.17
+++ remote-m32r-sdi.c   16 Apr 2006 01:31:30 -0000
@@ -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>

--
Masaki Muranaka
Monami software



  reply	other threads:[~2006-04-16  1:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-15 16:47 Masaki MURANAKA
2006-04-15 18:46 ` Daniel Jacobowitz
2006-04-15 23:46   ` Masaki MURANAKA
2006-04-16  1:39     ` Masaki MURANAKA [this message]
2006-04-16  6:03       ` Eli Zaretskii
2006-04-18  5:16 ` Kei Sakamoto
2006-04-18 12:55   ` Daniel Jacobowitz
2006-04-19  6:39     ` Kei Sakamoto
2006-04-18 13:41   ` Masaki MURANAKA

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DAF6D35C-2AD7-4B53-834A-49F4A3FC76C0@monami-software.com \
    --to=monaka@monami-software.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox