From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Windows 9X without KernelEx Date: Sat, 15 Jun 2024 22:18:23 +0800 Message-ID: <875xua5lxs.fsf@yahoo.com> References: <875xub8sn8.fsf.ref@yahoo.com> <875xub8sn8.fsf@yahoo.com> <8634pfy289.fsf@gnu.org> <87sexe7sgm.fsf@yahoo.com> <87o7827r1t.fsf@yahoo.com> <86ed8ywuoz.fsf@gnu.org> <87frte7jry.fsf@yahoo.com> <86a5jmwt2r.fsf@gnu.org> <874j9u7dla.fsf@yahoo.com> <86h6dutirt.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="34656"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: stefankangas@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 15 16:19:07 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 1sIUFF-0008pP-NE for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Jun 2024 16:19:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sIUEp-0006ZD-C0; Sat, 15 Jun 2024 10:18:39 -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 1sIUEo-0006Z2-GR for emacs-devel@gnu.org; Sat, 15 Jun 2024 10:18:38 -0400 Original-Received: from sonic304-21.consmr.mail.ne1.yahoo.com ([66.163.191.147]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sIUEm-00071Z-RT for emacs-devel@gnu.org; Sat, 15 Jun 2024 10:18:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1718461114; bh=HadXDMs0XX2q5aMDG1k6aMwGYaQmV7UbkuLXyX6Y9og=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=k3P18Jy7Zwd0Q7KyOqWtGdwRLkkXV6GpMOpJw4PDJKI5v/zDd+UrTktPUIz7L3fzdmtkJLn8gWiGvGV+I4TfA93egHER8cABo8sr73UkGr/dDGEjMTW90NoTVkly0WQT96YPS0fzN9Wd8H0L4yGcGLAme4KR8X7Dyls61WMez99qRHVyWlpvVbYDK5lIC53inyTklk/9jpFOVnoMQkj+qv4yAd0QY5ljStk1pmdawjY6UckG++MQ4zJ/dP7k9DCaQxKT2hx0BMqCAiVNOeBv3srJAWsYMd7iF7y1L+WVc6dCfsEo1GuGNSHxsef71BsqMsJtPh4lYWxtXcO7E4ZWkg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1718461114; bh=4LIrPn5/u2nLoVtuTlDuSKrPIEXKJAGTp8iLvhZOH5a=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=YpL9jQ8gY5N3WJITEHOsxNEb3d7rBoIFoi0xhAVjeTqi6ycpdn/waQXSi48pNH/9Y+2Zzz4B/oJjE46lEWMOuDSGIy+8Q0G33BS545VbSO7/O3TeHeeX48z1fTRofzvVp+XycCugC8A4gIpF+0CJnWC9SZqawTZQh9V3K7IzomNW9dCKEwIvuujmtMYM0v+ZVZKwfpv1IkaN8yEdUZBzpvQiyIufEUjcofLrFEIgYS9sLFU0dgA2CIKkvkwxGyjdbH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.yahoo.com with HTTP; Sat, 15 Jun 2024 14:18:34 +0000 Original-Received: by hermes--production-sg3-7b469d9f6-f72th (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 631e0f2f23a733b2f5ab2f54b8765c5d; Sat, 15 Jun 2024 14:18:30 +0000 (UTC) In-Reply-To: <86h6dutirt.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 15 Jun 2024 16:52:54 +0300") X-Mailer: WebService/1.1.22407 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.191.147; envelope-from=luangruo@yahoo.com; helo=sonic304-21.consmr.mail.ne1.yahoo.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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:320146 Archived-At: Eli Zaretskii writes: >> From: Po Lu >> Cc: stefankangas@gmail.com, emacs-devel@gnu.org >> Date: Sat, 15 Jun 2024 17:35:45 +0800 >> >> Eli Zaretskii writes: >> >> > If you add usp10.dll (and unicows.dll) to Windows 98, does Emacs start >> > then? Or do any of the other missing APIs prevent it from starting? >> >> I cannot test with USP10.DLL at the moment, but that aside, as I said, >> all of the following prevent Emacs from starting on Windows 98: >> >> Shell_NotifyIconW >> ShellExecuteExW >> SHFileOperationW >> ReadDirectoryChangesW > > This is strange. Most of those are present in Emacs for a long time, Perhaps everyone else had installed KernelEx? > and I was somehow under the impression that Emacs did start on Windows > 9X after their introduction. Did you start Emacs with UNICOWS.DLL > available? I did, indeed. But -lunicows is absent from the linker command line, so emacs.exe is required to load the library, and its exports into function pointers, at runtime, and I don't understand how symbol conflicts between it and OS exports on NT systems are resolved. > My references indicate that UNICOWS.DLL has the first 3 of the above 4 > APIs. So I'd suggest to do for these 3 what we do for > MultiByteToWideChar, see w32.c:maybe_load_unicows_dll, and then see if > the problem is solved. If that doesn't solve the problem, > i.e. doesn't allow Emacs to start, we can discuss what to do about > each of these 3 APIs. The issue is that these functions don't appear to be defined elsewhere than UNICOWS.DLL, even as stubs, with the result that they must be loaded at runtime, from SHELL32/USER32.DLL, or the runtime link editor (what is the proper nomenclature for this component on Windows?) will fail to locate symbols imported by emacs.exe. Which is all taken care of in the patch I posted. > ReadDirectoryChangesW is indeed absent from UNICOWS.DLL, so I think > globals_of_w32notify should attempt to load it, and if not available, This is taken care of in the patch, though in a new function, which could be consolidated into globals_of_w32notify if it is run during startup in dumped Emacs binaries. > disable the file notifications by modifying the code we already have > in w32notify-add-watch: > > /* The underlying features are available only since XP. */ > if (os_subtype == OS_SUBTYPE_9X > || (w32_major_version == 5 && w32_minor_version < 1)) > { > errno = ENOSYS; > report_file_notify_error ("Watching filesystem events is not supported", > Qnil); > } What's to be modified here? `os_subtype == OS_SUBTYPE_9X' should address all the 9X systems, right? Finally, how say you to the change to w32_init_file_name_codepage? It is required to run binaries on 9X that are dumped on NT, and in its absence, w32_unicode_filenames and is_windows_9x both return FALSE during the early stages of initialization.