windows-nat.c: conflicting declaration of struct thread_info in C++ mode
authorYuanhui Zhang <asmwarrior@gmail.com>
Mon, 16 Mar 2015 11:31:31 +0000 (11:31 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 16 Mar 2015 11:31:31 +0000 (11:31 +0000)
commit876d1cd7b5899e7927e298a7f7344a0da48425a9
treed330b7b2545f2f0979e7d9e0d4cf4cd066dd0cde
parentb57dc16f06bbe31a5dad044556d12ecda138e1c3
windows-nat.c: conflicting declaration of struct thread_info in C++ mode

Building mingw GDB with --enable-build-with-cxx shows:

 ../../binutils-gdb/gdb/windows-nat.c: At global scope:
 ../../binutils-gdb/gdb/windows-nat.c:192:1: error: conflicting declaration 'typedef struct thread_info_struct thread_info'
  thread_info;
  ^
 In file included from ../../binutils-gdb/gdb/windows-nat.c:52:0:
 ../../binutils-gdb/gdb/gdbthread.h:160:8: error: 'struct thread_info' has a previous declaration as 'struct thread_info'
  struct thread_info
 ^

Simply rename the structure to avoid the conflict.

gdb/ChangeLog:
2015-03-16  Yuanhui Zhang  <asmwarrior@gmail.com>
    Pedro Alves  <palves@redhat.com>

* windows-nat.c (struct thread_info_struct): Rename to ...
(struct windows_thread_info_struct): ... this.
(thread_info): Rename to ...
(windows_thread_info): ... this.
All users updated.
gdb/ChangeLog
gdb/windows-nat.c