Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Orgad Shaneh via Gdb-patches <gdb-patches@sourceware.org>
To: Christian Biesinger <cbiesinger@google.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix using gnu print on mingw
Date: Mon, 25 Oct 2021 18:14:38 +0300	[thread overview]
Message-ID: <CAGHpTBKk_QBajE1hH9E1wXFFGPuo7f9as=W_v57tMg2H09hKtQ@mail.gmail.com> (raw)
In-Reply-To: <CAPTJ0XFU859aXRP9FXMDjpDVQhBeL2dKPGQe=KSGAR3uV67-Mw@mail.gmail.com>

On Mon, Oct 25, 2021 at 6:05 PM Christian Biesinger <cbiesinger@google.com>
wrote:

> 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
>

MinGW (both 32 and 64) uses (and defines) MSVCRT by default, but it has 2
working modes. If __USE_MINGW_ANSI_STDIO is defined as 1 (this is the case
for C++11, or when _GNU_SOURCE is defined, or some other defines), then
modifiers like %ll ARE supported. If it is 0, then they're not.

Actually the conditions should be ! instead of !defined. I'll fix the patch.

- Orgad

  reply	other threads:[~2021-10-25 15:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25  7:52 Orgad Shaneh via Gdb-patches
2021-10-25 15:04 ` Christian Biesinger via Gdb-patches
2021-10-25 15:14   ` Orgad Shaneh via Gdb-patches [this message]
2021-10-25 15:42 Orgad Shaneh via Gdb-patches

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='CAGHpTBKk_QBajE1hH9E1wXFFGPuo7f9as=W_v57tMg2H09hKtQ@mail.gmail.com' \
    --to=gdb-patches@sourceware.org \
    --cc=cbiesinger@google.com \
    --cc=orgads@gmail.com \
    /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