From: Joel Brobecker <brobecker@adacore.com>
To: Dave Murphy <davem@devkitpro.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] build powerpc sim for mingw host
Date: Wed, 13 Feb 2008 23:39:00 -0000 [thread overview]
Message-ID: <20080213233916.GA3713@adacore.com> (raw)
In-Reply-To: <47ACE034.6020802@devkitpro.org>
Hi Dave,
I'm not a simulator maintainer, so I can't actually approve your patch,
but I took a look.
> @@ -128,7 +128,7 @@
> file->pos = file->buffer;
>
> /* read it in */
> -#ifdef __CYGWIN32__
> +#ifdef __WIN32__
> if ((file->size) && ((nr = read(fd, file->buffer, file->size)) <= 0)) {
> #else
> if ((nr = read(fd, file->buffer, file->size)) < file->size) {
I don't think this is right. It looks like you are breaking the simulator
on cygwin, or at least changing the behavior, because the cygwin GCC
doesn't define __WIN32__ (I just tried it on a windows machine).
The current usage in GDB suggests that you want to use:
#if defined(_WIN32) || defined (__CYGWIN32__)
Question to the Windows specialists:
In the GDB sources, we exclusively use the __CYGWIN__ macro, whereas
in the simulator sources, we use __CYGWIN32__. The name of the latter
macro suggests that this macro is going to be defined only on 32bit
processors whereas the code above might be general to all cygwin
versions, regardless of the CPU type. Should the above be changed to:
#if defined(_WIN32) || defined (__CYGWIN__)
?
There is another file (sim/common/dv-sockser.c) where the inclusion
of <netinet/tcp.h> is conditional on __CYGWIN32__.
--
Joel
next prev parent reply other threads:[~2008-02-13 23:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 23:05 Dave Murphy
2008-02-13 23:39 ` Joel Brobecker [this message]
2008-02-13 23:48 ` Brian Dessent
2008-02-14 0:42 ` Daniel Jacobowitz
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=20080213233916.GA3713@adacore.com \
--to=brobecker@adacore.com \
--cc=davem@devkitpro.org \
--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