Re: _WIN32_WINNT redefined?

Eli Zaretskii via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
> Date: Wed, 02 Nov 2022 15:51:05 +0000
> From: [email protected]
> 
> 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`.

That's on your system, with your MinGW w32api headers.  But that's not
the only game in town.

> it can be solved by inclusion `windows.h` after line 74.
> but I did it and faced with another error:

That's not what I suggested.  I suggested that you augment the above
cpp conditionals such that when the gthread patch is in use,
_WIN32_WINNT is defined to 0x0600, and otherwise to 0x0501, as before.

The question is: what could be a preprocessor conditional to determine
whether the gthread patch is used, so that it could be used to augment
the above.  This is something I cannot answer, but I hope you can.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.