From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MdoZKQ/OdmFReAAAWB0awg (envelope-from ) for ; Mon, 25 Oct 2021 11:32:31 -0400 Received: by simark.ca (Postfix, from userid 112) id 97EBD1F0BD; Mon, 25 Oct 2021 11:32:31 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DED951EDDB for ; Mon, 25 Oct 2021 11:32:30 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3A46B3858438 for ; Mon, 25 Oct 2021 15:32:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A46B3858438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635175949; bh=WQdRJu0Qutt9OWpDSq0SQbtBYr8byxsIHJXiCFSND+A=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ibnrXrDutwrQW4M5f3TAp2Y53V5kvXPo6qKIsDUfrDAeY3tZgIEz97/1iQjlhBPC8 7RyNOFX/fVE4hXLeZUTONMVXT0D3DMTQordxyohTh00d7aFfa0CrgLoZhbLs6/WkRQ K4QYc4PjLPlxlmQVAt/T/mazOFiQEkfJgy5fUR4Q= Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by sourceware.org (Postfix) with ESMTPS id 200CA3858C27 for ; Mon, 25 Oct 2021 15:14:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 200CA3858C27 Received: by mail-pj1-x1035.google.com with SMTP id t5-20020a17090a4e4500b001a0a284fcc2so11706804pjl.2 for ; Mon, 25 Oct 2021 08:14:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1WXSd8nUDPzRoZ28boo4V8S/n5x9wlgbraEdK0hZbIM=; b=p4sPrS46w209R7yE2Y1rJw7ALEiDQNsaq4y6QK4hqNmnlphp+Vl8yJx1L/K8+TVLae 3sh2tcrOvRwElTEzV1CUYWu4JzJWqSlQkzy09fMl1+5VrEeiZqc2XBRnWYOr/Ia/S/dK g0dzlos1h/1NvJGNk6aLt35scvY52yvYnk+lexPLbjbBNRmy/GPvn5YJxhSLnsAKerQx 7Klz8FV42YvkRejYAGTZflmOkRnNG2vlm2OG8xv63UhZDZR5mRDhzwWsfLwbECy3Qulh 7iU55kRkkvkBk5roW85dPf0kpJ0QtI5gTOpAGqFtJkz8tPbZa99FLElmcGPqJJGRb8TK LFdQ== X-Gm-Message-State: AOAM533X43mhptfsXZGVTgaD0Q81PPkjPJs4Aw2pP8mCrQ4Ktx0eqJfd SXGvyV7LTZDPsDqfq/i3bJGfPoIarTvndpGnBeU= X-Google-Smtp-Source: ABdhPJzMMy9eRu2aFrVhet/iaXEHyN8sFDvHpOILnYjR/f6zIGKOIU9sfX4UNf3BSY3/QHSx1rJ4/gLsOtMu32YnG+8= X-Received: by 2002:a17:90b:190b:: with SMTP id mp11mr18514510pjb.3.1635174890053; Mon, 25 Oct 2021 08:14:50 -0700 (PDT) MIME-Version: 1.0 References: <20211025075244.1527116-1-orgads@gmail.com> In-Reply-To: Date: Mon, 25 Oct 2021 18:14:38 +0300 Message-ID: Subject: Re: [PATCH] Fix using gnu print on mingw To: Christian Biesinger Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Orgad Shaneh via Gdb-patches Reply-To: Orgad Shaneh Cc: gdb-patches Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Mon, Oct 25, 2021 at 6:05 PM Christian Biesinger wrote: > On Mon, Oct 25, 2021 at 3:53 AM Orgad Shaneh via Gdb-patches > 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