]> Savannah Git Hosting - gnulib.git/commitdiff
readutmp, boot-time: Improve for some Cygwin installations.
authorBruno Haible <bruno@clisp.org>
Wed, 1 May 2024 22:52:26 +0000 (00:52 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 17 May 2024 22:56:17 +0000 (00:56 +0200)
Reported by Ken Brown <kbrown@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/.

ChangeLog
lib/boot-time-aux.h

index 3cb8913930435f104a6832749c6b1709d9b8a4c6..2d0e931d36f92b50461ca2f38725ed61d37e033a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-05-01  Bruno Haible  <bruno@clisp.org>
+
+       readutmp, boot-time: Improve for some Cygwin installations.
+       Reported by Ken Brown <kbrown@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/.
+
 2024-05-01  Bruno Haible  <bruno@clisp.org>
 
        stddef: A better workaround against GCC bug 114870.
index 8b966fe691fc76d39749479d476e33a11f525e15..a94cdb3f302ed3055c6a3cbe84533aa58cbd62e6 100644 (file)
@@ -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