From nobody Sun Oct 5 01:49:28 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1757494107; cv=none; d=zohomail.com; s=zohoarc; b=PYn4r0AQppwcr05l/C6CyEFWSnYisYeduDoGnP5oP1+wN/FBTteoF0S/Hm6ODHjZzgUucZIGi5RdaaUEBoJ5AAe/wGxb08GlvVAm8dkc39XY6HeRpRbMoS7tAwmZKxzHqO3PDTgojNmU45XrqNjElWW43XUgVCIn7fOG8L1qTQI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1757494107; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=1wKR/YUT1s7zbqkAJ60YTN/n5KS6nPabKL3BO8TOPtg=; b=JqkF1DGd6XluWHOSAR2cGITH9udI4vP6TJhLejuKrJFs0m4yGWiz3BbtOeGdvrVDCnFFppg2dVDujQdZMdA69Q9ygoUGlyBh+InoN2Ke5k+5e3AuMo5UTbnKKEiBoiMyesmnLXfYAMg63IpIIBfTlp6XeTbGpqlRGBue0ZCEkik= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1757494107043596.2006298474447; Wed, 10 Sep 2025 01:48:27 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 4DDEA41A01; Wed, 10 Sep 2025 04:48:26 -0400 (EDT) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 1E7ED41B68; Wed, 10 Sep 2025 04:45:30 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 7236341A01; Wed, 10 Sep 2025 04:44:59 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 61CCC419E3 for ; Wed, 10 Sep 2025 04:44:58 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-275-cXWP6humPmuXMlDAlWwmrg-1; Wed, 10 Sep 2025 04:44:56 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B5760180058D for ; Wed, 10 Sep 2025 08:44:55 +0000 (UTC) Received: from hjs (unknown [10.43.3.187]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 187DB3002D30 for ; Wed, 10 Sep 2025 08:44:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1757493898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1wKR/YUT1s7zbqkAJ60YTN/n5KS6nPabKL3BO8TOPtg=; b=IEo90gv2rqWS+GjQQqyPPub4ectHyQbeiEX8aRIpHB/sf0MnGnz+2GtEWLQb6umhR9fGKe bEuGh2vwokypjnsgDBEjs57+hX9vE2WngUpM43vgq40viPWF/uU34KlOBFccrJzReav/k4 k2+zBf8vRAUwKgHJABdc1WQTpr/e19I= X-MC-Unique: cXWP6humPmuXMlDAlWwmrg-1 X-Mimecast-MFC-AGG-ID: cXWP6humPmuXMlDAlWwmrg_1757493895 To: devel@lists.libvirt.org Subject: [libvirt PATCH 2/2] util: remove glibcompat.c Date: Wed, 10 Sep 2025 10:43:50 +0200 Message-ID: <1c5b4b28958e12b3ec6cb0fc1b6b2a83da2559bd.1757493830.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: MHr0t3ramYowB2216YgLG_ykOV9hWhZqVE8lKX8hxyA_1757493895 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: DZMQ4VKDO44JX3ELUUIUCXZUEC5VCVA6 X-Message-ID-Hash: DZMQ4VKDO44JX3ELUUIUCXZUEC5VCVA6 X-MailFrom: jtomko@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?J=C3=A1n_Tomko_via_Devel?= Reply-To: =?UTF-8?q?J=C3=A1n=20Tomko?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1757494109488154100 From: J=C3=A1n Tomko There are no functions reimplemented here anymore. Signed-off-by: J=C3=A1n Tomko --- src/util/glibcompat.c | 64 ------------------------------------------- src/util/meson.build | 1 - 2 files changed, 65 deletions(-) delete mode 100644 src/util/glibcompat.c diff --git a/src/util/glibcompat.c b/src/util/glibcompat.c deleted file mode 100644 index dd19c7ac43..0000000000 --- a/src/util/glibcompat.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2019 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - */ - -#include - -#include -#include -#include - -#include "glibcompat.h" - -/* - * Note that because of the GLIB_VERSION_MAX_ALLOWED constant in - * config-post.h, allowing use of functions from newer GLib via - * this compat impl needs a little trickery to prevent warnings - * being emitted. - * - * Consider a function from newer glib-X.Y that we want to use - * - * int g_foo(const char *wibble) - * - * We must define a function with the same signature that does - * what we need, but with a "vir_" prefix e.g. - * - * void vir_g_foo(const char *wibble) - * { - * #if GLIB_CHECK_VERSION(X, Y, 0) - * g_foo(wibble) - * #else - * g_something_equivalent_in_older_glib(wibble); - * #endif - * } - * - * The #pragma at the top of this file turns off -Wdeprecated-declarations, - * ensuring this wrapper function impl doesn't trigger the compiler - * warning about using too new glib APIs. Finally in glibcompat.h we can - * add - * - * #define g_foo(a) vir_g_foo(a) - * - * Thus all the code elsewhere in libvirt, which *does* have the - * -Wdeprecated-declarations warning active, can call g_foo(...) as - * normal, without generating warnings. The cost is an extra function - * call when using new glib, but this compat code will go away over - * time as we update the supported platforms target. - */ - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" diff --git a/src/util/meson.build b/src/util/meson.build index 69ef49139a..4950a795cc 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -1,5 +1,4 @@ util_sources =3D [ - 'glibcompat.c', 'viracpi.c', 'viralloc.c', 'virarch.c', --=20 2.50.1