From nobody Sun Apr 12 02:50:02 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=1771533375; cv=none; d=zohomail.com; s=zohoarc; b=S2ULxHyj5WuXAZLK5ZyhUUJXi6C2MSxbLVUgQmJUrVgSypyvr6T7x/SHY/PoQ9yAW/xrVZc1oE9b/5AYA7gJ/NlhLjBovkHgF/Q0pHyihS/D13Qvd8VnTVIajGGoctogqPSp/pkdlrL5bAQNc1BPgFNPjGk4scqP/4MvC0BP3oE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771533375; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rZ5P//QidrUfYIRqNX62u+eFOou5c90zjpKqF4TTZtI=; b=deulDUqWvUvNwA+DHaBYc1SxPe3bePvWl6znO+RNWbkf2rRyHhc2E+sVCAjepdCWOuCLFGJecWKnrJL2UMaqJ5rGyzUpFkDUCpezVprj/wVpS4vHkKBmlkLlVs+Fuuvj8M2/kXHg3FUpMRmIqTROyqnES9ZWDGv61BFnB++nnug= 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 1771533375162511.9886779137522; Thu, 19 Feb 2026 12:36:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vtAk4-0004OE-6w; Thu, 19 Feb 2026 15:35:20 -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 1vtAk2-0004Nl-Ja for qemu-devel@nongnu.org; Thu, 19 Feb 2026 15:35:18 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vtAjz-00058C-7F for qemu-devel@nongnu.org; Thu, 19 Feb 2026 15:35:18 -0500 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2ad22a5e245so9992145ad.2 for ; Thu, 19 Feb 2026 12:35:14 -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-2ad1aadc7f8sm169325795ad.66.2026.02.19.12.35.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Feb 2026 12:35:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1771533314; x=1772138114; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rZ5P//QidrUfYIRqNX62u+eFOou5c90zjpKqF4TTZtI=; b=sBCUl9aNEmfVUn4hqP6dy85WZOwc4XFq7kO6CVcC7pYHzX6cpdgPID4OH5lXxcYYCm LcismMXLWyZCbFRoZPsKX9AvPaUT5HGH0Z8K2+762tROUWrX2CqZioo9/HbcDISliCrM GMZxRwmJuDcmarqGlhZ0hbCGwVOQs4oiwoD/Mt12d6NAChd7jQrnwM7pTz7SBKUrpMHc 6qkTYletK5cA/TnQM1+ElK0tA8cFyxHd/lfaAWAYyBufzH3+0hIJQ+QXYYjMfTKnm8Yw 9GZy+XVMNZrt992NqauscRzznQK8DclCWp2OqEX9bLd538X9SM7YDPIVnUks0t53Kp2f c35w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771533314; x=1772138114; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rZ5P//QidrUfYIRqNX62u+eFOou5c90zjpKqF4TTZtI=; b=YDZ07jJGi8aLKmkUfzyiFBJZrAy8yu2smJ12vB5DY+HqRxE48KQb6MW9ngbqeYf1AK vMdN2rLvZ92gggpjY317QspjCYzUGL7vciFMpFRHe1M85uEwaQ8+2k7A4yI9F/wIZdO0 9+M+dLfGlU2nG4fQ/8ktyheLF6GSIf9eAWMgGB+yAR+URA2jN1aeYfvK6FoEsVNTkXYa B9uBwt057Pfx4xKoAVGnYJ9dJ32jVFSyHgdVabs8mCifqKOU43pN+Ewekk8insroOnZI ZChlBpTmRJ2EnBwrWaI7T7wGsKhGD9a3K/LGBQ5klU4qIOdaDHOCqqZ5CSV2QW4GRVIV ibfg== X-Gm-Message-State: AOJu0YwhZ52wAyXK3237vbTLl+RtsW86bQSbX7bawTTwhRpId1Sfri3y Y7YeGSylpxnwaDPdqin0YaXqpiURasTBSYBfkf269SaKaj/rMKBZDkWjQx1ivZlCgIDMdVqBCv2 Q+P0a X-Gm-Gg: AZuq6aL5+uTmsQ9QJA3tO930sBNkht2uVTPDyUaRmyNGM4qTh7yfwtcmFqKjtlOyi14 vEdFFxVv1mSq7PoX4l1igIe6yGPbcIrgnJEqe+kGd3fZTjkY330ykeycejuZP1DdpoIPBaQrqhN GainZNPnVbtyvfS86G794aWDW5zRvPi68HnUftDx32rahV83yaRGuqS/Zzdu5TtrNK19glUet0D NQZlFsCpORzjoLVNpjDE1n9h/5HCDsuSlFUmOkev0zxlmp4au4QzeOkUbDGQtOoJ6JJ+VMxKKB8 zSR0w/VWBidZ29hTyrlyAU6XuH1SU6h7uoOeH7c+MQcikDOZStWo9PTIB2+Es/DDsSL4lycxFn/ j+4OpXZJ4FiLY3V0cYNvhO2p736odTzKS9rHt66qWc/SWHcU+5KBYW0uAiN9eOnGbEvDD5jxHJ3 McqbJmOOkfPm4OaHRohat3wSbMXilTS9Q5c62UPSp0gS3NBAYcG38hY6RgKaJX9TJGx9sHXtt8W bKl X-Received: by 2002:a17:903:32c5:b0:2aa:d201:25f6 with SMTP id d9443c01a7336-2ad50f9bcb4mr64388515ad.45.1771533313664; Thu, 19 Feb 2026 12:35:13 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@linaro.org Subject: [PULL 1/1] contrib/plugins/cpp: use __has_include Date: Thu, 19 Feb 2026 12:35:07 -0800 Message-ID: <20260219203507.3502009-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260219203507.3502009-1-pierrick.bouvier@linaro.org> References: <20260219203507.3502009-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::636; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x636.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: 1771533377509154100 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. Tested-by: John Snow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/20260214061025.1239457-1-pierrick.= bouvier@linaro.org Signed-off-by: Pierrick Bouvier --- 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