Hi Bruno, On 5/1/2024 6:52 PM, Bruno Haible wrote:
I did not know about /proc/cygdrive; thanks for teaching us. I guess it can be assumed that /proc/cygdrive exists, because unlike in Linux, there are no Docker containers and unlike in FreeBSD, there are no jails?
I don't know anything about Docker containers or jails, but it's my understanding that /proc/cygdrive always exists.
I'm committing this patch: 2024-05-01 Bruno Haible <br...@clisp.org> readutmp, boot-time: Improve for some Cygwin installations. Reported by Ken Brown <kbr...@cornell.edu> in <https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00008.html>. * lib/boot-time-aux.h (get_windows_boot_time): Use /proc/cygdrive/ instead of /cygdrive/. diff --git a/lib/boot-time-aux.h b/lib/boot-time-aux.h index 8b966fe691..a94cdb3f30 100644 --- a/lib/boot-time-aux.h +++ b/lib/boot-time-aux.h @@ -306,7 +306,8 @@ get_windows_boot_time (struct timespec *p_boot_time) process, namely C:\pagefile.sys. */ const char * const boot_touched_file = #if defined __CYGWIN__ && !defined _WIN32 - "/cygdrive/c/pagefile.sys" + /* It is more portable to use /proc/cygdrive/c than /cygdrive/c. */ + "/proc/cygdrive/c/pagefile.sys" #else "C:\\pagefile.sys" #endif
Thanks. Ken