From: Pip Cet <pipcet@protonmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, rms@gnu.org
Subject: Re: MPS: Win64 testers?
Date: Sun, 28 Jul 2024 20:22:40 +0000 [thread overview]
Message-ID: <jmzBbdddszRva70zIzpbxdcFl8Eo5OELdJLOuwyD80z5gBwsCJ98RkOJd9cWX-Inv371HDkz-_3GHx5V9RO6_-e-s-4zE5-c-REl1STHhyQ=@protonmail.com> (raw)
In-Reply-To: <86ttg9zgpb.fsf@gnu.org>
On Sunday, July 28th, 2024 at 15:20, Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Sun, 28 Jul 2024 15:00:52 +0000
>
> > From: Pip Cet pipcet@protonmail.com
> > Cc: emacs-devel@gnu.org, "rms@gnu.org" rms@gnu.org
> >
> > > 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.
>
> If someone steps through that code in the UCRT build and reports that
> fdopen returns a different FILE pointer, I will believe you.
I've verified this by running a GitHub action (I won't provide a link because it's probably impossible to use without running proprietary GitHub JavaScript), though I couldn't work out how to make clang link against msvcrt rather than its own libraries.
The result of
printf("%p\n", stdin);
fclose(stdin);
int fd = _open ("nul", _O_RDWR);
printf("%d = 0\n", fd);
FILE *f = _fdopen (fd, "r");
printf("%p = %p\n", stdin, f);
return 0;
is, for a MINGW32-built msvcrt binary on windows-latest:
761f7600
0 = 0
761f7600 = 761f7600
but, for a UCRT64-built ucrt binary on windows-latest:
00007FF8E7E9E4A0
0 = 0
00007FF8E7E9E4A0 = 000001F74AFF5660
> > > 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 for such questionable code. IIUC, Wine discourages attempts of programs to detect whether they're running on Wine or Microsoft Windows.
>
>
> We don't have to behave like Wine intends us to behave. We have our
> own considerations. So I don't really care whether Wine endorses
> detection of Wine, if we decide we need that.
Let's see whether the Wine people want to provide bug-for-bug compatibility in this case first?
> > > > 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?):
> > > >
> > > > SetHandleInformation (GetStdHandle (STD_INPUT_HANDLE), HANDLE_FLAG_INHERIT, 0);
> > >
> > > 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...
>
> I use this resource to overcome the deficiencies of the official docs:
>
> http://winapi.freetechsecrets.com/win32/
Thanks for the link!
> > > Not sure if that is justified just to support Wine
> >
> > And UCRT, if and when the time comes.
>
> If that's the same problem, which we are not yet sure.
Of course.
> And, as I
> said, support for UCRT will only become official if someone volunteers
> to come on board and handle that build.
That's what I meant by "if and when the time comes".
> > And any other implementation of the Windows API that doesn't provide bug-for-bug compatibility with MSVCRT.
>
> For now, only the MSVCRT support is official.
Of course, and I think it's more likely it will cease being official than other builds becoming official.
> > Wine is the only significant free implementation of the Windows API, so I disagree 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.
>
> Such decisions can only be relevant if there are resources to allocate
> and redirect.
I think the community of Emacs developers decides by consensus (or bickering) what to work on. My understanding was that we're considering whether to stop working on at least some variants of the Windows port.
> Since we don't have them, this is entirely academic.
Well, I disagree. Official guidance by the GNU Emacs project does have some influence on what volunteers will work on. I consider that a resource.
> For now, the only person who actively works on the Windows port is
> myself, and I'm unable to support UCRT, for more than one reason.
Are you working on MINGW64 systems at all, or is it mingw exclusively?
Pip
next prev parent reply other threads:[~2024-07-28 20:22 UTC|newest]
Thread overview: 124+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 15:45 MPS: Win64 testers? Pip Cet
2024-07-25 7:16 ` Eli Zaretskii
2024-07-25 15:39 ` Pip Cet
2024-07-27 8:02 ` Eli Zaretskii
2024-07-27 10:42 ` Pip Cet
2024-07-27 12:14 ` Eli Zaretskii
2024-07-27 15:49 ` Pip Cet
2024-07-27 16:10 ` Eli Zaretskii
2024-07-27 16:56 ` Eli Zaretskii
2024-07-27 18:27 ` Pip Cet
2024-07-27 18:50 ` Eli Zaretskii
2024-07-27 20:22 ` Pip Cet
2024-07-28 5:25 ` Eli Zaretskii
2024-07-28 13:00 ` Pip Cet
2024-07-28 14:20 ` Eli Zaretskii
2024-07-28 15:00 ` Pip Cet
2024-07-28 15:20 ` Eli Zaretskii
2024-07-28 20:22 ` Pip Cet [this message]
2024-07-29 11:25 ` Eli Zaretskii
2024-07-31 6:18 ` Pip Cet
2024-07-31 14:02 ` Eli Zaretskii
2024-07-31 19:04 ` Sebastián Monía
2024-08-01 5:00 ` Eli Zaretskii
2024-08-03 7:50 ` pipcet
2024-08-03 9:23 ` Eli Zaretskii
2024-08-03 15:17 ` pipcet
2024-08-03 16:07 ` Eli Zaretskii
2024-07-30 2:51 ` MPS: Lose64 testers? Richard Stallman
2024-07-27 16:09 ` MPS: Win64 testers? Michael Albinus
2024-07-28 13:22 ` Pip Cet
2024-07-28 17:32 ` Emba (was: MPS: Win64 testers?) Michael Albinus
-- strict thread matches above, loose matches on Subject: below --
2024-07-25 9:45 MPS: Win64 testers? Angelo Graziosi
2024-07-25 10:02 ` Stefan Kangas
2024-07-25 11:35 ` Eli Zaretskii
2024-07-27 14:22 ` Angelo Graziosi
2024-08-06 3:04 Quang Kien Nguyen
2024-08-06 7:03 ` Quang Kien Nguyen
2024-08-06 11:40 ` Eli Zaretskii
2024-08-06 17:39 ` Quang Kien Nguyen
2024-08-06 18:32 ` Eli Zaretskii
2024-08-06 20:52 ` Quang Kien Nguyen
2024-08-07 11:41 ` Eli Zaretskii
2024-08-07 18:32 ` Quang Kien Nguyen
2024-08-08 5:46 ` Eli Zaretskii
2024-08-08 23:44 ` Quang Kien Nguyen
2024-08-09 6:00 ` Eli Zaretskii
2024-08-09 6:10 ` Eli Zaretskii
2024-08-09 9:19 ` Quang Kien Nguyen
2024-08-09 11:03 ` Eli Zaretskii
2024-08-13 12:12 ` Quang Kien Nguyen
2024-08-13 12:37 ` Eli Zaretskii
2024-08-13 15:51 ` Pip Cet
2024-08-13 18:26 ` Quang Kien Nguyen
2024-08-13 19:19 ` Eli Zaretskii
2024-08-13 20:22 ` Quang Kien Nguyen
2024-08-14 13:11 ` Sebastián Monía
2024-08-14 17:24 ` Quang Kien Nguyen
2024-08-16 20:09 ` Sebastián Monía
2024-08-17 11:37 ` Sebastián Monía
2024-08-17 12:54 ` Eli Zaretskii
2024-08-17 13:24 ` Sebastián Monía
2024-08-19 14:34 ` Sebastián Monía
2024-08-19 14:55 ` Eli Zaretskii
2024-08-19 15:12 ` Pip Cet
2024-08-19 15:23 ` Sebastián Monía
2024-08-19 15:31 ` Quang Kien Nguyen
2024-08-19 16:23 ` Quang Kien Nguyen
2024-08-21 18:14 ` Sebastián Monía
2024-08-21 18:20 ` Pip Cet
2024-08-21 19:46 ` Sebastián Monía
2024-08-21 18:22 ` Ihor Radchenko
2024-08-21 19:48 ` Sebastián Monía
2024-08-22 17:34 ` Sebastián Monía
2024-08-22 17:51 ` Pip Cet
2024-08-22 18:34 ` Eli Zaretskii
2024-08-22 19:12 ` Quang Kien Nguyen
2024-08-23 5:32 ` Eli Zaretskii
2024-08-22 19:14 ` Pip Cet
2024-08-23 5:38 ` Eli Zaretskii
2024-08-23 7:59 ` Pip Cet
2024-08-23 13:08 ` Eli Zaretskii
2024-08-23 13:42 ` Quang Kien Nguyen
2024-08-23 13:48 ` Pip Cet
2024-08-23 14:35 ` Eli Zaretskii
2024-08-23 14:54 ` Quang Kien Nguyen
2024-08-23 16:08 ` Eli Zaretskii
2024-08-23 18:23 ` Sebastián Monía
2024-08-23 13:44 ` Pip Cet
2024-08-23 14:32 ` Eli Zaretskii
2024-08-23 15:51 ` Pip Cet
2024-08-23 16:17 ` Eli Zaretskii
2024-08-23 18:57 ` Pip Cet
2024-08-23 19:28 ` Eli Zaretskii
2024-08-24 17:31 ` Pip Cet
2024-08-25 3:17 ` Quang Kien Nguyen
2024-08-30 19:59 ` Sebastián Monía
2024-09-01 8:21 ` Kien Nguyen
2024-09-01 8:43 ` Eli Zaretskii
2024-09-01 9:36 ` Kien Nguyen
2024-09-01 10:28 ` Eli Zaretskii
2024-09-01 11:59 ` Eli Zaretskii
2024-09-01 18:54 ` Kien Nguyen
2024-09-01 19:27 ` Eli Zaretskii
2024-09-01 19:44 ` Pip Cet
2024-09-01 21:42 ` Kien Nguyen
2024-09-02 11:08 ` Eli Zaretskii
2024-09-03 4:12 ` Kien Nguyen
2024-09-03 10:37 ` Pip Cet
2024-09-03 16:50 ` Kien Nguyen
2024-09-03 17:48 ` Pip Cet
2024-09-07 8:19 ` Eli Zaretskii
2024-09-20 15:09 ` Sebastián Monía
2024-09-20 15:44 ` Eli Zaretskii
2024-09-23 16:21 ` Kien Nguyen
2024-09-01 10:49 ` Pip Cet
2024-09-01 12:15 ` Kien Nguyen
2024-08-22 18:11 ` Eli Zaretskii
2024-08-22 19:17 ` Sebastián Monía
2024-08-23 5:45 ` Eli Zaretskii
2024-08-07 19:50 ` Pip Cet
2024-08-07 23:14 ` Quang Kien Nguyen
2024-08-08 5:15 ` Eli Zaretskii
2024-08-06 14:18 ` Pip Cet
2024-08-07 11:03 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jmzBbdddszRva70zIzpbxdcFl8Eo5OELdJLOuwyD80z5gBwsCJ98RkOJd9cWX-Inv371HDkz-_3GHx5V9RO6_-e-s-4zE5-c-REl1STHhyQ=@protonmail.com' \
--to=pipcet@protonmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).