From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Haible Newsgroups: gmane.emacs.devel Subject: Re: Compiling in mingw-ucrt runtime Date: Sun, 25 Feb 2024 16:32:59 +0100 Message-ID: <30790436.gRfpFWEtPU@nimes> References: <6153309.usfYGdeWWP@nimes> <86r0h0wp78.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19389"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arthur.miller@live.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Feb 25 16:34:10 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1reGW1-0004nx-QV for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Feb 2024 16:34:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reGV3-0004yC-1n; Sun, 25 Feb 2024 10:33:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reGV0-0004xh-JE for emacs-devel@gnu.org; Sun, 25 Feb 2024 10:33:06 -0500 Original-Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.51]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1reGUy-0002jl-AE; Sun, 25 Feb 2024 10:33:06 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1708875179; cv=none; d=strato.com; s=strato-dkim-0002; b=RRP7oA5tPufmCp7cfZUMMaHvpBSNfWntUyMU2qs9CYT5fhzG0QG8ygf2XDWxM966gb h3UbrY9f6JWLWcjZYIgKE9P8qxHEHyI/xu9Dx2vTv9Fwrn12a402i+nquLneRwp2sfaT I3NEEu/ZDhnKFx/bl/NXG+bq7SzrwAFRnpjqQ231wTSE4nMHEtdkTrUwMs9tKP/G3aHn kSULrqAzi5UUmwW0EAGHZuGRZ55ftf2Tup6XJiKPj93owSVQ5DhfQiwRTsFNUrqrwTvC cKLBuojUMMfmn/59ajWHIIZOG9qsqCD3RY2N6GEs2+Y9T7HtMCIyw87DRIS0FXsEP4/5 OYjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1708875179; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=zHYkb60kAIRLnW9ZxhwTE/6QzN2b8npFGJ+c9LaTwFc=; b=hTnXCP9vYBsWJBGVl+ZZpqlZZ6db8kjbiVENvzNywwlHda34U4LdUZEnSdwzZWbHN/ 3UeE/jrVReJJMACre2/N4FvFrAmZpWkSVZ2OuMvtyVV4j5KNvHTz1huMfBv9LNsI+Rsu TiwqEtydi/l6D4oWcZSMr0YTGN/EwVaqXeP3qW/jEuWWggfr2ogVlQLzyXZPIeo7f8c6 B8ZR5MFcXdK0eAgExyo/EDi9qFVnwOiPVQohuM4vQiOY69QjGBvnuY4wSIwdAUkAuw05 IK7YgFny0mwh5Cfzfuf/Vr0YrDFQcKLV2fcby8tmduNdSwsmAoVugDw0BbKTujj9SK2O O2nA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1708875179; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=zHYkb60kAIRLnW9ZxhwTE/6QzN2b8npFGJ+c9LaTwFc=; b=OxjuMt7XsK9ejExnK/QFY/5AhqmMYwwvLyYfnNeBTec0qIl4gSgWdqaUtlHHDWA+tx aYvL/tmiMKKqtU8fYu5uUHaFbRDivagCyoRKTcaPeC/YoOVVr9cheIrGUUV2nrVc3q2m 4vM3yYibOoaWp44JZkp1scQqU1enCMp/ZJqXtyj5fKsU4DFur6hhCTQJ3tJFo2p4AEZh dDW3WJh5aTebdZyjZmCB7AebdahA7ehukodyvXk4KWDpCffCdxbYb6YLXy8jrmgG2Maw jTZcBdRP9mr6sZ0LnU8GvEU223Iw4bHBqxMqtw2CHy+iOJ0oi2RkGSR3+osynsPLykyX xHMg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1708875179; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=zHYkb60kAIRLnW9ZxhwTE/6QzN2b8npFGJ+c9LaTwFc=; b=BIMFiEbBxTUqy/ETkaqg9ZdX6cyTMQgxfuo1d+Udza3tuPhDSuc7hO9dSHshxw66VD DSZIv9YIeI3uz0czVZCA== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpPE3aEdTtOQ7mkryQPj+YQwSjuxiQ==" Original-Received: from nimes.localnet by smtp.strato.de (RZmta 50.0.4 AUTH) with ESMTPSA id m33cbe01PFWx4EO (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 25 Feb 2024 16:32:59 +0100 (CET) In-Reply-To: <86r0h0wp78.fsf@gnu.org> Received-SPF: none client-ip=85.215.255.51; envelope-from=bruno@clisp.org; helo=mo4-p01-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316526 Archived-At: On Sonntag, 25. Februar 2024 16:14:51 CET Eli Zaretskii wrote: > > From: Bruno Haible > > Cc: arthur.miller@live.com, emacs-devel@gnu.org > > Date: Sun, 25 Feb 2024 16:05:54 +0100 > > > > > Strange that they claim that, because their sources tell a different > > > story, both for MSVCRT and for UCRT. Or maybe your interpretation of > > > what they say there is inaccurate? > > > > Re MSVCRT: My reading of Vc7/crt/src/fclose.c is that it never sets errno. > > fclose.c doesn't, indeed, but it calls _close (in close.c), which > does. OK, so when it calls _close() and that fails, errno gets set. Good. Still, fclose() can also fail due to !inuse(stream), in which case errno does not get set. > > Re UCRT: My reading of ucrt-10.0.10240.0/stdio/fclose.cpp > > and 10.0.14393.0/ucrt/stdio/fclose.cpp > > is that errno gets set to EINVAL if the stream argument is invalid, > > and remains unchanged otherwise. > > I do see errno being set in close.cpp, which fclose.cpp calls to do > the actual job. Likewise here: Still, fclose() can also fail due to !stream.is_in_use(), in which case errno does not get set. Bruno