Re: [PATCH] Fix using gnu print on mingw

Christian Biesinger via Gdb-patches
2021-10-25T15:06:28Z

On Mon, Oct 25, 2021 at 3:53 AM Orgad Shaneh via Gdb-patches
<gdb-patches@sourceware.org> wrote:
>
> ---
> bfd/bfd-in.h | 2 +-
> bfd/bfd-in2.h | 2 +-
> gdbsupport/format.h | 6 +++++-
> gnulib/import/inttypes.in.h | 8 ++++----
> 4 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
> index 286afc607a3..6bb9622a514 100644
> --- a/bfd/bfd-in.h
> +++ b/bfd/bfd-in.h
> @@ -131,7 +131,7 @@ typedef BFD_HOST_U_64_BIT symvalue;
>
> #if BFD_HOST_64BIT_LONG
> #define BFD_VMA_FMT "l"
> -#elif defined (__MSVCRT__)
> +#elif defined(__MSVCRT__) && !defined( __USE_MINGW_ANSI_STDIO)

Can you elaborate some more on what problem this is solving and why
this is the right way to solve it?

I'm just guessing but maybe you instead want to check
defined(__MINGW32__) || defined(__MINGW64__)?

Christian