diff options
| author | Eli Zaretskii | 2023-08-10 11:44:49 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2023-08-10 11:44:49 +0300 |
| commit | f2e3d2f1256da2a551cfe3fa685e582eb6d09d60 (patch) | |
| tree | 4edef90494c957c2ebb93fcfe4734b32fc9ceca3 | |
| parent | 49248878d4da7dbf901a7cd555e129803ac5e095 (diff) | |
| download | emacs-f2e3d2f1256da2a551cfe3fa685e582eb6d09d60.tar.gz emacs-f2e3d2f1256da2a551cfe3fa685e582eb6d09d60.zip | |
Streamline definition of BOOT_TIME_FILE on MS-Windows
* nt/inc/ms-w32.h: Don't define BOOT_TIME_FILE here...
* configure.ac: ...define it here instead, as for the other
systems.
| -rw-r--r-- | configure.ac | 11 | ||||
| -rw-r--r-- | nt/inc/ms-w32.h | 12 |
2 files changed, 11 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 0bc0de1bfac..0236dbd89d8 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -2643,6 +2643,17 @@ AC_CACHE_CHECK([for old but post-boot file], | |||
| 2643 | do | 2643 | do |
| 2644 | test -f $file && { emacs_cv_boot_time_file=$file; break; } | 2644 | test -f $file && { emacs_cv_boot_time_file=$file; break; } |
| 2645 | done])], | 2645 | done])], |
| 2646 | # This isn't perfect, as some systems might have the page file in | ||
| 2647 | # another place. Also, I suspect that the time stamp of that | ||
| 2648 | # file might also change when Windows enlarges the file due to | ||
| 2649 | # insufficient VM. Still, this seems to be the most reliable | ||
| 2650 | # way; the alternative (of using GetSystemTimes) won't work on | ||
| 2651 | # laptops that hibernate, because the system clock is stopped | ||
| 2652 | # then. Other possibility would be to run "net statistics | ||
| 2653 | # workstation" and parse the output, but that's gross. So this | ||
| 2654 | # should do; if the file is not there, the boot time will be | ||
| 2655 | # returned as zero, and filelock.c already handles that. | ||
| 2656 | [mingw32], [emacs_cv_boot_time_file=C:/pagefile.sys], | ||
| 2646 | [*], [emacs_cv_boot_time_file=not-needed])]) | 2657 | [*], [emacs_cv_boot_time_file=not-needed])]) |
| 2647 | 2658 | ||
| 2648 | AS_CASE([$emacs_cv_boot_time_file], | 2659 | AS_CASE([$emacs_cv_boot_time_file], |
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index 58be1199345..fce15fcbd8c 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h | |||
| @@ -111,18 +111,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 111 | # endif | 111 | # endif |
| 112 | #endif | 112 | #endif |
| 113 | 113 | ||
| 114 | /* This isn't perfect, as some systems might have the page file in | ||
| 115 | another place. Also, I suspect that the time stamp of that file | ||
| 116 | might also change when Windows enlarges the file due to | ||
| 117 | insufficient VM. Still, this seems to be the most reliable way; | ||
| 118 | the alternative (of using GetSystemTimes) won't work on laptops | ||
| 119 | that hibernate, because the system clock is stopped then. Other | ||
| 120 | possibility would be to run "net statistics workstation" and parse | ||
| 121 | the output, but that's gross. So this should do; if the file is | ||
| 122 | not there, the boot time will be returned as zero, and filelock.c | ||
| 123 | already handles that. */ | ||
| 124 | #define BOOT_TIME_FILE "C:/pagefile.sys" | ||
| 125 | |||
| 126 | /* ============================================================ */ | 114 | /* ============================================================ */ |
| 127 | 115 | ||
| 128 | /* Here, add any special hacks needed to make Emacs work on this | 116 | /* Here, add any special hacks needed to make Emacs work on this |