Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: mark@codesourcery.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: Windows patch status?
Date: Mon, 18 Apr 2005 21:45:00 -0000	[thread overview]
Message-ID: <200504182144.j3ILi13s009477@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <4263CCA8.40800@codesourcery.com> (message from Mark Mitchell on Mon, 18 Apr 2005 08:05:12 -0700)

   Date: Mon, 18 Apr 2005 08:05:12 -0700
   From: Mark Mitchell <mark@codesourcery.com>

   Mark --

   After our last discussion, I posted a revised patch here:

      http://sources.redhat.com/ml/gdb-patches/2005-04/msg00054.html

   I believe that version reflects the improvements you requested.

   Have you had a chance to look at it?

Oops.  Missed it again.  I looked at it now.

   It's possible to "#define ioctl ioctlsocket" so that ioctl doesn't
   need to change. However, I think it would be very confusing to do
   "#define close closesocket" because there's already a Windows
   runtime library function called "close" -- it just doesn't work on
   sockets. So, in the version of the patch that's attached, we still
   do have a call to closesocket.

But the code only uses close for sockets isn't it?  The point I'm
trying to make is that most people changing this file will be
familliar with POSIX but not with the stupid Windows API.  I really
want this file to look as much as POSIX as possible.  Given that this
file is all about sockets, I think the #define close closesocket might
actually prevent people who are not familliar with windows from using
close() where they should use closesocket().  So I'd still like you to
change this.


+   delta = (timeout == 0 ? 0 : 1);
+   while (1)
+     {
+ 
+       /* N.B. The UI may destroy our world (for instance by calling
+          remote_stop,) in which case we want to get out of here as
+          quickly as possible.  It is not safe to touch scb, since

Can you remove the extra blank line here?


+       /* If we got a character or an error back from wait_for, then we can 
+          break from the loop before the timeout is completed. */
+ 
+       if (status != SERIAL_TIMEOUT)
+ 	{
+ 	  break;
+ 	}

and here (and get rid of the redundant braces.

+       /* If we have exhausted the original timeout, then generate
+          a SERIAL_TIMEOUT, and pass it out of the loop. */
+ 
+       else if (timeout == 0)
+ 	{
+ 	  status = SERIAL_TIMEOUT;

and get rid of that blank line too.

+   if (status <= 0)
+     {
+       if (status == 0)
+ 	return SERIAL_TIMEOUT;	/* 0 chars means timeout [may need to
+ 				   distinguish between EOF & timeouts
+ 				   someday] */
+       else
+ 	return SERIAL_ERROR;	/* Got an error from read */
+     }

Please give these long comments their own line, and make them full
sentences (full stop and two spaces at the end, you know the drill).

With those changes, please go ahead and check this in.

Mark


  reply	other threads:[~2005-04-18 21:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-18 15:05 Mark Mitchell
2005-04-18 21:45 ` Mark Kettenis [this message]
2005-04-21  5:39   ` Mark Mitchell

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=200504182144.j3ILi13s009477@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mark@codesourcery.com \
    /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