From nobody Sun May 12 07:51:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1602546335; cv=none; d=zohomail.com; s=zohoarc; b=BFRPUOemfaZB+n1Jy7f6KlCB7qIFwJS79GrVXn3dqMpUJcPfOr3s6/IabUNClZDYgE+LK9sMelC3plxtoUMuIlmqwZLGSti0B275jUyrOgloSlea7dwbeOwy58w1D+srQxPGPZcyYgPW4DUBjbv6hcLqgwQTRK8tUCzeep8qdrw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602546335; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y3umcJaYXKr0x2iVux7+4Z8Jw1GhDZ0QgyiRRBlED8Q=; b=L0RnHbE30qnN07z7wI9QwV/F8M9kCQD/1oEg+euWM77ZrzDxfd+/i3FWGSmGtn5nh2m5w8ldZruraT9K3+g38J27I8TgcIFpnwyaseLYUQnCvH/Nu/aWcQaimYWBBMpdWMP2Cipj2ghG/MyFxZDto71OPF82ioOT8H0SsIKZIKI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602546335660888.9221373786003; Mon, 12 Oct 2020 16:45:35 -0700 (PDT) Received: from localhost ([::1]:38296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS7VW-0001N4-DO for importer@patchew.org; Mon, 12 Oct 2020 19:45:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kS7UE-0008LG-G1; Mon, 12 Oct 2020 19:44:14 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:42061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kS7UC-0007ho-Ot; Mon, 12 Oct 2020 19:44:14 -0400 Received: by mail-pl1-x633.google.com with SMTP id c6so9614105plr.9; Mon, 12 Oct 2020 16:44:12 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j3sm9714890pjv.20.2020.10.12.16.44.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 16:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y3umcJaYXKr0x2iVux7+4Z8Jw1GhDZ0QgyiRRBlED8Q=; b=Ia8ZV2i/5M+sVSz1sc2+nC1GKB77e1QVODPrMDxe+oqS4dIErVSZYRNUPo/TSeOjjO U1hmXE0azq0E3PXg7AIHTODVBNFbeMERtsL6rCh6X/dvz0b9vwgf0YPv9UHknxJ2R4it dvcuqRdNdbDGFDbvX9mcK97097nI+7awO2KAC2aJ/zLZ6n5GUy3oeRnY2EF/EBTNIUcv lTePvc+y9TQFhALIu3OvsVXlrYuR4Vyf8JasGzSaX8+O40lnqKLC58AdB4haemg1iXv0 DzyvEJFwI35kka/R7VDb7QtX85vkBjQuuapsT9Y3oXw1I/AI07Ax71GlSZz57T+ETlrK V94Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y3umcJaYXKr0x2iVux7+4Z8Jw1GhDZ0QgyiRRBlED8Q=; b=uRYTHO77/IWQGWo1du+yGiwb0WUGWfFoQlJzXsNPk6K2EL1WpWWmeq1rM/1PHSrvik c6PPRnBZOo9srOJKVRyFFLX/bQb8IvqL6DDLrM2WD1+YyHUiycUxgU3HYsZ0PBq3M+U2 kP24yrSfEhAqCtpZRijdWWzaSRCFG43pjGk6rH/zIGvPzaHq9HKXTcYqhyQ1bXBsjBei goe30L83nufXLa31fWuQTagk4eZ2UP02E+65JOGfGWgIg/Y7ICCoOdlAHNGzHe3UioEy 6PeaEtfU0RPee6FP6fJ/EoJrr8X7j/1g+LMJO6mgIm+1vTo0HHNqcEgU9ZyvMfIrkqVF /yNw== X-Gm-Message-State: AOAM5303pCUUbQ7N80jq6+ciR9iprxhWFOX4682BfzHGcFZ8gRzJ47fd FkT0AFGzcsFmAOzvnJWpgNz1AQF/VUjPAw== X-Google-Smtp-Source: ABdhPJz1PFc/VPND1lVZTsmVceuvrpOs3KVqBg4E2/O8xPQe96qZmA/hnfgOsU7ZEIYEB8cSY2W30A== X-Received: by 2002:a17:902:24d:b029:d2:564c:654b with SMTP id 71-20020a170902024db02900d2564c654bmr24336077plc.8.1602546250719; Mon, 12 Oct 2020 16:44:10 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org, =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PATCH v9 1/5] configure: fixes indent of $meson setup Date: Tue, 13 Oct 2020 07:43:44 +0800 Message-Id: <20201012234348.1427-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20201012234348.1427-1-luoyonggang@gmail.com> References: <20201012234348.1427-1-luoyonggang@gmail.com> 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::633; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x633.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Trivial , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Laurent Vivier , Yonggang Luo , Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) convert these line from tab to space Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configure | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/configure b/configure index b553288c5e..1b63488521 100755 --- a/configure +++ b/configure @@ -7211,13 +7211,13 @@ NINJA=3D${ninja:-$PWD/ninjatool} $meson setup \ -Db_pie=3D$(if test "$pie" =3D yes; then echo true; else echo fals= e; fi) \ -Db_staticpic=3D$(if test "$pie" =3D yes; then echo true; else ech= o false; fi) \ -Db_coverage=3D$(if test "$gcov" =3D yes; then echo true; else ech= o false; fi) \ - -Dmalloc=3D$malloc -Dmalloc_trim=3D$malloc_trim -Dsparse=3D$sparse \ - -Dkvm=3D$kvm -Dhax=3D$hax -Dwhpx=3D$whpx -Dhvf=3D$hvf \ - -Dxen=3D$xen -Dxen_pci_passthrough=3D$xen_pci_passthrough -Dtcg=3D$tcg \ - -Dcocoa=3D$cocoa -Dmpath=3D$mpath -Dsdl=3D$sdl -Dsdl_image=3D$sdl_image \ - -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_png=3D$v= nc_png \ - -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f \ - -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt \ + -Dmalloc=3D$malloc -Dmalloc_trim=3D$malloc_trim -Dsparse=3D$sparse= \ + -Dkvm=3D$kvm -Dhax=3D$hax -Dwhpx=3D$whpx -Dhvf=3D$hvf \ + -Dxen=3D$xen -Dxen_pci_passthrough=3D$xen_pci_passthrough -Dtcg=3D= $tcg \ + -Dcocoa=3D$cocoa -Dmpath=3D$mpath -Dsdl=3D$sdl -Dsdl_image=3D$sdl_= image \ + -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_p= ng=3D$vnc_png \ + -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f \ + -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt \ $cross_arg \ "$PWD" "$source_path" =20 --=20 2.28.0.windows.1 From nobody Sun May 12 07:51:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1602546435; cv=none; d=zohomail.com; s=zohoarc; b=Xm0o9bx+tshUcL/CkO2o99FG4xU6Nf1/XxDPTvra0XIOTsGsguFJpZJjsa1w/wJt6W/SyS6wLOSxnFBjq484KwuxqtYmAowxjk4d7L1iQ5dToAQFcuA8jaQeCzimGMD1id0piY9JayfOTlENwgT7olzQJLoS3NP98poBdvI5huo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602546435; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=osDuBexc0c2Z/UkkEDC13D1bBBlZceyQBMzfamn0QDg=; b=B/y4k6u+vf0afOUFtu72CTpiIflSSZnd17VXA6fU2mgbYNI2mJPWTusCi8mC7iOElvQuY3a/EfpCNB5bVKJdF9SYvXyvUwNNYM8Z6eAO3WjRmdb62HUmnMkG2ycxHuGwWQZ8WAaNk2lzLAzNymAtCHOg1Cw+CN6ENCm9mD1tcGM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602546435600749.1631755035866; Mon, 12 Oct 2020 16:47:15 -0700 (PDT) Received: from localhost ([::1]:43050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS7X8-0003Rn-Hn for importer@patchew.org; Mon, 12 Oct 2020 19:47:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kS7UM-00005s-Jr; Mon, 12 Oct 2020 19:44:22 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:34142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kS7UG-0007iB-OE; Mon, 12 Oct 2020 19:44:22 -0400 Received: by mail-pf1-x444.google.com with SMTP id e10so15278204pfj.1; Mon, 12 Oct 2020 16:44:15 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j3sm9714890pjv.20.2020.10.12.16.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 16:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=osDuBexc0c2Z/UkkEDC13D1bBBlZceyQBMzfamn0QDg=; b=Sssoe6LXH+8+WFEsZyobZupHt3viWiS2Y9FrNSb16J+VCOsmTp+4k1ftCgo3LXiqwU vFOcWSr5oUtyxmCI92lXrpTW8d+oo8bbhTayN3R+lXPJVGhv/YbhoK+k6aBjUHRJr0q5 hNt7Gfibt1YZzjN2erVmzn03QSE3RXVeypCS4IzHURBNRc0RqhrkgQ8F9HprSo6nmzvI jVIYS0LFkubJyBZddHimmRW00KD02d3i+FbRMron0fNEdFZMiOhiEh0FphXaydhIGsHW 6roZTjnT6psjMI/qn1GI+ni0v5951i7HbVz8mSrFUJ3CoxA4kg3Bc6Pg1HILMY5Bj8Vr n1zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=osDuBexc0c2Z/UkkEDC13D1bBBlZceyQBMzfamn0QDg=; b=KSahCwRVJCQzY4fAd1wcVLTPl+nU99lVeim+B1lkp+lpHrF5gKa/+s7TkHjmvcyU0G cm0CEL4xNMSd1JE3SmpmNGfTIVwGOk0fAk7w0OH8z7bwSYz8QauCPKw7ZREtNTbCnaey AvEeaJOTgEVW3CLYTly5eQubhWYyTbyJnt8sIP+NBcsHzRe51wZnWa7DB4zs/NxHoTpc Repih3yESU8Sxxb5IgViYelVIyZnsZZCEUygZlxAOImctDxYa9u0+hCd4R3Q+mmOXjVm xcK6vGhdEBOnHvIZGOg1AsvDO/tvijyF0OVJBQrm6GOWfpclMVoaJQmO+xzRJIm3mfb4 1tBg== X-Gm-Message-State: AOAM531J/DO2ePvXFmv1it0pmDqEUT0TiOgTKpsvbhSdWB7m6WzNx9MI 7CSs7SnXXyQzEjICANzWk7rLUn0M0fJ84w== X-Google-Smtp-Source: ABdhPJxnP3VDkwphZIBFJhXbiKYo+T09OENj/hTotH4r9+XS5MVyvnMkgsdaYHZYyQA08aCvj+iQ5Q== X-Received: by 2002:a17:90a:4f0f:: with SMTP id p15mr22772854pjh.10.1602546254414; Mon, 12 Oct 2020 16:44:14 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org, =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PATCH v9 2/5] curses: Fixes compiler error that complain don't have langinfo.h on msys2/mingw Date: Tue, 13 Oct 2020 07:43:45 +0800 Message-Id: <20201012234348.1427-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20201012234348.1427-1-luoyonggang@gmail.com> References: <20201012234348.1427-1-luoyonggang@gmail.com> 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::444; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Trivial , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Laurent Vivier , Yonggang Luo , Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) msys2/mingw lacks the POSIX-required langinfo.h. gcc test.c -DNCURSES_WIDECHAR -I/mingw64/include/ncursesw -pipe -lncursesw = -lgnurx -ltre -lintl -liconv test.c:4:10: fatal error: langinfo.h: No such file or directory 4 | #include | ^~~~~~~~~~~~ compilation terminated. So we using g_get_codeset instead of nl_langinfo(CODESET) Signed-off-by: Yonggang Luo Reviewed-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configure | 5 +---- ui/curses.c | 10 +++++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 1b63488521..71a574f718 100755 --- a/configure +++ b/configure @@ -3530,17 +3530,14 @@ if test "$curses" !=3D "no" ; then #include #include #include -#include int main(void) { - const char *codeset; wchar_t wch =3D L'w'; setlocale(LC_ALL, ""); resize_term(0, 0); addwstr(L"wide chars\n"); addnwstr(&wch, 1); add_wch(WACS_DEGREE); - codeset =3D nl_langinfo(CODESET); - return codeset !=3D 0; + return 0; } EOF IFS=3D: diff --git a/ui/curses.c b/ui/curses.c index a59b23a9cf..12bc682cf9 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -30,7 +30,6 @@ #endif #include #include -#include #include =20 #include "qapi/error.h" @@ -526,6 +525,7 @@ static void font_setup(void) iconv_t nativecharset_to_ucs2; iconv_t font_conv; int i; + g_autofree gchar *local_codeset =3D g_get_codeset(); =20 /* * Control characters are normally non-printable, but VGA does have @@ -566,14 +566,14 @@ static void font_setup(void) 0x25bc }; =20 - ucs2_to_nativecharset =3D iconv_open(nl_langinfo(CODESET), "UCS-2"); + ucs2_to_nativecharset =3D iconv_open(local_codeset, "UCS-2"); if (ucs2_to_nativecharset =3D=3D (iconv_t) -1) { fprintf(stderr, "Could not convert font glyphs from UCS-2: '%s'\n", strerror(errno)); exit(1); } =20 - nativecharset_to_ucs2 =3D iconv_open("UCS-2", nl_langinfo(CODESET)); + nativecharset_to_ucs2 =3D iconv_open("UCS-2", local_codeset); if (nativecharset_to_ucs2 =3D=3D (iconv_t) -1) { iconv_close(ucs2_to_nativecharset); fprintf(stderr, "Could not convert font glyphs to UCS-2: '%s'\n", @@ -581,7 +581,7 @@ static void font_setup(void) exit(1); } =20 - font_conv =3D iconv_open(nl_langinfo(CODESET), font_charset); + font_conv =3D iconv_open(local_codeset, font_charset); if (font_conv =3D=3D (iconv_t) -1) { iconv_close(ucs2_to_nativecharset); iconv_close(nativecharset_to_ucs2); @@ -602,7 +602,7 @@ static void font_setup(void) /* DEL */ convert_ucs(0x7F, 0x2302, ucs2_to_nativecharset); =20 - if (strcmp(nl_langinfo(CODESET), "UTF-8")) { + if (strcmp(local_codeset, "UTF-8")) { /* Non-Unicode capable, use termcap equivalents for those availabl= e */ for (i =3D 0; i <=3D 0xFF; i++) { wchar_t wch[CCHARW_MAX]; --=20 2.28.0.windows.1 From nobody Sun May 12 07:51:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1602546572; cv=none; d=zohomail.com; s=zohoarc; b=inWsbTKGXtisTLbrYZuMILYnyHQp63wQyU60U4FoCUZyDKV77BJElJLJUV3rjXzf2xa/KVLEqH/GD6u+I7iIgpkUZou6n2L04hiW4JJwILXZ2YSpR61l5RHepQZXzaxMJRntePJ7nNhiyFf392JmN56zxNVphK+buulBd8d+re8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602546572; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fONA64XSdMINk4Pb3HJvl02BkTmqUfaoSQk6W/tx2aE=; b=AWueTg/TrLdfRUdamINHfgRHBvc96BAPku23pH3/EUC8119Q5+lCYnO956NlI3usamQVIBEi8jV6n73z3CCIvXnpNvbhp75hXBYC0GzLkjV6WxQ5BHaeiiKXtEaKFbRdHnlZ/blQXWGPRio9+y/wP0hKI1hMCiNw/eqd1Ead3KQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602546572942109.51547567524631; Mon, 12 Oct 2020 16:49:32 -0700 (PDT) Received: from localhost ([::1]:46928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS7ZL-00057G-UF for importer@patchew.org; Mon, 12 Oct 2020 19:49:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kS7UN-00007y-EF; Mon, 12 Oct 2020 19:44:23 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:39181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kS7UK-0007iM-R5; Mon, 12 Oct 2020 19:44:23 -0400 Received: by mail-pl1-x643.google.com with SMTP id y1so6085471plp.6; Mon, 12 Oct 2020 16:44:19 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j3sm9714890pjv.20.2020.10.12.16.44.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 16:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fONA64XSdMINk4Pb3HJvl02BkTmqUfaoSQk6W/tx2aE=; b=LBBEYcuhJff4cHl05cej1T9zO4dQ7NxZcNtHOLWSKLqGlzCmqVT21H5Kdd+P9xI25G jkAWARu0EDGKdyNXnLtwQl9yfdyqnzAm9+yhTf4SkgCB9AqOnAqjOPiVsE+C8I2uWK1C rGEUg1NDKb07qgUpq+ZkBJWR92Q6LX8EAUYazz3/Zx/9rfHjTKyruNuzjSuSXxMgp5Vx UrEyFbFi8VAWpjx59DeDTPUIjCeVGCvfL0W4pR18EAvBQhZ3UiQZLyg6VOJvMHLInFSV SrNlcNUz5GIaQj18Nts0YWzJBD3ubQeXeHgzaX0f+JnTCswzu9HlkttHNVxyKhZWxuvC BzcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fONA64XSdMINk4Pb3HJvl02BkTmqUfaoSQk6W/tx2aE=; b=E8E0ICTzxG2Uv7RPzfXAXuQOw64M6HT7WFltU/mm2UG1eIZChTins3ZsXNtCz/Ij2v lt7tKhjrF5If+ma36Spejz40QnBd+atCTrfWrFq5xkg6S0iL0H1DZ636H3nb1wgX55N/ PQBVRoDwkgvK67XjSvauVBcmvp/mD2sb1Dehicak4pQWhltQOPlZLP7S+y6PKYuja0m3 8maZxVVjW0ZYV1hZybPDxG1txKFXJETXiKtieW1JZuLWkE400IwVsW77wpVgOcrIidST OD6hg6RXTy/RAzz12CQVJGtEzsosn4CXS9rjbHN7KM84IT3FqgggoqoXfZ/C2g06Vx9D huqQ== X-Gm-Message-State: AOAM53343/nUB/HZe/OOE08gpmwvNLMhwOKbzdZy0BPrX+3AyBBVp43U NyoMkHoE+NgULrG3O5jlrV4KvY6gXYF4CQ== X-Google-Smtp-Source: ABdhPJy/58DtfurzGjJVb9n/XcVrRoDGf8O4OqFASwEL1wCN9ISN7EXboSSVyCN/mWkLrhKJl0PNsw== X-Received: by 2002:a17:902:708c:b029:d3:ec3c:381c with SMTP id z12-20020a170902708cb02900d3ec3c381cmr25711024plk.20.1602546258066; Mon, 12 Oct 2020 16:44:18 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org, =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PATCH v9 3/5] curses: Fixes curses compiling errors. Date: Tue, 13 Oct 2020 07:43:46 +0800 Message-Id: <20201012234348.1427-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20201012234348.1427-1-luoyonggang@gmail.com> References: <20201012234348.1427-1-luoyonggang@gmail.com> 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::643; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x643.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Trivial , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Laurent Vivier , Yonggang Luo , Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This is the compiling error: ../ui/curses.c: In function 'curses_refresh': ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized= in this function [-Werror=3Dmaybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keyc= ode) | ^~~~~~~~~~ ../ui/curses.c:302:32: note: 'next_maybe_keycode' was declared here 302 | enum maybe_keycode next_maybe_keycode; | ^~~~~~~~~~~~~~~~~~ ../ui/curses.c:256:5: error: 'maybe_keycode' may be used uninitialized in t= his function [-Werror=3Dmaybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keyc= ode) | ^~~~~~~~~~ ../ui/curses.c:265:24: note: 'maybe_keycode' was declared here 265 | enum maybe_keycode maybe_keycode; | ^~~~~~~~~~~~~ cc1.exe: all warnings being treated as errors gcc version 10.2.0 (Rev1, Built by MSYS2 project) Signed-off-by: Yonggang Luo Reviewed-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrang=C3=A9 --- ui/curses.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/curses.c b/ui/curses.c index 12bc682cf9..e4f9588c3e 100644 --- a/ui/curses.c +++ b/ui/curses.c @@ -262,7 +262,7 @@ static int curses2foo(const int _curses2foo[], const in= t _curseskey2foo[], static void curses_refresh(DisplayChangeListener *dcl) { int chr, keysym, keycode, keycode_alt; - enum maybe_keycode maybe_keycode; + enum maybe_keycode maybe_keycode =3D CURSES_KEYCODE; =20 curses_winch_check(); =20 @@ -299,7 +299,7 @@ static void curses_refresh(DisplayChangeListener *dcl) =20 /* alt or esc key */ if (keycode =3D=3D 1) { - enum maybe_keycode next_maybe_keycode; + enum maybe_keycode next_maybe_keycode =3D CURSES_KEYCODE; int nextchr =3D console_getch(&next_maybe_keycode); =20 if (nextchr !=3D -1) { --=20 2.28.0.windows.1 From nobody Sun May 12 07:51:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1602546646; cv=none; d=zohomail.com; s=zohoarc; b=Idlrneg8VPTCMS2soJ4DAkDLFcOamKEziW6qgMsgLPs1pcBn1I9e7DVvB1KfENNkPloxxWEZgXOtMhNDyExtuYFfv+3x55J91g786i5eby8OqjDa6lw6mQdC4sowvqawTgsvmgBwZmOsZesKZ5rYvqcXoM2AguDRZsHT9tk9zvU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602546646; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kb7zkZJauBf/oSDNgYK6+uglPqh8gIaGZ4A3meEW04U=; b=JoVj8WHnuLSsg9tK5VYL2qWb5iYTrXYiGy7aPEDKyHW3WmhAmgk3/s3i8oIgFKrt6j+zdSIV7wTSbBHMhIHQSG7zdOFCZAzZD06iAhymuLcqLpM1bn4K/eMMHsSwy3qYQaRQm3rZuYPhTX1KzXETUwqFc4it2lC3r/B1ifzQ6+Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602546646194314.12893009433253; Mon, 12 Oct 2020 16:50:46 -0700 (PDT) Received: from localhost ([::1]:49068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS7aW-000656-QD for importer@patchew.org; Mon, 12 Oct 2020 19:50:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kS7UQ-0000Fk-7I; Mon, 12 Oct 2020 19:44:26 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:40870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kS7UO-0007ji-1A; Mon, 12 Oct 2020 19:44:25 -0400 Received: by mail-pg1-x542.google.com with SMTP id i2so16023198pgh.7; Mon, 12 Oct 2020 16:44:23 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j3sm9714890pjv.20.2020.10.12.16.44.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 16:44:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kb7zkZJauBf/oSDNgYK6+uglPqh8gIaGZ4A3meEW04U=; b=IMIwXl2KPBuZWXOanJ4qyGSlmY0ujwkk+K/6sflytZUpHMidYbpa9+1L2/1gR/4f4D ZdKPJTpccdP4E8p5L4vZFA3FBOHhVt5hYPJHZBWg0S5Iv+FW9cDiJtxYft7zlm0cADIK 5bIoiryiBUTDQ+Yoy2IdukUnd1KYe48DMdRPdWkH3btkjq7trYhx9nCsBXMcOEBoG+9g FMAMdKlhk5gPTRZn5x1nFiSzYmdkWqBuuiiJnv4nBJBMkUjjazfPjejCNPKcYkg7rF/f 6JW4XTSVkTAXurfKBSgsDr1QrBja0xV/coFQs+RQlccaFN03Y0lpzLY8sKqdzoIOT/4P sioQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kb7zkZJauBf/oSDNgYK6+uglPqh8gIaGZ4A3meEW04U=; b=uS24vR0lkdRLkih/7w0f0L5FKsqxKdgP+En3rbVbkx3hhJXj2YnpN2QS3H0NZyBaDJ svOGfAW14cMr1OuxMrG2baYzD4CrYwlC6VaXK4kkvI5W0XnDF7foEWmSs73aVF5rmw1s W2StuASot0myWmho1kL58Kdg7zngU1+P+OBOr6XtfM2FpCJFufngzUxeJtYf0TitwAy4 vWVD7Hi9w6JFEzQR7r6zrwbz7J+zSi5VDhUUG51XsE0oOFT3holt2kSyJgWOsvJQPyGr sWro8WfS9RPHHBU3JisWfpH/BKVznTBVa4+RsYmi84MCxCDnHrJyXC2YBNBA5Hu+pmTv k1Uw== X-Gm-Message-State: AOAM5334BVVXiGjsslB1vMarrR8zGnMoB1xdE0mQHLkLsv3mProWGzSZ P91Fe/kc1Ffy7oK7xZcup3Qd+rRqABm2AA== X-Google-Smtp-Source: ABdhPJxhjh4sSGSmtBioVF/TkZctgwUB/o94q7SBNzPwqpNSS/M8f2kMUWT8ntlADnbJ/8ksdDj0xg== X-Received: by 2002:a62:d0c1:0:b029:155:2e17:ea0 with SMTP id p184-20020a62d0c10000b02901552e170ea0mr23735480pfg.55.1602546261698; Mon, 12 Oct 2020 16:44:21 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org, =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PATCH v9 4/5] win32: Simplify gmtime_r detection not depends on if _POSIX_C_SOURCE are defined on msys2/mingw Date: Tue, 13 Oct 2020 07:43:47 +0800 Message-Id: <20201012234348.1427-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20201012234348.1427-1-luoyonggang@gmail.com> References: <20201012234348.1427-1-luoyonggang@gmail.com> 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::542; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x542.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Trivial , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Laurent Vivier , Yonggang Luo , Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We remove the CONFIG_LOCALTIME_R detection option in configure, and move th= e check existence of gmtime_r from configure into C header and source directly by u= sing macro `_POSIX_THREAD_SAFE_FUNCTIONS`. Before this patch, the configure script are always assume the compiler does= n't define _POSIX_C_SOURCE macro at all, but that's not true, because thirdparty libra= ry such as ncursesw may define -D_POSIX_C_SOURCE in it's pkg-config file. And that = C Flags will added -D_POSIX_C_SOURCE into each QEMU_CFLAGS. And that's causing the follo= wing compiling error: n file included from C:/work/xemu/qemu/include/qemu/osdep.h:119, from ../softmmu/main.c:25: C:/work/xemu/qemu/include/sysemu/os-win32.h:53:12: error: redundant redecla= ration of 'gmtime_r' [-Werror=3Dredundant-decls] 53 | struct tm *gmtime_r(const time_t *timep, struct tm *result); | ^~~~~~~~ In file included from C:/work/xemu/qemu/include/qemu/osdep.h:94, from ../softmmu/main.c:25: C:/CI-Tools/msys64/mingw64/x86_64-w64-mingw32/include/time.h:284:36: note: = previous definition of 'gmtime_r' was here 284 | __forceinline struct tm *__CRTDECL gmtime_r(const time_t *_Time, st= ruct tm *_Tm) { | ^~~~~~~~ In file included from C:/work/xemu/qemu/include/qemu/osdep.h:119, from ../softmmu/main.c:25: C:/work/xemu/qemu/include/sysemu/os-win32.h:55:12: error: redundant redecla= ration of 'localtime_r' [-Werror=3Dredundant-decls] 55 | struct tm *localtime_r(const time_t *timep, struct tm *result); | ^~~~~~~~~~~ In file included from C:/work/xemu/qemu/include/qemu/osdep.h:94, from ../softmmu/main.c:25: C:/CI-Tools/msys64/mingw64/x86_64-w64-mingw32/include/time.h:281:36: note: = previous definition of 'localtime_r' was here 281 | __forceinline struct tm *__CRTDECL localtime_r(const time_t *_Time,= struct tm *_Tm) { | ^~~~~~~~~~~ Compiling C object libcommon.fa.p/hw_gpio_zaurus.c.obj In file included from C:/work/xemu/qemu/include/qemu/osdep.h:119, from ../hw/i2c/smbus_slave.c:16: C:/work/xemu/qemu/include/sysemu/os-win32.h:53:12: error: redundant redecla= ration of 'gmtime_r' [-Werror=3Dredundant-decls] 53 | struct tm *gmtime_r(const time_t *timep, struct tm *result); | ^~~~~~~~ In file included from C:/work/xemu/qemu/include/qemu/osdep.h:94, from ../hw/i2c/smbus_slave.c:16: C:/CI-Tools/msys64/mingw64/x86_64-w64-mingw32/include/time.h:284:36: note: = previous definition of 'gmtime_r' was here 284 | __forceinline struct tm *__CRTDECL gmtime_r(const time_t *_Time, st= ruct tm *_Tm) { | ^~~~~~~~ In file included from C:/work/xemu/qemu/include/qemu/osdep.h:119, from ../hw/i2c/smbus_slave.c:16: C:/work/xemu/qemu/include/sysemu/os-win32.h:55:12: error: redundant redecla= ration of 'localtime_r' [-Werror=3Dredundant-decls] 55 | struct tm *localtime_r(const time_t *timep, struct tm *result); | ^~~~~~~~~~~ In file included from C:/work/xemu/qemu/include/qemu/osdep.h:94, from ../hw/i2c/smbus_slave.c:16: C:/CI-Tools/msys64/mingw64/x86_64-w64-mingw32/include/time.h:281:36: note: = previous definition of 'localtime_r' was here 281 | __forceinline struct tm *__CRTDECL localtime_r(const time_t *_Time,= struct tm *_Tm) { | ^~~~~~~~~~~ Compiling C object libcommon.fa.p/hw_dma_xilinx_axidma.c.obj After this patch, whenever ncursesw or other thirdparty libraries tried to = define or not define _POSIX_C_SOURCE, the source will building properly. Because now, we= don't make any assumption if _POSIX_C_SOURCE are defined. We solely relied on if the macro= `_POSIX_THREAD_SAFE_FUNCTIONS` are defined in msys2/mingw header. The _POSIX_THREAD_SAFE_FUNCTIONS are defined in mingw header like this: ``` #if defined(_POSIX_C_SOURCE) && !defined(_POSIX_THREAD_SAFE_FUNCTIONS) #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L #endif #ifdef _POSIX_THREAD_SAFE_FUNCTIONS __forceinline struct tm *__CRTDECL localtime_r(const time_t *_Time, struct = tm *_Tm) { return localtime_s(_Tm, _Time) ? NULL : _Tm; } __forceinline struct tm *__CRTDECL gmtime_r(const time_t *_Time, struct tm = *_Tm) { return gmtime_s(_Tm, _Time) ? NULL : _Tm; } __forceinline char *__CRTDECL ctime_r(const time_t *_Time, char *_Str) { return ctime_s(_Str, 0x7fffffff, _Time) ? NULL : _Str; } __forceinline char *__CRTDECL asctime_r(const struct tm *_Tm, char * _Str) { return asctime_s(_Str, 0x7fffffff, _Tm) ? NULL : _Str; } #endif ``` Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrang=C3=A9 --- configure | 34 ---------------------------------- include/sysemu/os-win32.h | 4 ++-- util/oslib-win32.c | 4 ++-- 3 files changed, 4 insertions(+), 38 deletions(-) diff --git a/configure b/configure index 71a574f718..9a87685517 100755 --- a/configure +++ b/configure @@ -2386,37 +2386,6 @@ if test "$vhost_net" =3D ""; then test "$vhost_kernel" =3D "yes" && vhost_net=3Dyes fi =20 -########################################## -# MinGW / Mingw-w64 localtime_r/gmtime_r check - -if test "$mingw32" =3D "yes"; then - # Some versions of MinGW / Mingw-w64 lack localtime_r - # and gmtime_r entirely. - # - # Some versions of Mingw-w64 define a macro for - # localtime_r/gmtime_r. - # - # Some versions of Mingw-w64 will define functions - # for localtime_r/gmtime_r, but only if you have - # _POSIX_THREAD_SAFE_FUNCTIONS defined. For fun - # though, unistd.h and pthread.h both define - # that for you. - # - # So this #undef localtime_r and #include - # are not in fact redundant. -cat > $TMPC << EOF -#include -#include -#undef localtime_r -int main(void) { localtime_r(NULL, NULL); return 0; } -EOF - if compile_prog "" "" ; then - localtime_r=3D"yes" - else - localtime_r=3D"no" - fi -fi - ########################################## # pkg-config probe =20 @@ -6610,9 +6579,6 @@ if [ "$bsd" =3D "yes" ] ; then echo "CONFIG_BSD=3Dy" >> $config_host_mak fi =20 -if test "$localtime_r" =3D "yes" ; then - echo "CONFIG_LOCALTIME_R=3Dy" >> $config_host_mak -fi if test "$qom_cast_debug" =3D "yes" ; then echo "CONFIG_QOM_CAST_DEBUG=3Dy" >> $config_host_mak fi diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index d8978e28c0..5346d51e89 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -48,12 +48,12 @@ #define siglongjmp(env, val) longjmp(env, val) =20 /* Missing POSIX functions. Don't use MinGW-w64 macros. */ -#ifndef CONFIG_LOCALTIME_R +#ifndef _POSIX_THREAD_SAFE_FUNCTIONS #undef gmtime_r struct tm *gmtime_r(const time_t *timep, struct tm *result); #undef localtime_r struct tm *localtime_r(const time_t *timep, struct tm *result); -#endif /* CONFIG_LOCALTIME_R */ +#endif /* _POSIX_THREAD_SAFE_FUNCTIONS */ =20 static inline void os_setup_signal_handling(void) {} static inline void os_daemonize(void) {} diff --git a/util/oslib-win32.c b/util/oslib-win32.c index 051afb217b..e99debfb8d 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -106,7 +106,7 @@ void qemu_anon_ram_free(void *ptr, size_t size) } } =20 -#ifndef CONFIG_LOCALTIME_R +#ifndef _POSIX_THREAD_SAFE_FUNCTIONS /* FIXME: add proper locking */ struct tm *gmtime_r(const time_t *timep, struct tm *result) { @@ -130,7 +130,7 @@ struct tm *localtime_r(const time_t *timep, struct tm *= result) } return p; } -#endif /* CONFIG_LOCALTIME_R */ +#endif /* _POSIX_THREAD_SAFE_FUNCTIONS */ =20 static int socket_error(void) { --=20 2.28.0.windows.1 From nobody Sun May 12 07:51:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1602546434; cv=none; d=zohomail.com; s=zohoarc; b=G5PmUzu7L+DWMQwFols3CtHeAD52s/smWXz/lCYM5BK+ZpcDNq11Hp63mPXz3cV9mKcl7S4IvK8mm55czSBK5heyBmsWrVPPj6YxPb7m8cDmMOcGKoOd3qEp1uFLx8pLIMq6jsvP/y3jtH5j1P7XnBouhTSda/R951ENe8281Vw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602546434; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UA3F8s/BXSq76zUIOLr9d6u5/XdTz5OeWjQXz+7ww2E=; b=B8nI/FylT/c72TogTBwFTKFqgthzO316rt/nLz8aGZU6V6/ZH40wDjcUSpZd5L1cFSsK/Ey0WLUtuwxuNs//dnY1Sq9wM3Oy7jwz2yiZpkJsMAV9fImIqVYbuUfsZEa3u8JeSioxcNhUIL42r6UY5d01t9F8InhjoL6Ft9m3FJA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602546434256474.2667640516497; Mon, 12 Oct 2020 16:47:14 -0700 (PDT) Received: from localhost ([::1]:42944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kS7X7-0003P5-6x for importer@patchew.org; Mon, 12 Oct 2020 19:47:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kS7UX-0000PI-5q; Mon, 12 Oct 2020 19:44:33 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:36971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kS7US-0007k0-6G; Mon, 12 Oct 2020 19:44:32 -0400 Received: by mail-pf1-x429.google.com with SMTP id 144so15259766pfb.4; Mon, 12 Oct 2020 16:44:27 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id j3sm9714890pjv.20.2020.10.12.16.44.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 16:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UA3F8s/BXSq76zUIOLr9d6u5/XdTz5OeWjQXz+7ww2E=; b=BwHbrneq/frl7kRBmaw/X99sftzcdIbYZIQfR8Wu7j5yFY8ynJpjWDokQmFUOg6Yli 2AlfRhcCY3OR5UOR+fT1DGZBJaORX59/nbOqYB5zweAMxY8PurpJjHx+ha5dkqFmkp0J kfgqxiRwRyLYGnlXGUCdNWA7BkSfw29Tevt/+uvhWTCSfzytW4a+sH3fD97jXptsBwWK 2o1A4arbGoAwjtoOuBK30JxoYhwN7oiDbgTf0Lawl16hcnndFZ+0586li6v+TlsMNr7X YLiWk3KWEl28IvXIkNv9ELXm2Wxbq+KZz8BaLqrkizqXF0I0KcYyLvJp/BobD/o9nhTH AITg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UA3F8s/BXSq76zUIOLr9d6u5/XdTz5OeWjQXz+7ww2E=; b=YvY1i8gB5urPty0QxyAvyQGog9lKAL2Lf1u6FP4OH5AoGobh8R92Y2m6dlFUpRt+yQ 9ndsxnkR6MOXBdexyVAOkIBUltbv4xCtYGkLxr5kd27ywg6zCZAJ0+DI+O8msdU4q+L/ Nsmvo18EChnsAYuAlr51vRzz9TW4ERz7sNYs5fAxqBKomHunjlxpCiCxFVyjOB0NwM/6 F6ZV6sXtLSMgZqokMpFXBVr4XC5ZgUElcapIWP35px8E/FfYhDLMSnx6zB4ZOoGPqFle CqnjJI2CxhlZSJQmITDML0Ogyo/b1FPcUrxme425EKumnTd6/3JuWhZ/BDr477WFcDSV b0+w== X-Gm-Message-State: AOAM532B0A/TssodKWn5L3BmqbOy+921mRx6Mdwwb5tLcvTuKzbbZJL7 mSBsi05nwILO33gEv9+TBhOB24eTzmbwHQ== X-Google-Smtp-Source: ABdhPJx2HWzo4chwzvmp16opIsq4QV2W2Mqz61hEsCSuhWxmvrynnmziXobgc1+Lld4Gm8Ejmom7Iw== X-Received: by 2002:a05:6a00:7d6:b029:152:3ccb:bc9e with SMTP id n22-20020a056a0007d6b02901523ccbbc9emr25999811pfu.57.1602546265746; Mon, 12 Oct 2020 16:44:25 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org, =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PATCH v9 5/5] configure: Fixes ncursesw detection under msys2/mingw by convert them to meson Date: Tue, 13 Oct 2020 07:43:48 +0800 Message-Id: <20201012234348.1427-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20201012234348.1427-1-luoyonggang@gmail.com> References: <20201012234348.1427-1-luoyonggang@gmail.com> 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::429; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x429.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Trivial , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Laurent Vivier , Yonggang Luo , Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The mingw pkg-config are showing following absolute path and contains : as = the separator, -D_XOPEN_SOURCE=3D600 -D_POSIX_C_SOURCE=3D199506L -IC:/CI-Tools/msys64/ming= w64/include/ncursesw:-I/usr/include/ncursesw: -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=3D600 -D_POSIX_C_SOURCE=3D199506L -IC -p= ipe -lncursesw -lgnurx -ltre -lintl -liconv -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=3D600 -D_POSIX_C_SOURCE=3D199506L -IC -l= ncursesw -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=3D600 -D_POSIX_C_SOURCE=3D199506L -IC -l= cursesw -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -pipe -lncurse= sw -lgnurx -ltre -lintl -liconv -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -lncursesw -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -lcursesw -DNCURSES_WIDECHAR -I/usr/include/ncursesw -pipe -lncursesw -lgnurx -ltre -= lintl -liconv -DNCURSES_WIDECHAR -I/usr/include/ncursesw -lncursesw -DNCURSES_WIDECHAR -I/usr/include/ncursesw -lcursesw Signed-off-by: Yonggang Luo Reviewed-by: Gerd Hoffmann --- configure | 118 +++------------------------------------------- meson.build | 83 +++++++++++++++++++++++++++----- meson_options.txt | 4 ++ ui/meson.build | 2 +- 4 files changed, 83 insertions(+), 124 deletions(-) diff --git a/configure b/configure index 9a87685517..f839c2a557 100755 --- a/configure +++ b/configure @@ -295,7 +295,8 @@ unset target_list_exclude =20 brlapi=3D"" curl=3D"" -curses=3D"" +iconv=3D"auto" +curses=3D"auto" docs=3D"" fdt=3D"auto" netmap=3D"no" @@ -1173,13 +1174,13 @@ for opt do ;; --disable-safe-stack) safe_stack=3D"no" ;; - --disable-curses) curses=3D"no" + --disable-curses) curses=3D"disabled" ;; - --enable-curses) curses=3D"yes" + --enable-curses) curses=3D"enabled" ;; - --disable-iconv) iconv=3D"no" + --disable-iconv) iconv=3D"disabled" ;; - --enable-iconv) iconv=3D"yes" + --enable-iconv) iconv=3D"enabled" ;; --disable-curl) curl=3D"no" ;; @@ -3440,102 +3441,6 @@ EOF fi fi =20 -########################################## -# iconv probe -if test "$iconv" !=3D "no" ; then - cat > $TMPC << EOF -#include -int main(void) { - iconv_t conv =3D iconv_open("WCHAR_T", "UCS-2"); - return conv !=3D (iconv_t) -1; -} -EOF - iconv_prefix_list=3D"/usr/local:/usr" - iconv_lib_list=3D":-liconv" - IFS=3D: - for iconv_prefix in $iconv_prefix_list; do - IFS=3D: - iconv_cflags=3D"-I$iconv_prefix/include" - iconv_ldflags=3D"-L$iconv_prefix/lib" - for iconv_link in $iconv_lib_list; do - unset IFS - iconv_lib=3D"$iconv_ldflags $iconv_link" - echo "looking at iconv in '$iconv_cflags' '$iconv_lib'" >> config.log - if compile_prog "$iconv_cflags" "$iconv_lib" ; then - iconv_found=3Dyes - break - fi - done - if test "$iconv_found" =3D yes ; then - break - fi - done - if test "$iconv_found" =3D "yes" ; then - iconv=3Dyes - else - if test "$iconv" =3D "yes" ; then - feature_not_found "iconv" "Install iconv devel" - fi - iconv=3Dno - fi -fi - -########################################## -# curses probe -if test "$iconv" =3D "no" ; then - # curses will need iconv - curses=3Dno -fi -if test "$curses" !=3D "no" ; then - if test "$mingw32" =3D "yes" ; then - curses_inc_list=3D"$($pkg_config --cflags ncurses 2>/dev/null):" - curses_lib_list=3D"$($pkg_config --libs ncurses 2>/dev/null):-lpdcurse= s" - else - curses_inc_list=3D"$($pkg_config --cflags ncursesw 2>/dev/null):-I/usr= /include/ncursesw:" - curses_lib_list=3D"$($pkg_config --libs ncursesw 2>/dev/null):-lncurse= sw:-lcursesw" - fi - curses_found=3Dno - cat > $TMPC << EOF -#include -#include -#include -int main(void) { - wchar_t wch =3D L'w'; - setlocale(LC_ALL, ""); - resize_term(0, 0); - addwstr(L"wide chars\n"); - addnwstr(&wch, 1); - add_wch(WACS_DEGREE); - return 0; -} -EOF - IFS=3D: - for curses_inc in $curses_inc_list; do - # Make sure we get the wide character prototypes - curses_inc=3D"-DNCURSES_WIDECHAR $curses_inc" - IFS=3D: - for curses_lib in $curses_lib_list; do - unset IFS - if compile_prog "$curses_inc" "$curses_lib" ; then - curses_found=3Dyes - break - fi - done - if test "$curses_found" =3D yes ; then - break - fi - done - unset IFS - if test "$curses_found" =3D "yes" ; then - curses=3Dyes - else - if test "$curses" =3D "yes" ; then - feature_not_found "curses" "Install ncurses devel" - fi - curses=3Dno - fi -fi - ########################################## # curl probe if test "$curl" !=3D "no" ; then @@ -6200,16 +6105,6 @@ if test "$have_x11" =3D "yes" && test "$need_x11" = =3D "yes"; then echo "X11_CFLAGS=3D$x11_cflags" >> $config_host_mak echo "X11_LIBS=3D$x11_libs" >> $config_host_mak fi -if test "$iconv" =3D "yes" ; then - echo "CONFIG_ICONV=3Dy" >> $config_host_mak - echo "ICONV_CFLAGS=3D$iconv_cflags" >> $config_host_mak - echo "ICONV_LIBS=3D$iconv_lib" >> $config_host_mak -fi -if test "$curses" =3D "yes" ; then - echo "CONFIG_CURSES=3Dy" >> $config_host_mak - echo "CURSES_CFLAGS=3D$curses_inc" >> $config_host_mak - echo "CURSES_LIBS=3D$curses_lib" >> $config_host_mak -fi if test "$pipe2" =3D "yes" ; then echo "CONFIG_PIPE2=3Dy" >> $config_host_mak fi @@ -7181,6 +7076,7 @@ NINJA=3D${ninja:-$PWD/ninjatool} $meson setup \ -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_p= ng=3D$vnc_png \ -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f \ -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt \ + -Diconv=3D$iconv -Dcurses=3D$curses \ $cross_arg \ "$PWD" "$source_path" =20 diff --git a/meson.build b/meson.build index c23167c61b..8ad600a91a 100644 --- a/meson.build +++ b/meson.build @@ -424,6 +424,74 @@ if targetos =3D=3D 'linux' and have_tools and not get_= option('mpath').disabled() endif endif =20 +iconv =3D not_found +if not get_option('iconv').disabled() + libiconv =3D cc.find_library('iconv', + required: false, + static: enable_static) + if libiconv.found() + if cc.links(''' + #include + int main(void) { + iconv_t conv =3D iconv_open("WCHAR_T", "UCS-2"); + return conv !=3D (iconv_t) -1; + }''', dependencies: [libiconv]) + iconv =3D declare_dependency(dependencies: [libiconv]) + endif + endif +endif +if get_option('iconv').enabled() and not iconv.found() + error('Cannot detect iconv API') +endif + +curses =3D not_found +if iconv.found() and not get_option('curses').disabled() + curses_libname_list =3D ['ncursesw', 'ncurses', 'cursesw', 'pdcurses'] + curses_test =3D ''' + #include + #include + #include + int main(void) { + wchar_t wch =3D L'w'; + setlocale(LC_ALL, ""); + resize_term(0, 0); + addwstr(L"wide chars\n"); + addnwstr(&wch, 1); + add_wch(WACS_DEGREE); + return 0; + }''' + foreach curses_libname : curses_libname_list + libcurses =3D dependency(curses_libname, + required: false, + method: 'pkg-config', + static: enable_static) + + if not libcurses.found() + dirs =3D ['/usr/include/ncursesw'] + if targetos =3D=3D 'windows' + dirs =3D [] + endif + libcurses =3D cc.find_library(curses_libname, + required: false, + dirs: dirs, + static: enable_static) + endif + if libcurses.found() + if cc.links(curses_test, dependencies: [libcurses]) + curses =3D declare_dependency(compile_args: '-DNCURSES_WIDECHAR'= , dependencies: [libcurses]) + break + endif + endif + endforeach +endif +if get_option('curses').enabled() and not curses.found() + if not iconv.found() + error('Cannot detect iconv API') + else + error('Cannot detect curses API') + endif +endif + brlapi =3D not_found if 'CONFIG_BRLAPI' in config_host brlapi =3D declare_dependency(link_args: config_host['BRLAPI_LIBS'].spli= t()) @@ -502,16 +570,6 @@ if 'CONFIG_X11' in config_host x11 =3D declare_dependency(compile_args: config_host['X11_CFLAGS'].split= (), link_args: config_host['X11_LIBS'].split()) endif -curses =3D not_found -if 'CONFIG_CURSES' in config_host - curses =3D declare_dependency(compile_args: config_host['CURSES_CFLAGS']= .split(), - link_args: config_host['CURSES_LIBS'].split(= )) -endif -iconv =3D not_found -if 'CONFIG_ICONV' in config_host - iconv =3D declare_dependency(compile_args: config_host['ICONV_CFLAGS'].s= plit(), - link_args: config_host['ICONV_LIBS'].split()) -endif vnc =3D not_found png =3D not_found jpeg =3D not_found @@ -618,6 +676,7 @@ config_host_data.set('CONFIG_COCOA', cocoa.found()) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api) +config_host_data.set('CONFIG_CURSES', curses.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VNC', vnc.found()) @@ -1833,8 +1892,8 @@ if config_host.has_key('CONFIG_NETTLE') endif summary_info +=3D {'libtasn1': config_host.has_key('CONFIG_TASN1'= )} summary_info +=3D {'PAM': config_host.has_key('CONFIG_AUTH_P= AM')} -summary_info +=3D {'iconv support': config_host.has_key('CONFIG_ICONV'= )} -summary_info +=3D {'curses support': config_host.has_key('CONFIG_CURSES= ')} +summary_info +=3D {'iconv support': iconv.found()} +summary_info +=3D {'curses support': curses.found()} # TODO: add back version summary_info +=3D {'virgl support': config_host.has_key('CONFIG_VIRGL'= )} summary_info +=3D {'curl support': config_host.has_key('CONFIG_CURL')} diff --git a/meson_options.txt b/meson_options.txt index 1d3c94840a..e6cb1e589b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -32,6 +32,10 @@ option('cocoa', type : 'feature', value : 'auto', description: 'Cocoa user interface (macOS only)') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') +option('iconv', type : 'feature', value : 'auto', + description: 'Font glyph conversion support') +option('curses', type : 'feature', value : 'auto', + description: 'curses UI') option('sdl', type : 'feature', value : 'auto', description: 'SDL user interface') option('sdl_image', type : 'feature', value : 'auto', diff --git a/ui/meson.build b/ui/meson.build index 8a080c38e3..78ad792ffb 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -39,7 +39,7 @@ specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl) =20 ui_modules =3D {} =20 -if config_host.has_key('CONFIG_CURSES') +if curses.found() curses_ss =3D ss.source_set() curses_ss.add(when: [curses, iconv], if_true: [files('curses.c'), pixman= ]) ui_modules +=3D {'curses' : curses_ss} --=20 2.28.0.windows.1