From: i.nixman@autistici.org
To: Eli Zaretskii <eliz@gnu.org>, gdb@sourceware.org
Subject: Re: _WIN32_WINNT redefined?
Date: Wed, 02 Nov 2022 15:51:05 +0000 [thread overview]
Message-ID: <821f45f4fe87dc1dcea23520dd8e42ab@autistici.org> (raw)
In-Reply-To: <83h6zh9ygb.fsf@gnu.org>
On 2022-11-02 15:18, Eli Zaretskii wrote:
> Then the stuff in common-defs.h should be augmented to define
> _WIN32_WINNT to the value 0x0600 or greater, if it isn't already high
> enough, but only if the patch for gthreads is being used. How exactly
> to write the cpp conditional for that, I don't know, but hopefully you
> will be able to figure that out.
no.
just for eyes:
74 #if defined (__MINGW32__) || defined (__CYGWIN__)
75 # ifdef _WIN32_WINNT
76 # if _WIN32_WINNT < 0x0501
77 # undef _WIN32_WINNT
78 # define _WIN32_WINNT 0x0501
79 # endif
80 # else
81 # define _WIN32_WINNT 0x0501
82 # endif
83 #endif /* __MINGW32__ || __CYGWIN__ */
the condition on line 75 is always false, because none of the inclusions
above include neither `windows.h` nor `winver.h`.
it can be solved by inclusion `windows.h` after line 74.
but I did it and faced with another error:
```
CXX gdb.o
CXX ada-exp.o
ada-exp.c.tmp:557: warning: "IN" redefined
In file included from
C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/windef.h:9,
from
C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/windows.h:69,
from
../../../../src/gdb-11.2/gdb/../gdbsupport/common-defs.h:75,
from ../../../../src/gdb-11.2/gdb/defs.h:28,
from ada-exp.y:38:
C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/minwindef.h:57:
note: this is the location of the previous definition
57 | #define IN
|
ada-exp.c.tmp:482:11: error: 'INT' redeclared as different kind of
entity
In file included from
C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/minwindef.h:163:
C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/winnt.h:299:15:
note: previous declaration 'typedef int INT'
299 | typedef int INT;
| ^~~
ada-exp.c.tmp:485:13: error: 'FLOAT' redeclared as different kind of
entity
C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/minwindef.h:142:17:
note: previous declaration 'typedef float FLOAT'
142 | typedef float FLOAT;
| ^~~~~
```
in that case I couldn't figure out why the `ada-exp.c.tmp` file is
mentioned in the error message but I don't see anything that looks like
an error in the `ada-exp.c` file.
I think `ada-exp.c.tmp` is some kind of generated file... I don't know
what and how should I fix in that case %)
> Or maybe you should do that in gdbsupport/thread-pool.cc instead.
> Whatever is easier.
I will think on it...
> One thing is certain: GDB builds on Windows that don't use the gthread
> patch should not be broken by increasing the minimum value of
> _WIN32_WINNT with which GDB can be built on Windows.
I understand.
I have another option. will try and report back.
best!
next prev parent reply other threads:[~2022-11-02 15:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 8:14 i.nixman
2022-11-02 8:21 ` i.nixman
2022-11-02 8:44 ` i.nixman
2022-11-02 9:46 ` i.nixman
2022-11-02 10:15 ` i.nixman
2022-11-02 12:59 ` Eli Zaretskii
2022-11-02 13:10 ` Jeffrey Walton
2022-11-02 13:26 ` Eli Zaretskii
2022-11-02 12:50 ` Eli Zaretskii
2022-11-02 14:13 ` i.nixman
2022-11-02 15:18 ` Eli Zaretskii
2022-11-02 15:51 ` i.nixman [this message]
2022-11-02 16:02 ` i.nixman
2022-11-02 16:51 ` Eli Zaretskii
2022-11-02 17:20 ` i.nixman
2022-11-02 18:13 ` Eli Zaretskii
2022-11-02 12:55 ` Eli Zaretskii
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=821f45f4fe87dc1dcea23520dd8e42ab@autistici.org \
--to=i.nixman@autistici.org \
--cc=eliz@gnu.org \
--cc=gdb@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).