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.comp.lib.gnulib.bugs,gmane.emacs.devel Subject: Re: boot-time: straighten code Date: Sun, 13 Aug 2023 11:26:08 +0800 Message-ID: <87v8djoc6n.fsf@yahoo.com> References: <4536176.VaOIPsP7d9@nimes> <5a77c0b9-8692-83bf-1aca-2f1d27122877@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2883"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Bruno Haible , bug-gnulib@gnu.org, Emacs Development To: Paul Eggert Original-X-From: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Sun Aug 13 05:26:37 2023 Return-path: Envelope-to: gnu-bug-gnulib@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 1qV1kT-0000Wr-4x for gnu-bug-gnulib@m.gmane-mx.org; Sun, 13 Aug 2023 05:26:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qV1kG-00055g-U9; Sat, 12 Aug 2023 23:26:24 -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 1qV1kF-00055Q-PL for bug-gnulib@gnu.org; Sat, 12 Aug 2023 23:26:23 -0400 Original-Received: from sonic306-22.consmr.mail.ne1.yahoo.com ([66.163.189.84]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qV1kD-0003KF-MO for bug-gnulib@gnu.org; Sat, 12 Aug 2023 23:26:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691897179; bh=DVi8NQ+GKjKRTqfbzan482JJPqZISrDQUVu6VOrI96M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=iR0n5OP4ZoTrVJ3JpT71KGKDEW4jR37SMSynlyqI/Dlubta29CYHh6J2ymyYtHAwRmDw/0bk8mX9xlx92HQ4kwRWkYFdnh6cJX31BJ3GQNXslmWuubU2N4TMEdcLEeb4QVI6ARY4PrTjpKgRgyoFdZWHtBnAAEa/tJtk2zC+dXvdODO6OW55DHFnge3JaqHKs7ZdkV7xdeSag5gxIPXSccePkvYmvI4De4xQ6j4Ui8IRciMqx393MMr2iAFzStxeFySelY7/1w5xYK7dZymuhV3NyFtAbL02ebSIw6aGx8yfn9NXAxPnvqo4lKDx1iHneWxL4so6ymIKvqB/i1SCag== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1691897179; bh=WjG1bUDseUpoloooo2N1Zz8/hyR15Tmc59Lct5A2MNf=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=dUZFiZYqh+SzCue05oOH+xyfEqNudoE1tS678k/fWrqXhN/OmP7bcqHWnWW8cWI7L4qNOJ5eClqhXGgg0IFENVIfpiJGh6CBUuKvMJ6ei89dzhUq4bUiTvwtCWVc2qDua2hlUtLBs8OUDqILY8kO3ZWIYTvjMx67T55KX88+jt2MHETCcWm4JbXs/i25riqJ/cflM7Zu5CgNu1QmCESfbz4BV7JEcucIHJJu3kDbdXVdb9X7sPl3aQ/zoFryF6gPAComYHGkHKgSiD0au890NkkbiZO2iC/sh5UE9OL8RiunzhQ0unWH16afXIIcLuHqmCDIfcV5oZA6KjfNiNS3DQ== X-YMail-OSG: HnDlDEgVM1n8R9t6lsK_l0g5Qglb2VmOjrC3Ztxheetail9GYUzOwYGUpXM.lMS bi6WvOOu3VE0Kb4QVGUiXs7DbiwB2O5h69jb.AxCw0FYLVbVPpchMfyDyzCMWqq6BZKUsMTQb6HE .mDTC2pE4Z_VyuMMMeqtylY1GxJe779EFvWm73f1HCglEWxQhGqCNetrayljEoQnFDfU5eNjrIvC L5.BlvHyEIMbXYhQ40Yx.x0k6ZRO7rAUPfU6bLmZJ1d72shzCKSNducWOVTknGqQxBQlhmNAMK03 gKt5bEBHXSk4SwhZs.IIqpb_51J4fOcD6E5Tq1.3t0wv7_dwm_SLvg6ctamkq7RfZZ_GmiEUnhcW LSvSSCe0QHYeGTvHlT5xYfy9X.K8vPYwugu0.4_EKCZ2vhmzw6cyLA.cJTDGuaaGzC8vZ_bJQBLp uz66skOJCnoA3QY4SUUOa.t2DrtMS8XaMHvmJo_85cAMo.Qs97R2lh2VQA5EbDRBfECDsrqyP4hn Xn_k6DBSj_Ov2NnU7gkkq4fJvyOlCnyDkaCFK8Bgj5b27xO_l9oahxrV3lro1xTbaT3ssLxbkrGs TqvqhIsFZ0dQYG0ZgqVhtX1BpTyINg.acG25r5dHpGvq0GiOLuD4sS01b8xoodpLGq7kPa1lx_XG PuIq6tF5A2bR7ogpyKn.dcHxrCMfdFuxo0s2mBGpuBFoTxrtQzz.qmrUp9yLbzs2voJYqwJri9mf JcUI601miqKbcio97dqAbhcNWi1.UR4l6eLy6iqzYKWMpcb6.vN6mvrIb5CgnMgswM4P6qco.0uo 8fpsgxlEKSi4.114jlXOo7UBEjARt1F.QC0sCsU4N9 X-Sonic-MF: X-Sonic-ID: e19af475-29d1-4669-9008-262d52841e49 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Sun, 13 Aug 2023 03:26:19 +0000 Original-Received: by hermes--production-sg3-69654d8bd-sbrjf (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d66e148dc2e97179d2651bf35fc20115; Sun, 13 Aug 2023 03:26:13 +0000 (UTC) In-Reply-To: <5a77c0b9-8692-83bf-1aca-2f1d27122877@cs.ucla.edu> (Paul Eggert's message of "Sat, 12 Aug 2023 19:49:04 -0700") X-Mailer: WebService/1.1.21695 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.189.84; envelope-from=luangruo@yahoo.com; helo=sonic306-22.consmr.mail.ne1.yahoo.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_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Original-Sender: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.comp.lib.gnulib.bugs:48170 gmane.emacs.devel:308640 Archived-At: Paul Eggert writes: > On 2023-08-11 14:49, Bruno Haible wrote: >> Paul: With this simplification, you may consider using the 'boot-time' module >> in Emacs. I bet that it produces a better result than Emacs' src/filelock.c >> on many platforms. (I haven't tested it, but I could test it if you give me >> a manual testing recipe.) > > Thanks for doing all that. I installed the attached patch into Emacs > master, which you should be able to test via: > > git clone https://git.savannah.gnu.org/git/emacs.git > cd emacs > ./autogen.sh > ./configure > make > src/emacs > > Please give it a try, especially on any MS-Windows platform you happen > to have. I have tested only on Ubuntu 23.04 so far. > > A simple way to test is to use Emacs to start editing a file (without > saving) and then inspect the symbolic link .#* that Emacs uses as a > lock file. The trailing digits of that link's contents should be the > boot time. These symlinks are Emacs's only use of boot time. During the automated build of the Android port, the following errors were encountered with the Android NDK r10b and __ANDROID_API__ set to 8 (which is the oldest configuration Emacs supports.) Bruno, would you please investigate this? In file included from boot-time.c:54:0: boot-time-aux.h: In function 'get_linux_uptime': boot-time-aux.h:70:3: error: implicit declaration of function 'sysinfo' [-Werror=implicit-function-declaration] if (sysinfo (&info) >= 0) ^ boot-time.c: In function 'get_boot_time_uncached': boot-time.c:111:26: error: 'BOOT_TIME' undeclared (first use in this function) if (ut->ut_type == BOOT_TIME) ^ boot-time.c:111:26: note: each undeclared identifier is reported only once for each function it appears in boot-time.c:126:3: error: implicit declaration of function 'endutent' [-Werror=implicit-function-declaration] END_UTMP_ENT (); ^ cc1: some warnings being treated as errors