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:05:54 +0100 Message-ID: <6153309.usfYGdeWWP@nimes> References: <5638518.yaVYbkx8dN@nimes> <86ttlwwrbd.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="3462"; 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:06:41 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 1reG5R-0000gJ-IE for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Feb 2024 16:06:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reG4q-0004vF-NZ; Sun, 25 Feb 2024 10:06:04 -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 1reG4o-0004v3-RY for emacs-devel@gnu.org; Sun, 25 Feb 2024 10:06:02 -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 1reG4m-0004MS-R0; Sun, 25 Feb 2024 10:06:02 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1708873555; cv=none; d=strato.com; s=strato-dkim-0002; b=WdLOKNcHeO4bMiXcZVvHZsmo+t2PPhhiKNVWJK7X5SKBPSr+JSzMm/6Vts+n1Ql2/r 74x1we5CBnVWFD7R00Kqa75UvQOnnGkVrD7g6iIFnM6biqb4if9VtFvfirxJ4taeNKFX QP2eAAZJ386WV4sLPQb+WM9W1BYjNpD6Jru1fJNQ5cOXcQBZPbbTX1ZZrwfdefuDwzEA SdlLil4zH6EF7u4KsfD6pEBXH/dqQA6CBJurZOdrVW+LDHTNZayNGTznDtmyAySuabIj WTk4Jvf5Ics/1FOJhFVbh3CUlX+Dk3OzgpqhE90t0qcMkI7uCX4MEbKojNcumbP0aFfl m/Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1708873555; 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=ssS8Sx80ftY3AUp7Zb1gXUcvVriB1rbV/sfVro79rq8=; b=Ka4ehlKD2zxJn73/OaQjuL6+0YjnyNlgHrEjAPIvu2DpD1CAD2ymPVWQ16s32No3O3 OAP1w4NcqPxy0x5jkegq+AiPlKUSbGzJ41YobBmCechWdxJLQMWRyIuoO46o2B3jzjGS aY/q/SF5PAQTmugK5suNTEsV4qWnJMrKD/0eo67CfeUYoBf9hZgxR2VjVHsqIWPa4loM XrdZvgQh8Sz0LsksHFhfXvtb/TQKUujDSCGQYf6/Qz1H5d/utnIeIgyBKRDICWKu7Wpy TcoelEwj1Fje8chGZYKZYGLzbN69wKY2CXZlWssbUvznY3DzH1SVz1UUo5k24yPOkBAu 8/iA== 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=1708873555; 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=ssS8Sx80ftY3AUp7Zb1gXUcvVriB1rbV/sfVro79rq8=; b=mnMmqirAAXIpR7bKLxXGzMZY1d6KXzr5ifxXN5c8Ryc1YmfPeKrVXbohjziebDIkQK DUxb879CJi9F/qqw4NR/TE6Jb32b/461rrMZXC+/Ab/zNqcwm/WxapMum1HPEGJO+Wb5 3B7kmwLpflkFucXrBDWHHwLEBq1VctMq4USVN+ffTtKoUQxM4ZaW3D/J5qwM14Y2x8Qv xB4v9gSsmf9XFnVM/eou2/ikTFpvhM+Otzo3wxgHb0pQc1vyVZ21gQIG5WNSwaOhdK9S LvBS1FAL7Zyrrt90HOcY6f4HRElt2u95YGlOIFqVpX8OBowHVzfWJ36CHflejOACEbPv ZyLw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1708873555; 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=ssS8Sx80ftY3AUp7Zb1gXUcvVriB1rbV/sfVro79rq8=; b=nXkyXTOI3d8dcvViaCD3J5bCrqxEQWVHmkwYjsLEWuF9iboBG5dJq7en+emQH2FCpP wZghsa781ZhH6SzdJ9Aw== 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 m33cbe01PF5s4Bw (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 25 Feb 2024 16:05:54 +0100 (CET) In-Reply-To: <86ttlwwrbd.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:316523 Archived-At: Eli Zaretskii wrote: > > On native Windows, the value of errno, after fclose() fails, is undefined. > > See here in the Gnulib documentation: > > https://www.gnu.org/software/gnulib/manual/html_node/fclose.html > > > > and here in the Microsoft documentation: > > https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/fclose-fcloseall > > (it sets errno only if the argument was a NULL pointer). > > 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. 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. This is consistent with the two documentation pages that I cited. Bruno