From nobody Sun Apr 12 04:23:17 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1771049494; cv=none; d=zohomail.com; s=zohoarc; b=ClFYEm1Z/oLUNp2Han8MNY2JJghbIyVD+PeKkFSDwkmzhHrbCSW4wj81/gWhKtB1gPse8cKuCVM+W2Lrxq/+tkois/dDacujGVUZqnZh1Eterhm2yXUmQv2dIxgYBQOye4BSqP5Wn1d9vohpgqzGEPz7E1iDemWa79JwTXU3aFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771049494; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=S/TdjhIX7ndaIiCITprzVCbcaXDOvqYMczYb6hGcNms=; b=AZo4t6/6N79MuVkvNWMGtECvSLEzjyQ0JV68iATEMVr8MIqdXcPJVaYBFK0BiW80xxbo1JHHs8vuhoFFuSgSUVNLkFmMcX/cba5niNSnyJTe9P8bkyUrdbmNPF9KlfgWhPzLx7vuX42aU7Ezh7s/9jTVbrwB6SNmnGI7bbAbbmQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1771049494253731.5085147383005; Fri, 13 Feb 2026 22:11:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vr8rh-0003Vo-Vk; Sat, 14 Feb 2026 01:10:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vr8rg-0003Vb-5R for qemu-devel@nongnu.org; Sat, 14 Feb 2026 01:10:48 -0500 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vr8rd-0000aF-MD for qemu-devel@nongnu.org; Sat, 14 Feb 2026 01:10:47 -0500 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2aad9b03745so8250255ad.0 for ; Fri, 13 Feb 2026 22:10:44 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ad1aadbb9bsm8545945ad.62.2026.02.13.22.10.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Feb 2026 22:10:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1771049444; x=1771654244; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=S/TdjhIX7ndaIiCITprzVCbcaXDOvqYMczYb6hGcNms=; b=ysOkIOMDMa4fl3qZ+u2n7efahtd/szdV4d5oBQIcit5H7GRVv8pTW8Spmt92GLJXJP 4n6dmw/wqQNVlNWbLT38kMC5w4S85R8YYuz2yPrg9FD/AoCquTL1chsofoUjBIccjKUg +zy7tE22ii8KLN1lcPQRz+ZGGsCttDZgd79TrEj1ZenpkH6hJ5X6bxVsycjdEQ5u85Yi 56wLqYpwro0tErvvDHumiWGWENV9l1WFZDL3vb3yt21hIYJNyQO3KXYM0xCzJQX8yIYA 6z1vncNs1GebSYTLbGoPxzG5WLLe6b9dZ2jH/GSsZ9OY0uG6+BRdDwTU6j2/FbWm8bC8 3inw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771049444; x=1771654244; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=S/TdjhIX7ndaIiCITprzVCbcaXDOvqYMczYb6hGcNms=; b=PmNM87uZb0B/3aeeaay8DUwL5lS5UpWIw860wRRBEtTQoF8LqfsKqeRItlffXFKXkV asvujaAfSeIxrsXnLaNY0zpfFcqg8zfwXWSzu/rWv4sriBC3yQdEKnhUNkiAgfv/FtMM HWKrZpYM/uVOIX4H59vQU8shgYUal/JAoHo9dHcCQkW4bq/1FdPrMmShwT5wP/cko7M0 DievxzPGbV6+4sDs/cp1pIWEkhhkqWee0SqiPS4ky4wxfMrFCDddoBHVCJnwqDyQugSy gV0flcrs84R72Tk/AhRFivFG2v/nGVgc4Md0Tk37IF11hKSP2Vr/HdJ9a8fTArXNCu+b nx3w== X-Gm-Message-State: AOJu0YwGmFVU9xsKKALF+JwXu8TZ/Z0nYy5Lfg2ScLgzzseSeJJMKubI LECEezPVulWD2FryW3+1oYPX7XGtPywWOnisnnEL+MUffQGMQB/1jJZf0ajG+VeiFQMSYG5mSQa vEAgs X-Gm-Gg: AZuq6aJkEomlSTTLwH1PSkAdPl5CdKcgyq14BFBRcH/S5yEidvxhTSoNACqPKy0/Pxr PcrtMEiJnfYSbEVQ7yS8oIQluutZYT/1nr7hIt46uWakGu4tSCGFLZWuezdAGU+VNClsrwS9PUN koJJHe/gJFPpHHWOP5IwCfBW5jqz0rymQv4/K+nIYz0Uwr0RkV1hQhsEDk+6HrYTqusuaRsv6fw 4pLVLXGaiEa748XLNe+l2xgE/Lhkbuz8X/1N46tdSz63bDnzWhUGhEfbuOsVjCkT0EdlmtJWl7f vL7I2ew0atgIOBbOR64svuj0Lwg3iV0xHHEO2iWmQRE3QzZwKuazI43leWFapIx9xUmG76/4Lao pylRUUvkQp8a9F3i/pLSpCznbUGV8nYJkdqWhH5z5h4AGVlpw53TFfpNwq4/oDRVtPtrljsVBBQ OsEg0M1/VwRRhew2P0nb5CtCXGT4fB/goiOMwecRXi1hYqzozBskf75nWZP1FAuNpR+qWmWmoR9 MXQ X-Received: by 2002:a17:903:32d0:b0:2aa:e1f0:5481 with SMTP id d9443c01a7336-2acba598d5fmr25974095ad.30.1771049443791; Fri, 13 Feb 2026 22:10:43 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Mahmoud Mandour , Pierrick Bouvier , philmd@linaro.org, Alexandre Iooss , jsnow@redhat.com Subject: [PATCH] contrib/plugins/cpp: use __has_include Date: Fri, 13 Feb 2026 22:10:24 -0800 Message-ID: <20260214061025.1239457-1-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1771049497367158500 Content-Type: text/plain; charset="utf-8" This make sure we can include all possible headers without breaking build for environments missing them. It fixes compilation on openbsd. We don't want to pollute configure script, as it's really a special case here to make sure we don't have a compilation regression with qemu-plugins header. Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: John Snow --- contrib/plugins/cpp.cpp | 261 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 259 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/cpp.cpp b/contrib/plugins/cpp.cpp index 1ff54896d97..0673c4f074d 100644 --- a/contrib/plugins/cpp.cpp +++ b/contrib/plugins/cpp.cpp @@ -6,103 +6,360 @@ =20 #include =20 -/* https://en.cppreference.com/w/cpp/headers.html */ +/* + * We include all C++ standard headers (without deprecated ones), + * taken from: https://en.cppreference.com/w/cpp/headers.html + * + * To update, copy page text, and then: + * grep '^<' | + * sort -u | + * grep -v strstream | + * grep -v codecvt | + * sed -e 's/\(.*\)/#if __has_include(\1)\n#include \1\n#endif/' + */ + +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include -#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() +#include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() +#include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() +#include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif +#if __has_include() #include +#endif =20 QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUGIN_VERSION; =20 --=20 2.47.3