From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Compiling in mingw-ucrt runtime Date: Wed, 03 Apr 2024 15:09:48 +0200 Message-ID: References: <6153309.usfYGdeWWP@nimes> <86r0h0wp78.fsf@gnu.org> <30790436.gRfpFWEtPU@nimes> <86plwkwmzn.fsf@gnu.org> <86a5mbafvj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12701"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: bruno@clisp.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 03 16:04:23 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 1rs1Dy-00035K-Hh for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Apr 2024 16:04:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rs1D5-00036W-1A; Wed, 03 Apr 2024 10:03:27 -0400 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 1rs0NJ-00086q-LI for emacs-devel@gnu.org; Wed, 03 Apr 2024 09:09:57 -0400 Original-Received: from mail-ve1eur01olkn2060.outbound.protection.outlook.com ([40.92.66.60] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rs0NF-0002Za-Re; Wed, 03 Apr 2024 09:09:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JYl9xN7II1eDOSDbOSnFKCin+a0jyRNFoRD7Z/84BRxS9fQYWB/xpj7kv5du1rXz7DQlAoJOGnWiJaDYelXLZeqCPENcREFYmlmAPn9D2fU1e1764d5iRZwjXnYTpjADPv2Z6NGIisHeH3aOEvgmof+cXQF4dnYE04XCOZ+/f54x9nnVyLztfq8ggfHI4ERNIj2qNKbaiaPlYVYQulBHfutV0fLhV+k5ZX+eghFhsvXDoWtwtd2+nf3mZ7cL2rGaCIS6mxyFRb4+1gHcAn7w7/UhILzhST/PuAw6yk5tLMRtBGklanaXRsnizrKTd3GbbkX+4oAw/f/XVGgpeLDroQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=it2nHnFmrZs6CXS3KIM9iuOxM8cCtN+ZvAVKqCpEcMQ=; b=aDqlb3wmomoFIllkm8phX4bxSUesLeUWxQVJusrFuosQc0y3Hg2S/qlmckMZepIHVvVFGdnirzifUR2os8/gsXmWLBIgtW1TZIrVqlNuxGkjR1IL3PI/UJji6T/T+AKH7cXEole7VngIk6ua7CW2yPvIr+F9UuEAxnwekm4T9T2kCxsYPSr0pLH+R9IStTFXkU5H8src/M7E8BQU4BJlQHWTu9/kOHZ5snfcO7BVjeajr1ZBwVKfE2rcnrQSESPHfFXGeAkrag42qX8X+WWk9YC8zw3WZWm+m+wgzPkIah+OPkNWoo+iV40bQndKUKGhauAuTdrY+XHP8vLSYtVmsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=it2nHnFmrZs6CXS3KIM9iuOxM8cCtN+ZvAVKqCpEcMQ=; b=Ge0OTtGaMk90PCj6hawUxfacNG7epcwESPhCzAEo/+8U+wUdo0Izz10SzJa/5HOUx/PVWVgIuHcK/Q38nnCO7PXPb8ZmtuGzC16NH687AJ6FNyVX51Mxof28nVvWXoZhS9Ht82KRtMgSCV30ODCvahFu4Z3lV9KoSnocBmuIwxVdgRL47nhPVR24ADuQ51C2N+KDLmHBo7LNI9dt9tiEbpzs5/7UzFglVx6WOGXVRCoOkvhaadYP73eDfutsjnuN7nfR8HERYNd0GtoY2AYFvj5pbspWTZiXEk0pZ6ALBDkk86mJUgnLk2KwO1beHPBpLGP727PPZqIgJOzQe8haKA== Original-Received: from DU2PR02MB10109.eurprd02.prod.outlook.com (2603:10a6:10:497::14) by PAVPR02MB9380.eurprd02.prod.outlook.com (2603:10a6:102:307::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Wed, 3 Apr 2024 13:09:50 +0000 Original-Received: from DU2PR02MB10109.eurprd02.prod.outlook.com ([fe80::9549:47fe:660e:4d02]) by DU2PR02MB10109.eurprd02.prod.outlook.com ([fe80::9549:47fe:660e:4d02%4]) with mapi id 15.20.7409.042; Wed, 3 Apr 2024 13:09:50 +0000 In-Reply-To: <86a5mbafvj.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 02 Apr 2024 12:28:55 -0400") X-TMN: [7iomPO5ibkB8NkupbmwgAohudBF6x1dvZfb5Xu6ETf8=] X-ClientProxiedBy: MM0P280CA0089.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::32) To DU2PR02MB10109.eurprd02.prod.outlook.com (2603:10a6:10:497::14) X-Microsoft-Original-Message-ID: <87zfuak2xv.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR02MB10109:EE_|PAVPR02MB9380:EE_ X-MS-Office365-Filtering-Correlation-Id: 3709422d-bb85-475a-ae65-08dc53df57ad X-MS-Exchange-SLBlob-MailProps: quCBMN2EvO+/Tg02NQSOAgN02DEiXvAI3rih4LE1l6EFYTgMbWgkzQuPU20RLyS96jV1Mg75wUTdQQVHN9sBwVpevZ38yiuVpRrYqnQDjgwjpBq8shuoh2aRrrtAw6KbXVWpa2h0JlIevSTR6/1HhF8U/H/6Z45Fe1tWQXUdvgjEqfyqpnSmVMGNTu7lURa2VVnGhJSrPwf4ONn9F2zz0BXsPOhwr2H91KNN64+s7NG/wg7S7Oz+njRzqKv4pDYJveAjMUwtjzUKwro0xRNWpBbI7AImW2GHap2Qb0D89uk1qAIIXq9VyI73EyCLfEs/ni8BjYkT8oX4jSQ5ERAJUKI7ejhPtYPkmDoCDoJdiWnwrySQLpJms9XXn4bAj0542x9DzWHui8c2pEfuOgrC0rTI3p1xiN2KxZXtcuLAG3s5UP6W/ICiYEUDnm6BE2tcwXdFvr9cFfR/JsLkNtmGdpZMrk8fg36J7JKlY3OPa8NouF44+5do6gS3TtPqr6/9FCnPhzd7yh/vN3bPqYU13/7GBjxZ26FVAKT7jnxPrjc24BeQMDchKot9vW5apyq5wfsJJTPMJzvmvb4rETJjPXO7CYnnI9yVu9fxmlN6DQ6gOkTS0HBrM4DHTOYZvTeGTekejT7rFGtyGiZ7w31sfPlA0yNQQdgA6/J4DIwgwxzy5FVVGTvjlxAuDUEAZaRuedK8dHT8DeBwdvFNqAmEfA== X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DY+Zg2BPDYf2MRj+dPPnmHCtkeotsyx1LiI70shYejbRhB7DL1721eLmqkeZWVg9JZ48yyRH1WKYgOHGUXIxzW3phAUmaqjl5zfZY8mhLirqD/11Q2HHTnGepdKkF5gsysG7wn/qOuej6Kb/F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NCO?= =?us-ascii?Q?8dZpbBz1I/BSuzAPGzVemmXV7EnSSngnGNXixmm5/o8ImkPTPLgxxgZkhcIH?= =?us-ascii?Q?QLONukJcN9ki8TwIYC9gRL2h1lbqHZcnSXYV/I2IP6Jl8TLcF+kpz95C3p1J?= =?us-ascii?Q?kk2TVUh/oHXiEvjMRN2uD45dTlnaXpT6/7V5EoAcBfy4HdMotBsWVRD7AKf1?= =?us-ascii?Q?QN X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-ab7de.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 3709422d-bb85-475a-ae65-08dc53df57ad X-MS-Exchange-CrossTenant-AuthSource: DU2PR02MB10109.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2024 13:09:50.1124 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR02MB9380 Received-SPF: pass client-ip=40.92.66.60; envelope-from=arthur.miller@live.com; helo=EUR01-VE1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 03 Apr 2024 10:03:25 -0400 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:317487 Archived-At: Eli Zaretskii writes: >> From: Arthur Miller >> Cc: Bruno Haible , emacs-devel@gnu.org >> Date: Tue, 02 Apr 2024 17:30:25 +0200 >> >> Eli Zaretskii writes: >> >> >> From: Bruno Haible >> >> Cc: arthur.miller@live.com, emacs-devel@gnu.org >> >> Date: Sun, 25 Feb 2024 16:32:59 +0100 >> >> >> >> 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. >> > >> > Yes, I agree that it doesn't set errno in all the cases where it >> > fails. But that's a far cry from saying that errno is always >> > undefined after it fails. >> > >> > And the question still stands why does it fail in Emacs in such a way. >> >> Just a short question: did you got anywhere further with this? > > You are asking me or Bruno? > > I've been waiting for Bruno to come back and tell more about what > happens with UCRT in this case. Anyone and no one in particular, just curious if you or someone else have found what could be the problem. >> Where did you look at the source? Are they installed with their (MS) command >> line tools or do I have to install the entire VS/Windows devkti for the sources? > > If you are asking about UCRT sources, they are freely available on the Yes. I got an impression you were looking at some Windows sources, because of the path in this sentence of yours: > My reading of Vc7/crt/src/fclose.c is that it never sets errno. > Internet, just search for them and you will find them promptly. > (AFAIU, you also get them if you install some version of Studio or > other, but I didn't install it.) I took a look now. The only one I found freely on GH is someone's private repository, "huangqinjin", with some commits, by them, so I don't want to download that one. I don't see any official ucrt repository amongst the 6.2k on MS Github. Perhaps it is there, but tucked under some other project. On SX they say, ucrt sources are distributed with SDKs, so I guess I'll download Windows SDK anyway. I wanted to spare myself of VS and their SDKs, it is gigabytes of downloads I don't need otherwise.