From patchwork Thu Sep 10 10:30:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305734 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 866B2C07548 for ; Thu, 10 Sep 2020 10:34:02 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 226FC20BED for ; Thu, 10 Sep 2020 10:34:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IxG+705s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 226FC20BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGJtx-0002JZ-5g for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 06:34:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGJrU-0006b2-5e; Thu, 10 Sep 2020 06:31:28 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:45217) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGJrS-00034b-Ek; Thu, 10 Sep 2020 06:31:27 -0400 Received: by mail-pg1-x543.google.com with SMTP id 67so3996764pgd.12; Thu, 10 Sep 2020 03:31:25 -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=CNPvacxKIPvNAAT6pnf6ItFkwT6w9lX5etFkypi0MqU=; b=IxG+705s4HfVJTmkW4Etp8qIToKpzpikRor4KgwE7Z1E7pimX4d9Sx1wDuA3CaegI6 Lzvb4+zQyTEfF4U8CAt7rbg1RO+scWTdzPlULJ2oul+RQ0MYeyINSPJtny2sQ/SEfb4y EJz+ztjRcdGud1lgcVpByyjt5EB8wXCzaA6Q/xXMrFfCKf8RI0FB7+LItwJlmVY+mbQS Rh146ClVnDYOlPErmP45zdR1zDYgwKxiQi1ZbO2Bv4wje4fqe62p+0eJkgCtMMgH5BC/ kNhGxN8fBt1cJ0WBxWzQtqNc3KBW3iWIdWMSgOtyS3cBE4bz69WuAN0c+xeQHSdjOx9Q Ek9Q== 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=CNPvacxKIPvNAAT6pnf6ItFkwT6w9lX5etFkypi0MqU=; b=oJGxLrmbn1uRm7dPQWEpnhmspoX0OVgcpnP3vo7M3vTT6a6DsQR03pgrGP0RjaETq2 90OXWy+bZF0caeFctqX+bbHGIpN2Isc1/QCeBN8ADAQuer3veiNORt13pfbRQXwtxIqS DBp0Ewm56Rrzb7B9ysKKD0oiub049uK9iGmE6oHhpy+3LrcKUYAB01Sk/pzqzat0Szff QWsEYVdLfbmW2/esuE4cAowLfDSbX+0lLVsfGWXLfyafMX5ZcyoECdjL9u051CBPD2AD 2ZlPpVcUSRmKVqvAjWxdnhw2/WWTiu6NLDVzanNzoO/M4E4Ulp+P80TPxvrlHznPYQmQ 6a5A== X-Gm-Message-State: AOAM532fwi6E9Pjymz6FhpNr0bsCMd5S7EEWfWdvslUAqmUWpT9pCTTd zB1sI+B5PwwWnbAyzLtjOsGBe7ma4p5LmijzVzI= X-Google-Smtp-Source: ABdhPJwhsK7nsQ/7CyqWDCg4diLxwuri3qYmPRT8J2fZthBUFSp8KItvuAIntwkdMPpDmIHXwtIEDQ== X-Received: by 2002:a63:f546:: with SMTP id e6mr3843785pgk.7.1599733884285; Thu, 10 Sep 2020 03:31:24 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id g21sm2000203pfh.30.2020.09.10.03.31.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 03:31:23 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v7 01/25] file-win32: Fix "locking" option Date: Thu, 10 Sep 2020 18:30:35 +0800 Message-Id: <20200910103059.987-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200910103059.987-1-luoyonggang@gmail.com> References: <20200910103059.987-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::543; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x543.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: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Kevin Wolf The intended behaviour was that locking=off/auto work and have no effect (to remain compatible with file-posix), whereas locking=on would return an error. Unfortunately, the code forgot to remove "locking" from the options QDict, so any attempt to use the option would fail. Replace the option parsing code for "locking" with something that is part of the raw_runtime_opts QemuOptsList (so it is properly removed from the QDict) and looks more like file-posix. Signed-off-by: Kevin Wolf Message-Id: <20200907092739.9988-1-kwolf@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/file-win32.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/block/file-win32.c b/block/file-win32.c index ab69bd811a..e2900c3a51 100644 --- a/block/file-win32.c +++ b/block/file-win32.c @@ -299,6 +299,11 @@ static QemuOptsList raw_runtime_opts = { .type = QEMU_OPT_STRING, .help = "host AIO implementation (threads, native)", }, + { + .name = "locking", + .type = QEMU_OPT_STRING, + .help = "file locking mode (on/off/auto, default: auto)", + }, { /* end of list */ } }, }; @@ -333,6 +338,7 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags, Error *local_err = NULL; const char *filename; bool use_aio; + OnOffAuto locking; int ret; s->type = FTYPE_FILE; @@ -343,10 +349,24 @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags, goto fail; } - if (qdict_get_try_bool(options, "locking", false)) { + locking = qapi_enum_parse(&OnOffAuto_lookup, + qemu_opt_get(opts, "locking"), + ON_OFF_AUTO_AUTO, &local_err); + if (local_err) { + error_propagate(errp, local_err); + ret = -EINVAL; + goto fail; + } + switch (locking) { + case ON_OFF_AUTO_ON: error_setg(errp, "locking=on is not supported on Windows"); ret = -EINVAL; goto fail; + case ON_OFF_AUTO_OFF: + case ON_OFF_AUTO_AUTO: + break; + default: + g_assert_not_reached(); } filename = qemu_opt_get(opts, "filename"); From patchwork Thu Sep 10 10:30:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305732 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1ED79C433E2 for ; Thu, 10 Sep 2020 10:35:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id AC4D920BED for ; Thu, 10 Sep 2020 10:35:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ns4QmS2I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC4D920BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGJvd-0005iS-Pc for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 06:35:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGJrm-0006vg-AD; Thu, 10 Sep 2020 06:31:46 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:35873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGJrk-000362-FN; Thu, 10 Sep 2020 06:31:46 -0400 Received: by mail-pg1-x52f.google.com with SMTP id f2so1991165pgd.3; Thu, 10 Sep 2020 03:31:42 -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=/Q/d/vfX2r5ok5sWGBwNZjHxKJu0oUaT5gHBOiJ10fI=; b=ns4QmS2IsnRySuQXjBp5ziFLlXrPQogKSSJJtJVmXGSjvZxfl+0Ve1FiiJLfOPe6fa gkUj33aNZeE6TBnhY30Rv2Xe0Z3pE5ZJGZXOp0jIkypJJm7ynwLpI/1217QBHXNC+SMi LiM25i3jcmD5lRKuEzhbkR3CALywcozV0/ezq+qq7sXnXqz4VkY70fkz5GJ9PmZYNS6I U85093PaLTvwMt9wTX1h2zKwlm48UMpijAPwGbxpKt8iBdtD2t7vfLUkYpaFwqoSeSw8 JYxg7jTdXz6SYVI6ALvaO0bUZ/y3AZsEKLSQVtkR6IpWofM4tha37tDJQvY7Wz6JtmWx F+Fw== 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=/Q/d/vfX2r5ok5sWGBwNZjHxKJu0oUaT5gHBOiJ10fI=; b=ix8A/GPlBJ75LK5prTL8bR4YU5stXIeZ5nGi93uL0eyduWyaXURXMdi77+1wuOZhQd J+mKcgWhCuzwd3J5qUFB+Yj/SgbjD51b2kJWTLv8viD5dyDTyN77ARJXHK8vTJrlHH9d RCmq6U2xKZ8kc846Dr15RIe5BlxuBOsD00xw5UiN+mq8x/3oGkS8cVvZsyzqlvYDVaRj WjCEQdtQ7x45lPATUwmq0270lAW4Y87p3OHMoyLsZZrafWAxaWEiu4SpNxo6F8EmNxyt unST36frMdVEoGuJJKfIrU7jnXvMNpqUcaf5u89uskbxLa6Is2mogUe0V8w0/l268HON tgFA== X-Gm-Message-State: AOAM532TT1Rn2DiqtJWjjt09EV/eeclSr67qn+BjUWNBu7l5NOz010M8 Qa8YXdliBfad68MFbSSictvECqnNIxM8RSMerYo= X-Google-Smtp-Source: ABdhPJxv8yQi8TLku5oEqgOsYkaUKBDDlK+5QV+s4yw5e9tgEms1QBayJaDSBeU3Ja2GEigXmHeTHg== X-Received: by 2002:a63:30c2:: with SMTP id w185mr3970567pgw.436.1599733901328; Thu, 10 Sep 2020 03:31:41 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id g21sm2000203pfh.30.2020.09.10.03.31.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 03:31:40 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v7 04/25] ci: fixes msys2 build by upgrading capstone to 4.0.2 Date: Thu, 10 Sep 2020 18:30:38 +0800 Message-Id: <20200910103059.987-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200910103059.987-1-luoyonggang@gmail.com> References: <20200910103059.987-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x52f.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: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The currently random version capstone have the following compiling issue: CC /c/work/xemu/qemu/build/slirp/src/arp_table.o make[1]: *** No rule to make target “/c/work/xemu/qemu/build/capstone/capstone.lib”。 Stop. Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1 are the tagged version 4.0.2 when upgrading to this version, the folder structure of include are changed to qemu\capstone\include │ platform.h │ ├─capstone │ arm.h │ arm64.h │ capstone.h │ evm.h │ m680x.h │ m68k.h │ mips.h │ platform.h │ ppc.h │ sparc.h │ systemz.h │ tms320c64x.h │ x86.h │ xcore.h │ └─windowsce intrin.h stdint.h in capstone. so we need add extra include path -I${source_path}/capstone/include/capstone for directly #include , and the exist include path should preserve, because in capstone code there something like #include "capstone/capstone.h" If only using capstone_cflags="-I${source_path}/capstone/include/capstone" Then will cause the following compiling error: CC cs.o cs.c:17:10: fatal error: 'capstone/capstone.h' file not found #include ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. Signed-off-by: Yonggang Luo --- capstone | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/capstone b/capstone index 22ead3e0bf..1d23053284 160000 --- a/capstone +++ b/capstone @@ -1 +1 @@ -Subproject commit 22ead3e0bfdb87516656453336160e0a37b066bf +Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1 diff --git a/configure b/configure index 4231d56bcc..f4f8bc3756 100755 --- a/configure +++ b/configure @@ -5156,7 +5156,7 @@ case "$capstone" in LIBCAPSTONE=libcapstone.a fi capstone_libs="-Lcapstone -lcapstone" - capstone_cflags="-I${source_path}/capstone/include" + capstone_cflags="-I${source_path}/capstone/include -I${source_path}/capstone/include/capstone" ;; system) From patchwork Thu Sep 10 10:30:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305735 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27AA2C433E2 for ; Thu, 10 Sep 2020 10:32:50 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8A00420BED for ; Thu, 10 Sep 2020 10:32:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="L/JoH76u" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A00420BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGJsm-0008OQ-Ct for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 06:32:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGJrr-0006xz-3m; Thu, 10 Sep 2020 06:31:51 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:37298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGJro-00036T-TX; Thu, 10 Sep 2020 06:31:50 -0400 Received: by mail-pl1-x642.google.com with SMTP id u9so703289plk.4; Thu, 10 Sep 2020 03:31:48 -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=TsNOy56cT/aZuPzlGfi9G8/JBTKitoxne2lgskAEKvc=; b=L/JoH76ucAfhyt0NZTIJS+d7QRNEC1YNyzAAGaRRgJ0bufgboeXQaIOGrV4bFYRqAN k91j4BN1EIOYHKjRUtwe7btFmyZG1Fu6T9I2RIQLxS0rk6dNDjYEZjRyGWn14tbVR1n3 FhhB1hYoH0Z+o5l21vlFeWAGO1J5zOyfRZoTciiIWVLjPNqk607XBwWcVt8x60bD2j3P ohfff3MEt29OxxIMdcc9XQ0VIc6laOWWg7phre0jygd8XiHHFb2tklCI4jF5JHtuKHr0 iopVtGtb/6tpuD4e0oBUa+ThpJmLWxopwI+sCEMk2d2JrR3qvZJoTWFv1WCoyqVqUHAg hvrg== 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=TsNOy56cT/aZuPzlGfi9G8/JBTKitoxne2lgskAEKvc=; b=sl9jASxfhgma/hbZoyD1lm2+nldolLODxNYtWRXY96aJajwV3Mquy5cEyfNGKtJvHp 5uQH0cYmJ3winQG2Fy4RVReVTHIpYgvb3iseEHhAtM8k6dwd2Sb35HQSAjHtqP6Peyy9 t39yrZhGeyrMpz2qBXr7dAQXlryUnlm42/8tMUQkaZWUnQ8qeYXvmdULPEPUT6ROb9sG mfxmY51YUUFpoSMntURo5kjZWz06OHNssyfCb6EF7d3vuCgSc7U1GXMEr+aG/zvZKAMO xAesCxzbqW2wqskXtWSYbhoZ7FHwvOEtH+s/pxtyvkUtjg7lU1TiPokOO/GJrAhEn/7c 8ScA== X-Gm-Message-State: AOAM533WdLEuZEnC8AE1mBWRIspDZ+F+Rmo26RuruoUa8YDrLDwx0aeg wqDo0pqdqcWpTTiey90FPaR4d9ddozss61UXTHE= X-Google-Smtp-Source: ABdhPJxUkdEsyqNC/h03NHTrS4qSY0nojxkfIqNTRla14UJkJI0eApIGA+D5VAfU6Hlnxl7sIOJ1Ng== X-Received: by 2002:a17:90a:d90f:: with SMTP id c15mr4801891pjv.160.1599733906710; Thu, 10 Sep 2020 03:31:46 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id g21sm2000203pfh.30.2020.09.10.03.31.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 03:31:45 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v7 05/25] configure: Fixes ncursesw detection under msys2/mingw and enable curses Date: Thu, 10 Sep 2020 18:30:39 +0800 Message-Id: <20200910103059.987-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200910103059.987-1-luoyonggang@gmail.com> References: <20200910103059.987-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x642.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: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The mingw pkg-config are showing following absolute path and contains : as the separator, so we must not use : as path separator. and we know the command line parameter are not likely contains newline, we could use newline as path command line parameter separator -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC:/CI-Tools/msys64/mingw64/include/ncursesw:-I/usr/include/ncursesw: -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC -pipe -lncursesw -lgnurx -ltre -lintl -liconv -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC -lncursesw -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC -lcursesw -DNCURSES_WIDECHAR /CI-Tools/msys64/mingw64/include/ncursesw -pipe -lncursesw -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 Refer to https://unix.stackexchange.com/a/103011/218958 If your file names are guaranteed not to contain newlines, you can use newlines as the separator. W hen you expand the variable, first turn off globbing with set -f and set the list of field splitting characters IFS to contain only a newline. 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 --- configure | 25 +++++++++++++++---------- ui/curses.c | 10 +++++----- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/configure b/configure index f4f8bc3756..b21843fdb9 100755 --- a/configure +++ b/configure @@ -3653,35 +3653,40 @@ if test "$iconv" = "no" ; then fi if test "$curses" != "no" ; then if test "$mingw32" = "yes" ; then - curses_inc_list="$($pkg_config --cflags ncurses 2>/dev/null):" - curses_lib_list="$($pkg_config --libs ncurses 2>/dev/null):-lpdcurses" + curses_inc_list="$($pkg_config --cflags ncurses 2>/dev/null) + $($pkg_config --cflags ncursesw 2>/dev/null)" + curses_lib_list="$($pkg_config --libs ncurses 2>/dev/null) + $($pkg_config --libs ncursesw 2>/dev/null) + -lpdcurses" else - curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):-I/usr/include/ncursesw:" - curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw:-lcursesw" + curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null) + -I/usr/include/ncursesw:" + curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null) + -lncursesw + -lcursesw" fi curses_found=no cat > $TMPC << EOF #include #include #include -#include int main(void) { - const char *codeset; wchar_t wch = L'w'; setlocale(LC_ALL, ""); resize_term(0, 0); addwstr(L"wide chars\n"); addnwstr(&wch, 1); add_wch(WACS_DEGREE); - codeset = nl_langinfo(CODESET); - return codeset != 0; + return 0; } EOF - IFS=: + IFS=' +' # turn off variable value expansion except for splitting at newlines for curses_inc in $curses_inc_list; do # Make sure we get the wide character prototypes curses_inc="-DNCURSES_WIDECHAR $curses_inc" - IFS=: + IFS=' +' # turn off variable value expansion except for splitting at newlines for curses_lib in $curses_lib_list; do unset IFS if compile_prog "$curses_inc" "$curses_lib" ; then 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 #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 = g_get_codeset(); /* * Control characters are normally non-printable, but VGA does have @@ -566,14 +566,14 @@ static void font_setup(void) 0x25bc }; - ucs2_to_nativecharset = iconv_open(nl_langinfo(CODESET), "UCS-2"); + ucs2_to_nativecharset = iconv_open(local_codeset, "UCS-2"); if (ucs2_to_nativecharset == (iconv_t) -1) { fprintf(stderr, "Could not convert font glyphs from UCS-2: '%s'\n", strerror(errno)); exit(1); } - nativecharset_to_ucs2 = iconv_open("UCS-2", nl_langinfo(CODESET)); + nativecharset_to_ucs2 = iconv_open("UCS-2", local_codeset); if (nativecharset_to_ucs2 == (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); } - font_conv = iconv_open(nl_langinfo(CODESET), font_charset); + font_conv = iconv_open(local_codeset, font_charset); if (font_conv == (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); - if (strcmp(nl_langinfo(CODESET), "UTF-8")) { + if (strcmp(local_codeset, "UTF-8")) { /* Non-Unicode capable, use termcap equivalents for those available */ for (i = 0; i <= 0xFF; i++) { wchar_t wch[CCHARW_MAX]; From patchwork Thu Sep 10 10:30:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305733 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91CF5C43461 for ; Thu, 10 Sep 2020 10:34:33 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 35BCA20BED for ; Thu, 10 Sep 2020 10:34:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KurugJDr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35BCA20BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGJuS-0003Q6-25 for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 06:34:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGJrw-00079Z-Rg; Thu, 10 Sep 2020 06:31:56 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:39767) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGJru-00036e-Ro; Thu, 10 Sep 2020 06:31:56 -0400 Received: by mail-pj1-x1042.google.com with SMTP id s2so2820082pjr.4; Thu, 10 Sep 2020 03:31:54 -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=54KjmFONhFVNbISF0ZvZ1gRQPHqntcxYT0Rta8IUzTM=; b=KurugJDrN1wGMLweoZjbyHB+qUZNqOrKrnUYXK4t2mwfPWSoahFtg+wrhKLcZKB+On J/6JDp9HhjjmxMEYXfeytHJqiUvLc+kNqpydi935223Bb4N9aPOiX0RvpN5XW91sbB1q lxL3ZJW1EFmE9Yd/tfDUIXjkpfh8VPMgIsyg/cf1EQ2aRg7qspAWP/AdloxETJ+bswE+ cMi1reZbQ4iBD4DMEOlt13SMxoZIcGxaW3wOxPa5Tzv3Bhbykz5Lu1TnGFlykLIPV67B Hs8ISjyWBe09KIZ5uTPyr2GYE/juEyOW7+IuOGeU1cBCvKd3qqYLNyNfKMfWDv4Iipgl /5OA== 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=54KjmFONhFVNbISF0ZvZ1gRQPHqntcxYT0Rta8IUzTM=; b=RDCE/u+pgmQpGITl4WA0Ifb/WCINr90EkS6sili6/St0bL5zIxXsPSqVuQTnCw/4Is StYfRutRbOBQwXqaoxTEThJLBoyKizU7vNbqY7R3IyNiazpPG3VAM7SKmGkEUfOgbHUf SgRGupdr7HTeQo/vxcGtYf5st+67agHaR5yJ8r8HgXlek4QGwLWg0ydKCxYKa/JfTO9L JuUqVopaKQutIBNsmNv8OLlWL7lqTLNbSZaaNwiW5B2Wxl4rBUzCUxZnDM0Od4ZilCBe gEbzx2+BFIqaarCF20YZ0vzIKiWG5g21jAskohX5Ma3y9m5l+OKurXbk3NpVpcWf9F0k ziRg== X-Gm-Message-State: AOAM532DSfIVg8CRVpRsupCuh71j95xKPR86jxGSoMtEITyy2A7N1wHT R/Mlq4qp3YP7Ohl77Rm0Gkcp2/jUROpzWhP3NKs= X-Google-Smtp-Source: ABdhPJzeSZENAm9t3ZHX/JWZA6L1FLeQv9n0FeoEKD3nUkk7daYT9aNtrDuHq17A07sTS82HynPgtQ== X-Received: by 2002:a17:90a:880e:: with SMTP id s14mr4591185pjn.140.1599733912568; Thu, 10 Sep 2020 03:31:52 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id g21sm2000203pfh.30.2020.09.10.03.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 03:31:51 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v7 06/25] win32: Simplify gmtime_r detection direct base on _POSIX_THREAD_SAFE_FUNCTIONS. Date: Thu, 10 Sep 2020 18:30:40 +0800 Message-Id: <20200910103059.987-7-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200910103059.987-1-luoyonggang@gmail.com> References: <20200910103059.987-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1042.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: Kevin Wolf , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" First, this reduce the size of configure, configure are tending to removal in future, and this didn't introduce any new feature or remove any exist feature. Second, the current localtime_r detection are conflict with ncursesw detection in mingw, when ncursesw detected, it will provide the following compile flags pkg-config --cflags ncursesw -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC:/CI-Tools/msys64/mingw64/include/ncursesw And the compile flag _POSIX_C_SOURCE will always cause _POSIX_THREAD_SAFE_FUNCTIONS to be defined, in new version of mingw, that's will cause localtime_r to be defined. But the configure script didn't provide _POSIX_C_SOURCE macro, and that's will result localtime_r not detected because localtime_r are defined in forceinline manner. And finally cause conflict between QEMU defined localtime_r struct tm *localtime_r(const time_t *timep, struct tm *result); with mingw defined localtime_r ``` #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 ``` So I suggest remove this configure script, and restrict msys2/mingw version to easy to maintain. And use _POSIX_THREAD_SAFE_FUNCTIONS to guard the localtime_r and counterpart functions Signed-off-by: Yonggang Luo --- configure | 34 ---------------------------------- include/sysemu/os-win32.h | 4 ++-- util/oslib-win32.c | 2 +- 3 files changed, 3 insertions(+), 37 deletions(-) diff --git a/configure b/configure index b21843fdb9..af86ba1db3 100755 --- a/configure +++ b/configure @@ -2495,37 +2495,6 @@ if test "$vhost_net" = ""; then test "$vhost_kernel" = "yes" && vhost_net=yes fi -########################################## -# MinGW / Mingw-w64 localtime_r/gmtime_r check - -if test "$mingw32" = "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="yes" - else - localtime_r="no" - fi -fi - ########################################## # pkg-config probe @@ -7087,9 +7056,6 @@ if [ "$bsd" = "yes" ] ; then echo "CONFIG_BSD=y" >> $config_host_mak fi -if test "$localtime_r" = "yes" ; then - echo "CONFIG_LOCALTIME_R=y" >> $config_host_mak -fi if test "$qom_cast_debug" = "yes" ; then echo "CONFIG_QOM_CAST_DEBUG=y" >> $config_host_mak fi diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index d8978e28c0..3ac8a53bac 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -48,12 +48,12 @@ #define siglongjmp(env, val) longjmp(env, val) /* 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 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 c654dafd93..f2fa9a3549 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) } } -#ifndef CONFIG_LOCALTIME_R +#ifndef _POSIX_THREAD_SAFE_FUNCTIONS /* FIXME: add proper locking */ struct tm *gmtime_r(const time_t *timep, struct tm *result) { From patchwork Thu Sep 10 10:30:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305731 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC6A0C433E2 for ; Thu, 10 Sep 2020 10:37:53 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6576D20BED for ; Thu, 10 Sep 2020 10:37:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NxL2nwwP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6576D20BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGJxg-0001JU-5n for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 06:37:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGJsL-0007qq-2W; Thu, 10 Sep 2020 06:32:21 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:47001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGJsJ-00039h-4t; Thu, 10 Sep 2020 06:32:20 -0400 Received: by mail-pl1-x641.google.com with SMTP id d16so691510pll.13; Thu, 10 Sep 2020 03:32:18 -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=18mOftWXQC3Rn89AKTi/Z7fcDnMtQzhw+fXUDjoqjy0=; b=NxL2nwwP2e7jzmdGQi1n0rdmhUzsmCBDinBYoZXKXgQNdJIMsWBNypKsBXtl2Qohtk nEvAVxUNgsLQ2z26lNK2Mp2Wpn70rvpYdbiXPCY8MocgF5FILoBsebV92TA047jsraep bDzqW42jT0xsdoMvUh43LHuIxlr2rdNwdoWmqzJtNkbeG6QJKvUJvsYoIQJVITlO2MY7 5HjeRObOG31eN+XHtH00RvWpoN0AXoLySfGY4FkfWyPp4438PPxeZuA6yymEv/sAKxRp uLEjX5h2W09/6pGl1uKSP6MGLRx/OVdiU6CaHdNdZ/+FiEn4nR/moyxPHklGQWZOi+0f aXdg== 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=18mOftWXQC3Rn89AKTi/Z7fcDnMtQzhw+fXUDjoqjy0=; b=JjdIyU3pYktnocuobQbn/9j/iI+hQPmsOAxgbATGuWZlw/9RVaiAw8Qb5a4W0mz408 JnpouJaX5ln5NiWpsLFmH6VuDow/jZyvlN963g0trwB1VNk8H3uN1n4sRtTVe5yig/vb 5E1VT02pRuy5j8WX6CeMlXyyo1nzn7109In38tG9atidAqlBPa529+C9e3Ai7YqScOwr 1vR2vGKtbU+Dd30CAvSNBGZu+sP5x9Onzqrbwc7jZYeJCkYVyP8mioBemgMRruTCzFj0 YcTDinunRpGpyyjTr53YLnvOEfSYTBOTY0BkXtRoTxom1zGw4rxIcK13ywtbAQQN+kq1 KSpg== X-Gm-Message-State: AOAM530wCwahXKKZV1Yu6psucLiOenTnQulH8yA7Zknox9XhJX3comwV IKO+nKkvclpIcs2NSGFOWNUikay2/gKyuivyq4w= X-Google-Smtp-Source: ABdhPJwJBEbAuJzPLC3PPLUZTJ6qiQsRrNcjpKNqQOmJDhZRol9oBXgV/4fardWMZU+V+GFTIaQl6Q== X-Received: by 2002:a17:902:d88e:b029:d0:89f4:6222 with SMTP id b14-20020a170902d88eb02900d089f46222mr4884088plz.10.1599733937080; Thu, 10 Sep 2020 03:32:17 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id g21sm2000203pfh.30.2020.09.10.03.32.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 03:32:16 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v7 10/25] tests: test-replication disable /replication/secondary/* on msys2/mingw. Date: Thu, 10 Sep 2020 18:30:44 +0800 Message-Id: <20200910103059.987-11-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200910103059.987-1-luoyonggang@gmail.com> References: <20200910103059.987-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::641; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x641.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: Kevin Wolf , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" They caused failure on msys2/mingw, that's because file-win32.c not implement .bdrv_reopen_prepare/commit/abort yet. This is the error message: > $ ./tests/test-replication.exe > # random seed: R02S3f4d1c01af2b0a046990e0235c481faf > 1..13 > # Start of replication tests > # Start of primary tests > ok 1 /replication/primary/read > ok 2 /replication/primary/write > ok 3 /replication/primary/start > ok 4 /replication/primary/stop > ok 5 /replication/primary/do_checkpoint > ok 6 /replication/primary/get_error_all > # End of primary tests > # Start of secondary tests > ok 7 /replication/secondary/read > ok 8 /replication/secondary/write > Unexpected error in bdrv_reopen_prepare() at ../block.c:4191: > Block format 'file' used by node '#block4287' does not support reopening > files Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- tests/test-replication.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test-replication.c b/tests/test-replication.c index e7cbd6b144..b067240add 100644 --- a/tests/test-replication.c +++ b/tests/test-replication.c @@ -392,6 +392,7 @@ static void test_secondary_write(void) teardown_secondary(); } +#ifndef _WIN32 static void test_secondary_start(void) { BlockBackend *top_blk, *local_blk; @@ -546,6 +547,7 @@ static void test_secondary_get_error_all(void) teardown_secondary(); } +#endif static void sigabrt_handler(int signo) { @@ -597,6 +599,7 @@ int main(int argc, char **argv) /* Secondary */ g_test_add_func("/replication/secondary/read", test_secondary_read); g_test_add_func("/replication/secondary/write", test_secondary_write); +#ifndef _WIN32 g_test_add_func("/replication/secondary/start", test_secondary_start); g_test_add_func("/replication/secondary/stop", test_secondary_stop); g_test_add_func("/replication/secondary/continuous_replication", @@ -605,6 +608,7 @@ int main(int argc, char **argv) test_secondary_do_checkpoint); g_test_add_func("/replication/secondary/get_error_all", test_secondary_get_error_all); +#endif ret = g_test_run(); From patchwork Thu Sep 10 10:30:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305729 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC439C43461 for ; Thu, 10 Sep 2020 10:39:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3E00220BED for ; Thu, 10 Sep 2020 10:39:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XQbT9PDI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E00220BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGJzG-0004k6-9p for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 06:39:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGJsR-000839-7W; Thu, 10 Sep 2020 06:32:27 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:34887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGJsP-0003Am-IP; Thu, 10 Sep 2020 06:32:26 -0400 Received: by mail-pj1-x1035.google.com with SMTP id jw11so2836287pjb.0; Thu, 10 Sep 2020 03:32: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=C/1izafIbfTFDVThqlQpYnHLHf4305LjfMqLD1ztqLA=; b=XQbT9PDIsZdXCIjn4VwNBJDp3sdWWcSOe4Qu41+t+QDQ2AWITGCifdsNqeWyYNgFpg LYXzZci8L8He4GksN4rl6+kmaQ+8rvdSb8UgbyEzHsNHcNUMVuRw1bBYN8KGO/CDW9IY xii39YcfNrO9yxWk13z8e1v9ynYqENf6iKPili0QcY2Y8S7PCzRlPTVC+bMn2tLDZu2W 0CGQt+CqAgtRGPEN03jNpZrb6fq2FrUOMI0HZVzezRiQXXCL1/9r7KjW5dMQnB5PXEcr 0dkbhs57GRyBi1u8ZJI1/Qai3j0OpSSO38L+Q5GxtfdnEK5O9LsMsUN9B5IYyet0YqnO 5yrw== 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=C/1izafIbfTFDVThqlQpYnHLHf4305LjfMqLD1ztqLA=; b=ckoqirfe5t+wIFPcgdJd0ptSUWTfTIP0pvBdNQZOqMZ34UnGgPGpPwbdBT+8hTz23q rU/e8OIfa9CBvXwjFb0sktLrqstE6Df8syi6eAZj1wloYWSdXt51JkGspk1nbMpUAlp1 3AJTQ+5cKpEK2eJroCceyI4odc90Im35I7ABfiLeN2v144QJSdJCSjBfKZ6FeCatwnxr 6Wh5XKnXqyii14DaCBhaXQOuayogNGN7YyLrBSz91P4eHFZEUM8EEkmk/8PZVvOG63P1 4nH76iE0mmXbHpvlawZNNL5gYfwMH5Alwvfk+bjB5+ZaZUGzXgmDKrAEHPNxPCJc2kfn kKpg== X-Gm-Message-State: AOAM530d4TEf5ySP3mB47WJuUsreXNhBczjHGYOQbak0pnVqIKT3B3K7 m9k4ysbr7JNqeMrxRRcborRFbwOn9e5kNs3xHRM= X-Google-Smtp-Source: ABdhPJwqhV5GAqm6azQvdPIn0eqaWVI8wB2UmyhgdtpsXrYLcxIL/KHf6fGLPRykmJIIScr2qKYODQ== X-Received: by 2002:a17:90b:b8f:: with SMTP id bd15mr4839342pjb.65.1599733943308; Thu, 10 Sep 2020 03:32:23 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id g21sm2000203pfh.30.2020.09.10.03.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 03:32:22 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v7 11/25] osdep: file locking functions are not available on Win32 Date: Thu, 10 Sep 2020 18:30:45 +0800 Message-Id: <20200910103059.987-12-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200910103059.987-1-luoyonggang@gmail.com> References: <20200910103059.987-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1035.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: Kevin Wolf , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); bool qemu_has_ofd_lock(void); Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- include/qemu/osdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 412962d91a..e80fddd1e8 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -502,11 +502,11 @@ int qemu_close(int fd); int qemu_unlink(const char *name); #ifndef _WIN32 int qemu_dup(int fd); -#endif int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); bool qemu_has_ofd_lock(void); +#endif #if defined(__HAIKU__) && defined(__i386__) #define FMT_pid "%ld" From patchwork Thu Sep 10 10:30:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305728 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE311C43461 for ; Thu, 10 Sep 2020 10:40:27 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 85DD620BED for ; Thu, 10 Sep 2020 10:40:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f2rmHPho" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 85DD620BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGK0A-0006iP-En for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 06:40:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGJso-0000Zn-W3; Thu, 10 Sep 2020 06:32:51 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:39101) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGJsn-0003Dx-8B; Thu, 10 Sep 2020 06:32:50 -0400 Received: by mail-pf1-x434.google.com with SMTP id n14so4381851pff.6; Thu, 10 Sep 2020 03:32:48 -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=FMAHDxTONXsMLLCC/F2W4g5NRWoYLphvGLs4LjcpQd8=; b=f2rmHPhoxJaC5ujeeW5wQZjvXcrzJKzH9nH86dw+YKnSkO7Exo06FQ88QqHrHFaF9y bD7+wgj9c8uoI097yD3ZK2iyOS1iNlV1xn343LLbzDld7o5i/gB67TcFpk51cs+rxZ8C 2HfJ6I1+Sa73y8iDrXu7JPUN8thBPAfoEJAHN4vdJIEQzxXLG2tbBpFZnsA8MzpVlt/p OXrDKDj9pWN5yqytI2aUvU978gTAMoVy25px5QMIOlaYAJIiHNqh4oBlfiYQc+/LjLu7 sa7KqxQ7iu1kz0K7N3FvFjT4aK0Ki6lrPx6GUMg6wXQPlA6cgLx1fmO9CfQD9RLqhYqe cs+A== 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=FMAHDxTONXsMLLCC/F2W4g5NRWoYLphvGLs4LjcpQd8=; b=YFXHKDeE3EBQWOyQGRS1NUxL/uPpzGzr0vQVJNDyoMwAb6ieLp9qb24ebRvq4Z1Aaj aY+jfkSIrLD0Cx6nVEG+y/aKNeOcAUalKd0DQ153pzaTYILSUoevnknAMubyOYOAdLQv mg9wL83wACenITnGdQoVpQPL4LMJ7YKQqf4+fUwjpxbprWi/0Wq89AXhHTlw8B1pOjVr W+W0deNVTd4CinmWmX2KnhAccDwQ0OZOeQPDGlTarpRiVwny+2XZphoaBiF1GXT2Rg7A Xymwyd+L8R7b+0HOAguHLxd3xg3UngQrO0AHhNR0yowpR7mo4WxxHAzoiPagtT86kBQi kNHg== X-Gm-Message-State: AOAM532CTJB3fDzcN1KVWaROqCUWzedUHD5oyuPZbtnGq4nxMk91N0iF IsYJd+B0L2h9fPwvP7EWH5BnqTYVWfBhtM3EFTQ= X-Google-Smtp-Source: ABdhPJz/SCTSdZWFXkt78xd0tpANoCwP9N4/aWaMXAM6+H0D6moygB0T2xd5qocxvy1N4NqNtdGIPQ== X-Received: by 2002:a63:475d:: with SMTP id w29mr3787268pgk.287.1599733967167; Thu, 10 Sep 2020 03:32:47 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id g21sm2000203pfh.30.2020.09.10.03.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 03:32:46 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v7 15/25] meson: remove empty else and duplicated gio deps Date: Thu, 10 Sep 2020 18:30:49 +0800 Message-Id: <20200910103059.987-16-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200910103059.987-1-luoyonggang@gmail.com> References: <20200910103059.987-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x434.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: Kevin Wolf , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , Wen Congyang , Paolo Bonzini , Richard Henderson , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- meson.build | 6 ------ 1 file changed, 6 deletions(-) diff --git a/meson.build b/meson.build index 5421eca66a..0b1741557d 100644 --- a/meson.build +++ b/meson.build @@ -317,7 +317,6 @@ opengl = not_found if 'CONFIG_OPENGL' in config_host opengl = declare_dependency(compile_args: config_host['OPENGL_CFLAGS'].split(), link_args: config_host['OPENGL_LIBS'].split()) -else endif gtk = not_found if 'CONFIG_GTK' in config_host @@ -344,11 +343,6 @@ if 'CONFIG_ICONV' in config_host iconv = declare_dependency(compile_args: config_host['ICONV_CFLAGS'].split(), link_args: config_host['ICONV_LIBS'].split()) endif -gio = not_found -if 'CONFIG_GIO' in config_host - gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(), - link_args: config_host['GIO_LIBS'].split()) -endif vnc = not_found png = not_found jpeg = not_found From patchwork Thu Sep 10 10:30:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?572X5YuH5YiaKFlvbmdnYW5nIEx1byk=?= X-Patchwork-Id: 305730 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_INVALID, DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1792DC43461 for ; Thu, 10 Sep 2020 10:38:57 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B0CF520BED for ; Thu, 10 Sep 2020 10:38:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WBIi3akh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0CF520BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGJyh-00034g-Pr for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 06:38:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGJsx-0000r4-Mo; Thu, 10 Sep 2020 06:33:01 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:38749) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGJsu-0003FM-MN; Thu, 10 Sep 2020 06:32:59 -0400 Received: by mail-pl1-x641.google.com with SMTP id c3so702584plz.5; Thu, 10 Sep 2020 03:32:55 -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=d4V5+f7th16w4eXVSrbBNtRXwx9t+794yZg73jLRtbY=; b=WBIi3akhold3nnkwriOk8R8ZZv7EoXy+jLRoDuFgjEnpOQROSaEsTJFLbeNqYKrSXR KaENTz6L5fMdZZdR2WbxJ0+VBvuHLpUuWqPmgfKSy8BQP7nu7m0ArJNN+zX+pFMXQpzt Eym0JMXgcOpGLFr8CPpof8nl5a77oCh6xUgNk7EWaLLDubVaQN0ysfGXKJGLW25SzEpG 3L5uEBANq+mRVTn6AWkabybue8WCH0fCmhx7LBYviA5XS3QJCYvDim/HTEsIpekAZ/tv QG+5YaH9FA0ySfDpciF0l7OoSGDnYadjOYYHOfVUZJfez4rdJFPsad2KP+T8MJx/ykRU +SBw== 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=d4V5+f7th16w4eXVSrbBNtRXwx9t+794yZg73jLRtbY=; b=glQTFXsLQesDyNGu8xnCx9jyQ8ALIJJoxWlIL+dpI60kTgiRISB0EqHB1c7PvPsoG1 DIu7x/x9eTzdTlRfbjudI7S3ZHwNO29AZF6xB9csWpBF1nQlTEPLiRD1jECiLhet3bdN z/MTRg4G4yXWMpMNK2uWP1Aj1OJYomuzEE4eBhqVMM7XG2VMW8i1u7fYczQApT5GnaGG Q+7n1WscHv4vztcsppFYDIHXsQxorqOrOgug6QhSW/UT76+uP1En1jUhTxkJqK/kVGU+ tFJi5mWcCn4SUBkdvOi5lVESV1eDqYcim6QGJqFvfUI7g6vmtv+fnelwIA+9XN9NHQHy RD5Q== X-Gm-Message-State: AOAM530k6wzTgpBecr/Ogc5IHx53xkjZV0UiKozLArkfS96rtAvFLTvO JBd0rkvRc3AnXwiu3fl7jGSdb5N8+x5299vG7wo= X-Google-Smtp-Source: ABdhPJykQI3wCt8tiD4L6nfxaL5wigKHjpAonOrdnBqzblGKbxe281ggWSTM8t1GZvLdoS3uxTxFng== X-Received: by 2002:a17:90a:ea0c:: with SMTP id w12mr4646656pjy.65.1599733974580; Thu, 10 Sep 2020 03:32:54 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id g21sm2000203pfh.30.2020.09.10.03.32.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 03:32:53 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v7 16/25] vmstate: Fixes test-vmstate.c on msys2/mingw Date: Thu, 10 Sep 2020 18:30:50 +0800 Message-Id: <20200910103059.987-17-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200910103059.987-1-luoyonggang@gmail.com> References: <20200910103059.987-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::641; envelope-from=luoyonggang@gmail.com; helo=mail-pl1-x641.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: Kevin Wolf , Thomas Huth , Ed Maste , Michael Roth , qemu-block@nongnu.org, Stefan Weil , Xie Changlong , Peter Lieven , Markus Armbruster , Max Reitz , Yonggang Luo , Gerd Hoffmann , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Wen Congyang , Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Li-Wen Hsu Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The vmstate are valid on win32, just need generate tmp path properly Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrangé --- tests/test-vmstate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index f8de709a0b..fc38e93d29 100644 --- a/tests/test-vmstate.c +++ b/tests/test-vmstate.c @@ -34,7 +34,6 @@ #include "qemu/module.h" #include "io/channel-file.h" -static char temp_file[] = "/tmp/vmst.test.XXXXXX"; static int temp_fd; @@ -1487,6 +1486,8 @@ static void test_tmp_struct(void) int main(int argc, char **argv) { + g_autofree char *temp_file = g_strdup_printf( + "%s/vmst.test.XXXXXX", g_get_tmp_dir()); temp_fd = mkstemp(temp_file); module_call_init(MODULE_INIT_QOM);