From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FA58C433EF for ; Wed, 16 Mar 2022 14:08:08 +0000 (UTC) Received: from localhost ([::1]:37422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nUUJq-0000yj-Os for qemu-devel@archiver.kernel.org; Wed, 16 Mar 2022 10:08:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUTxK-0005ki-2u for qemu-devel@nongnu.org; Wed, 16 Mar 2022 09:44:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:39765) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUTxG-0007KA-MF for qemu-devel@nongnu.org; Wed, 16 Mar 2022 09:44:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647438285; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pQRQ5bxTLYdVpgAbADT6AMfydBXfBZafPhoAy4/uMj0=; b=C0TvUU+CFHzjLbyjRBpakAy91+iBLMJcWYFcgAAy7vBlf9FqVY9fY11Rd49qoRLTw/5xk4 JtVLrc5uyHfG65yAWroluFlcMBrL48S9peBe224mNl8pbUCklGPMFPlXlCCGbhonwaV1/y jNqQtkBahEpPBbw4lCOqs2dgxjJDofA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-121-zv3AKYA5MvqcPP-K8Z2FwQ-1; Wed, 16 Mar 2022 09:44:42 -0400 X-MC-Unique: zv3AKYA5MvqcPP-K8Z2FwQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BDCB229DD9A4; Wed, 16 Mar 2022 13:44:41 +0000 (UTC) Received: from redhat.com (unknown [10.39.195.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6908540885A1; Wed, 16 Mar 2022 13:44:40 +0000 (UTC) Date: Wed, 16 Mar 2022 13:44:37 +0000 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= To: Peter Maydell Subject: Re: [PATCH 05/12] compiler.h: drop __printf__ macro MinGW/glib workaround Message-ID: References: <20220224183701.608720-1-marcandre.lureau@redhat.com> <20220224183701.608720-6-marcandre.lureau@redhat.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/2.1.5 (2021-12-30) X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=berrange@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Cc: Paolo Bonzini , Stefan Weil , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , QEMU Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Thu, Feb 24, 2022 at 08:14:47PM +0000, Peter Maydell wrote: > On Thu, 24 Feb 2022 at 19:50, Marc-André Lureau > wrote: > > On Thu, Feb 24, 2022 at 11:23 PM Peter Maydell wrote: > >> You're probably building with a newer glib, and possibly also > >> a newer mingw. > >> > >> I've cc'd Stefan Weil who might know whether we can drop this > >> workaround as far as the mingw part is concerned. > > > > > > Probably safer to keep it until we bump glib dependency to >=2.58. > > > > I would move it to glib-compat.h though, and leave a note there, as it is (or should be ) an old glib specific workaround. > > We can only move it to glib-compat if we confirm that only the > glib-related part of the workaround is still relevant and the > mingw side is now no longer needed, though. We know glib uses the GNU printf semantics for all its APIs. We know QEMU code will use the GNU printf annotation for all its APIs where it knows it has GNU printf, due to delegating to GLib. For 3rd party libraries, we can have no confidence about whether they expect GNU or native printf format, unless we're doing something to override the printf family of functions at link time. IIRC, we're not doing that, so we can't assume 3rd party stuff expects GNU format, and so the sooner we get rid of the #define __printf__ __gnu_printf__ the better IMHO. The proof of course would be to see a CI test run with the define removed proving that no code we call relies on it. We could even set our min GLib version to something newer just for Win32, on the basis that mingw in Fedora and msys2 both ship new enough versions, and cygwin is already outdated and so already needs to have its glib upgraded to remain compatible with QEMU. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|