This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: MinGW readline -- revised


Daniel Jacobowitz wrote:

1) Minor bit-rot in remote-sim.c and ser-tcp.c on MinGW.  In
  particular, SIGTRAP is being used unconditionally in the former,
  and the MinGW definition of "close" (in terms of "closesocket")
  needs to be a function-like macro, so as to avoid confusion in
  code like "ops->close = net_close".
I'm not sure why you call this "bit-rot".

This configuration worked in the past for me, but does not work now. Perhaps that's due to something in my environment that has changed, or use of some other patch to the source code I was testing, or a different --target setting, or something. In any case, I hereby withdraw the use of the word bit-rot!


I am inclined to go with Paul's patch for the nonce.

OK; consider that hunk withrdrawn until we figure out what to do instead.


Similarly the reference to ops->close is from 2002.

Independently of that, may I check in the change that fixes it? This change is entirely within MinGW-#ifdef'd code, and is purely syntactic in nature.


For clarity, here is the patch:

2005-07-18 Mark Mitchell <mark@codesourcery.com>

* ser-tcp.c (close): Define as a function-like macro on MinGW.

Index: ser-tcp.c
===================================================================
RCS file: /cvs/src/src/gdb/ser-tcp.c,v
retrieving revision 1.23
diff -c -5 -p -r1.23 ser-tcp.c
*** ser-tcp.c   13 Jun 2005 21:31:57 -0000      1.23
--- ser-tcp.c   24 Jul 2005 22:45:25 -0000
***************
*** 37,47 ****
  #include <sys/time.h>

  #ifdef USE_WIN32API
  #include <winsock2.h>
  #define ETIMEDOUT WSAETIMEDOUT
! #define close closesocket
  #define ioctl ioctlsocket
  #else
  #include <netinet/in.h>
  #include <arpa/inet.h>
  #include <netdb.h>
--- 37,47 ----
  #include <sys/time.h>

  #ifdef USE_WIN32API
  #include <winsock2.h>
  #define ETIMEDOUT WSAETIMEDOUT
! #define close(fd) closesocket (fd)
  #define ioctl ioctlsocket
  #else
  #include <netinet/in.h>
  #include <arpa/inet.h>
  #include <netdb.h>

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]