Paul Eggert <egg...@cs.ucla.edu> 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

Reply via email to