windows-nat: Replace __COPY_CONTEXT_SIZE conditional with __CYGWIN__
authorJon Turney <jon.turney@dronecode.org.uk>
Wed, 3 Jun 2015 12:58:45 +0000 (13:58 +0100)
committerJon Turney <jon.turney@dronecode.org.uk>
Mon, 15 Jun 2015 11:08:15 +0000 (12:08 +0100)
Replace __COPY_CONTEXT_SIZE conditional with __CYGWIN__

__COPY_CONTEXT_SIZE was added to Cygwin's headers in 2006.

Versions of Cygwin which don't define __COPY_CONTEXT_SIZE are long obsolete.

Also see the thread starting at
https://sourceware.org/ml/gdb-patches/2015-03/msg00989.html for some discussion

Note that __COPY_CONTEXT_SIZE should just be sizeof(CONTEXT) (which is a
platform constant), but isn't due to historical mistakes in Cygwin headers.

gdb/ChangeLog:

2015-06-03  Jon Turney  <jon.turney@dronecode.org.uk>

* windows-nat.c (do_windows_fetch_inferior_registers)
(handle_output_debug_string): Replace __COPY_CONTEXT_SIZE
conditional with __CYGWIN__.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
gdb/ChangeLog
gdb/windows-nat.c

index 627d65c4545eabcfdbfe6f3c4afc3920f7f89d22..4769bada6243e5f9b1ebb41174dcdf672991a552 100644 (file)
@@ -1,3 +1,9 @@
+2015-06-03  Jon Turney  <jon.turney@dronecode.org.uk>
+
+       * windows-nat.c (do_windows_fetch_inferior_registers)
+       (handle_output_debug_string): Replace __COPY_CONTEXT_SIZE
+       conditional with __CYGWIN__.
+
 2015-06-13  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * completer.c: Add arch-utils.h include.
index 8a425113a058977454d33b10350ed03354eb3200..2f674b69ccda4c949e11f5cc7b342e21866cbb15 100644 (file)
@@ -435,7 +435,7 @@ do_windows_fetch_inferior_registers (struct regcache *regcache, int r)
 
   if (current_thread->reload_context)
     {
-#ifdef __COPY_CONTEXT_SIZE
+#ifdef __CYGWIN__
       if (have_saved_context)
        {
          /* Lie about where the program actually is stopped since
@@ -829,7 +829,7 @@ handle_output_debug_string (struct target_waitstatus *ourstatus)
          warning (("%s"), s);
        }
     }
-#ifdef __COPY_CONTEXT_SIZE
+#ifdef __CYGWIN__
   else
     {
       /* Got a cygwin signal marker.  A cygwin signal is followed by
This page took 0.030321 seconds and 4 git commands to generate.