From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: MPS: Win64 testers? Date: Sun, 28 Jul 2024 15:00:52 +0000 Message-ID: References: <86le1m24tx.fsf@gnu.org> <86jzh622p4.fsf@gnu.org> <86h6ca1xfz.fsf@gnu.org> <867cd61412.fsf@gnu.org> <86y15lzjg6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40715"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, "rms@gnu.org" To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 28 17:21: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 1sY5i7-000AQz-5J for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Jul 2024 17:21:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sY5hN-0006ad-1o; Sun, 28 Jul 2024 11:20:37 -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 1sY5Oo-0005mH-E2 for emacs-devel@gnu.org; Sun, 28 Jul 2024 11:01:26 -0400 Original-Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sY5Om-0000Ca-1w; Sun, 28 Jul 2024 11:01:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1722178880; x=1722438080; bh=gE8F0B9CMc75fGnTCHIyZug2QJogPlQDYxSS3I/b+Uo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=u10yx8LkFMCLQgHgWC+4aUJ3L9AJG6ZcAUXDQv2qQNr/VL1JnYaGAbHLLgOOhOmi5 BfQZxqNClbVw+WDT0CkvMrCjeURr7EBFLyxlKuH/rPnB2U2c1AmuIYt3aY6ZuTZfkd RSBtzTYqgZ0wDN4HORDZ2lobO9+feLNell0H5F5tKi1xBNrAwse4fLRl2i8uByexcx CaJn7Yzm6ePfOF3y6wNQs+UTPB9S02UiTLYO8jA6amXsj4PaZrnrywasVjfOxe/kDA 18U0/Du/SCrtvV1LkHePpBV/1QJQK/M1JCkVt3LXVA9F7OL+GwFax1/7U0y3wR4ccK Wc3x9chtajOtQ== In-Reply-To: <86y15lzjg6.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 716b6d83e87dca288ecc572b9c919d22b5d7cafe Received-SPF: pass client-ip=185.70.43.22; envelope-from=pipcet@protonmail.com; helo=mail-4322.protonmail.ch X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 28 Jul 2024 11:20:31 -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:322170 Archived-At: On Sunday, July 28th, 2024 at 14:20, Eli Zaretskii wrote: > > Date: Sun, 28 Jul 2024 13:00:20 +0000 >=20 > > From: Pip Cet pipcet@protonmail.com > > Cc: emacs-devel@gnu.org > >=20 > > On Sunday, July 28th, 2024 at 05:25, Eli Zaretskii eliz@gnu.org wrote: > >=20 > > > > Date: Sat, 27 Jul 2024 20:22:34 +0000 > > > > From: Pip Cet pipcet@protonmail.com > > > > Cc: emacs-devel@gnu.org > > > > It's been that way since 2004, if the git history is to be believed= . > > >=20 > > > I guess they have some unsolved issues with the standard streams, > > > which is why they don't dare reusing their slots. Which means closing > > > these standard streams is a no-no on Wine. > >=20 > > I don't know. I suspect they just never thought (20 years ago!) that an= yone would want to close a standard stream. Any idea what UCRT does? >=20 > It seems to be doing the same as MSVCRT, at least if the UCRT sources > available out there are to be believed. By my reading of the source code I found, it's doing the same as Wine, not = as MSVCRT. > > > But if this is what Wine does, then what do you get from the various > > > fprintf debugging code in Emacs? For example, if you build with the > > > "--enable-checking=3D'yes,glyphs'" option, you get the trace-redispla= y > > > command which outputs debugging information about redisplay to stderr= , > > > and also the dump-glyph-matrix command which prints the glyph matrix > > > to stderr. Do these print-outs still work although stderr was closed > > > in init_ntproc? > >=20 > > I tried with GDB, and fprintf(stderr, ...) stops working in init_ntproc= . >=20 > So they do fclose the stream, just don't provide a way of reopening a > standard stream. Not in the way we want, no, unless I missed it. > Is there any way for a program running on Wine to detect that this is > what happens? like some special version number or something? If so, > I'd just avoid all that code in init_ntproc on Wine, since leaving the > standard streams inheritable is a much smaller trouble than losing the > standard streams. I don't think we should have Wine-specific workarounds, particularly not fo= r such questionable code. IIUC, Wine discourages attempts of programs to de= tect whether they're running on Wine or Microsoft Windows. =20 > > As for the code in question, if I understand it correctly, the current = Windows idiom would be simply (I assume _open_osfhandle clears the flag?): > >=20 > > SetHandleInformation (GetStdHandle (STD_INPUT_HANDLE), HANDLE_FLAG_INHE= RIT, 0); >=20 > I'm not sure you can do this without closing the stream, since the > program has already started by that time. And SetHandleInformation is > only available since Windows 2K, so we'd need to call it through a > function pointer. Thanks. Microsoft doesn't appear to provide version information pre-Windows= -2000... > Not sure if that is justified just to support Wine And UCRT, if and when the time comes. And any other implementation of the W= indows API that doesn't provide bug-for-bug compatibility with MSVCRT. Wine is the only significant free implementation of the Windows API, so I d= isagree with the "just". If I understand RMS correctly, whether there is a = free implementation of an OS is an important factor in deciding to redirect= resources to supporting it in GNU software. > (which probably has quite a few other incompatibilities). I'm aware of the windres problem, but I suspect there are a few others. How= ever, we can't discover them unless we fix the build first, and I am succes= sfully running both mingw/msys/i386 builds and mingw64/msys2/x86_64 builds = locally. > > The version information for availability of "SetHandleInformation" and = "DuplicateHandle" is the same, so any idea why we're not just doing that, o= r is it just lost in history? >=20 > See above: we still strive to support Windows 9X and NT. You're right, thanks. Do we have people testing such systems? Pip