From: Joel Brobecker <brobecker@adacore.com>
To: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] mingw port: Allow use of cvs GDB on Windows 95
Date: Mon, 21 Feb 2011 11:06:00 -0000 [thread overview]
Message-ID: <20110221102151.GG2600@adacore.com> (raw)
In-Reply-To: <002401cbc574$a8d990e0$fa8cb2a0$@muller@ics-cnrs.unistra.fr>
> 2011-02-05 Pierre Muller <muller@ics.u-strasbg.fr>
>
> Allow use of mingw native on Windows 95 OS.
> * src/gdb/ser-mingw.c (CancelIo): New macro for dynamically loaded
> DLL entry.
> (ser_windows_close): Only call CancelIo if function exists.
> (_initialize_ser_windows): Use LoadLirary/GetProcAddress
> to check for existence of CancelIo function in kernel32 DLL.
I was hoping that someone with more Windows knowledge would be able
to review this patch, but oh well...
This patch looks OK to me (ie, no risk that I can see for the other
platforms). Just a couple of remarks:
> +/* CancelIo is not available for Windows 95 OS,
> + so we need to use LoadLibrary/GetProcAddress to avoid
> + a startup failure. */
I find that the length of your lines are consistently really short
and inconsistent. I think it makes it harder to read. The above
can be reformatted to:
/* CancelIo is not available for Windows 95 OS, so we need to use
LoadLibrary/GetProcAddress to avoid a startup failure. */
(but I think you could also look at your editor to see if there is
anything that's contributing to this, especially the inconsistency
- are you using fixed fonts?)
> +#define CancelIo dyn_CancelIo
> +
> +static BOOL WINAPI (*CancelIo) (HANDLE);
I would *personally* keep these two together, to make it clearer
that the comment above applies to both. Just a thought, so don't
feel obligated to follow the suggestion if you don't agree.
> /* Stop any pending selects. */
> - CancelIo ((HANDLE) _get_osfhandle (scb->fd));
> + if (CancelIo)
> + CancelIo ((HANDLE) _get_osfhandle (scb->fd));
Can you add a comment explaining why it's OK to not call CancelIo
if it is not defined? I think you were trying to get more info
about this on this list - whatever information that you might have
gleaned...
The patch is pre-approved once the comments are addressed.
--
Joel
next prev parent reply other threads:[~2011-02-21 10:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-04 13:06 [RFC] " Compte ICS
2011-02-04 13:57 ` Pierre Muller
2011-02-05 20:38 ` [RFA] " Pierre Muller
2011-02-21 11:06 ` Joel Brobecker [this message]
2011-02-21 11:58 ` Pierre Muller
2011-02-21 12:52 ` Joel Brobecker
2011-02-21 13:35 ` Pierre Muller
2011-02-21 14:59 ` Joel Brobecker
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=20110221102151.GG2600@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/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