From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#41242: Port feature/native-comp to Windows Date: Wed, 20 May 2020 16:06:46 +0000 Message-ID: References: <83k11e4a0s.fsf@gnu.org> <83blmp4tob.fsf@gnu.org> <83o8qp1hfr.fsf@gnu.org> <837dxcv1po.fsf@gnu.org> <83imgvdf94.fsf@gnu.org> <83eerjde6k.fsf@gnu.org> <83a7227hkb.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="ciao.gmane.io:159.69.161.202"; logging-data="76192"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= , 41242@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 20 18:07:20 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1jbRFW-000Jfq-Ab for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 May 2020 18:07:18 +0200 Original-Received: from localhost ([::1]:57944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbRFV-00071u-9Q for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 May 2020 12:07:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbRFH-00070f-78 for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 12:07:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbRFG-0003nb-M0 for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 12:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jbRFG-0007V5-Ff for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 12:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 May 2020 16:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41242 X-GNU-PR-Package: emacs Original-Received: via spool by 41242-submit@debbugs.gnu.org id=B41242.158999081028813 (code B ref 41242); Wed, 20 May 2020 16:07:02 +0000 Original-Received: (at 41242) by debbugs.gnu.org; 20 May 2020 16:06:50 +0000 Original-Received: from localhost ([127.0.0.1]:54084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbRF4-0007Uf-Jb for submit@debbugs.gnu.org; Wed, 20 May 2020 12:06:50 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:57598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbRF2-0007UW-TI for 41242@debbugs.gnu.org; Wed, 20 May 2020 12:06:49 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 04KG6k79011042 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Wed, 20 May 2020 16:06:46 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 04KG6k9L028647; Wed, 20 May 2020 16:06:46 GMT In-Reply-To: <83a7227hkb.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 20 May 2020 18:27:16 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:180665 Archived-At: Eli Zaretskii writes: >> From: Nicolas B=C3=A9rtolo >> Date: Tue, 19 May 2020 16:25:53 -0300 >> Cc: Andrea Corallo , 41242@debbugs.gnu.org >>=20 >> * lisp/emacs-lisp/comp.el (comp-effective-async-max-jobs): Use >> NUMBER_OF_PROCESSORS environment variable if system is Windows NT, >> "nproc" if it is in PATH or a default of 1. > > This shouldn't be necessary: we already have a function to determine > the number of processors, see get_native_system_info in w32.c. If you > need the result exported to Lisp, we can define a new variable which > will be populated with the value. > >> Subject: [PATCH] Determine the emacs root dir only when necessary. >>=20 >> * src/fileio.c: Introduce function emacs_root_dir(). Refactor >> `expand-file-name` to use it. >> * src/lisp.h: Separate emacs_root_dir() into dos_emacs_root_dir() and >> w32_emacs_root_dir(). >> * src/msdos.c: Rename emacs_root_dir() to dos_emacs_root_dir(). >> * src/w32.c: Rename emacs_root_dir() to w32_emacs_root_dir(). > > Can you explain what problem this solves, and how? It is especially > important to understand when will be emacs_root_dir first called > during a session. That's because it calls filename_from_ansi, which > AFAIR needs some setup that happens at the beginning of a session. I'm not into what is happening on Windows and why is working differently than Posix, but I can add this as a context: While we are restarting from dump to reload the native compilation unit in dump_do_dump_relocation we are calling Ffile_exists_p (pdumper.c:5307) and this is calling Fexpand_file_name. We need to do that because we need the eln file to revive the compilation unit object. Perhaps another way would be to use something alternative to Ffile_exists_p? But I've a question: is this a problem of Fexpand_file_name not working correctly because something not initialized or a behavior we are trying to change? Andrea --=20 akrl@sdf.org