commit 43cc92d6e41804cf1034e1d6e3cdf35e299bd196 (HEAD, refs/remotes/origin/master) Author: Po Lu Date: Fri Aug 11 14:55:21 2023 +0800 Minor adjustments to Android port * java/org/gnu/emacs/EmacsService.java (readDirectoryEntry): Also refrain from returning NULL or file names containing non-representable NULL bytes. * src/callproc.c (get_current_directory): Clean up by employing android_is_special_directory. diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/EmacsService.java index 379b1d30eda..cee823abc83 100644 --- a/java/org/gnu/emacs/EmacsService.java +++ b/java/org/gnu/emacs/EmacsService.java @@ -1503,9 +1503,13 @@ In addition, arbitrary runtime exceptions (such as return entry; } - /* Skip this entry if its name cannot be represented. */ + /* Skip this entry if its name cannot be represented. NAME + can still be null here, since some Cursors are permitted to + return NULL if INDEX is not a string. */ - if (name.equals ("..") || name.equals (".") || name.contains ("/")) + if (name == null || name.equals ("..") + || name.equals (".") || name.contains ("/") + || name.contains ("\0")) continue; /* Now, look for its type. */ diff --git a/src/callproc.c b/src/callproc.c index 0645c2c3e18..dc37dfdc01f 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -170,10 +170,11 @@ get_current_directory (bool encode) /* If DIR is an asset directory or a content directory, return the home directory instead. */ - if (encode && (!strcmp (SSDATA (dir), "/assets") - || !strncmp (SSDATA (dir), "/assets/", 8) - || !strcmp (SSDATA (dir), "/content") - || !strncmp (SSDATA (dir), "/content/", 9))) + if (encode + && (android_is_special_directory (SSDATA (dir), + "/assets") + || android_is_special_directory (SSDATA (dir), + "/content"))) dir = build_string ("~"); #endif /* HAVE_ANDROID && ANDROID_STUBIFY */ commit cc6fed326aa491f89cad5cf59f4a8fb7b2863011 Author: Po Lu Date: Fri Aug 11 08:57:04 2023 +0800 Repair mailutils configury * configure.ac (with_mailutils): When processing defaults, set to yes-unless-android if with_features. (HAVE_MAILUTILS): Later, disable Mailutils if yes-on-android and with_android is set. This is the minimal Emacs build for the build machine. (bug#65190) diff --git a/configure.ac b/configure.ac index 0236dbd89d8..78c658f77a8 100644 --- a/configure.ac +++ b/configure.ac @@ -345,22 +345,13 @@ AC_DEFUN options are irrelevant; this is the default if GNU Mailutils is installed])], [], - [with_mailutils=$with_features - AS_IF([test "$with_mailutils" = yes], - [AS_IF([test "x$XCONFIGURE" != "xandroid" \ - && test "$with_android" = "no"], - [(movemail --version) >/dev/null 2>&1 || with_mailutils=no], - [dnl Don't check for movemail if cross-compiling. - dnl instead, default to false. - with_mailutils=no])])]) -AS_IF([test "$with_mailutils" = no], - [with_mailutils=]) - -AS_IF([test x"$with_mailutils" = xyes], - [AC_DEFINE([HAVE_MAILUTILS], [1], - [Define to 1 if Emacs was configured with mailutils])]) - -AC_SUBST([with_mailutils]) + [AS_IF([test "$with_features" != "no"], + [with_mailutils=yes-unless-android + AS_IF([test "x$XCONFIGURE" != "xandroid"], + [(movemail --version) >/dev/null 2>&1 || with_mailutils=no], + [dnl Don't check for movemail if cross-compiling. + dnl instead, default to false. + with_mailutils=no])])]) AC_ARG_WITH([pop], [AS_HELP_STRING([--with-pop], @@ -597,6 +588,25 @@ AC_DEFUN OPTION_DEFAULT_OFF([android],[cross-compile Android application package]) OPTION_DEFAULT_ON([android-debug],[don't build Emacs as a debug package on Android]) +# Find out of Android support is enabled and mailutils has defaulted +# to `yes-unless-android'. Disable it if so. + +AS_IF([test "x$with_mailutils" = "xyes-unless-android"], + [AS_IF([test "x$with_android" != "xno"], + [with_mailutils=no], + [with_mailutils=yes])]) + +# Clear with_mailutils if it's set to no. + +AS_IF([test "$with_mailutils" = no], + [with_mailutils=]) + +AS_IF([test x"$with_mailutils" = xyes], + [AC_DEFINE([HAVE_MAILUTILS], [1], + [Define to 1 if Emacs was configured with mailutils])]) + +AC_SUBST([with_mailutils]) + AC_ARG_WITH([shared-user-id], [AS_HELP_STRING([--with-shared-user-id=ID], [use the given shared user ID in Android builds])]) commit a71a96f6ef632419f0ac9f8ace0c4a58446ca22b Author: Jim Porter Date: Thu Aug 10 15:01:39 2023 -0700 ; * doc/misc/eshell.texi (Bugs and ideas): Remove already-fixed bugs. diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 7c7f304d55d..ca31cb2589d 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -2308,11 +2308,6 @@ Bugs and ideas and then the asynchronous @command{grep} process expects to examine the temporary file, which has since been deleted. -@item Problem with C-r repeating text - -If the text @emph{before point} reads "./run", and you type @kbd{C-r r u -n}, it will repeat the line for every character typed. - @item Backspace doesn't scroll back after continuing (in smart mode) Hitting space during a process invocation, such as @command{make}, will @@ -2365,8 +2360,6 @@ Bugs and ideas This would be so that if a Lisp function calls @code{print}, everything will happen as it should (albeit slowly). -@item When an extension module fails to load, @samp{cd /} gives a Lisp error - @item If a globbing pattern returns one match, should it be a list? @item Make sure syntax table is correct in Eshell mode @@ -2670,12 +2663,6 @@ Bugs and ideas @item Permit the umask to be selectively set on a @command{cp} target -@item Problem using @kbd{M-x eshell} after using @code{eshell-command} - -If the first thing that I do after entering Emacs is to run -@code{eshell-command} and invoke @command{ls}, and then use @kbd{M-x -eshell}, it doesn't display anything. - @item @kbd{M-@key{RET}} during a long command (using smart display) doesn't work Since it keeps the cursor up where the command was invoked. commit 60090abcbc5d21c759c39926d9f45a18fc1c9913 Author: Jim Porter Date: Mon Aug 7 22:28:24 2023 -0700 Return separators from 'eshell-split-commands' directly when requested This eliminates the need for using a dynamically-bound variable to hold the list of separators. * lisp/eshell/esh-cmd.el (eshell--sep-terms): Remove. (eshell-split-commands): New function, adapted from 'eshell-separate-commands'. (eshell-separate-commands): Make obsolete, and call 'eshell-split-commands'. (eshell-parse-command, eshell-parse-pipeline): Use 'eshell-split-commands'. * lisp/eshell/esh-arg.el (eshell-parse-delimiter): Update comment. diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index aa1e8f77ea5..26be1127880 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el @@ -541,7 +541,7 @@ eshell-parse-special-reference (defun eshell-parse-delimiter () "Parse an argument delimiter, which is essentially a command operator." ;; this `eshell-operator' keyword gets parsed out by - ;; `eshell-separate-commands'. Right now the only possibility for + ;; `eshell-split-commands'. Right now the only possibility for ;; error is an incorrect output redirection specifier. (when (looking-at "[&|;\n]\\s-*") (let ((end (match-end 0))) diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index bd00e9f5406..80066263396 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -364,8 +364,6 @@ eshell-complete-lisp-symbols ;; Command parsing -(defvar eshell--sep-terms) - (defmacro eshell-with-temp-command (region &rest body) "Narrow the buffer to REGION and execute the forms in BODY. @@ -404,31 +402,33 @@ eshell-parse-command region. TOPLEVEL, if non-nil, means that the outermost command (the user's input command) is being parsed, and that pre and post command hooks should be run before and after the command." - (let* (eshell--sep-terms - (terms - (append - (if (consp command) - (eshell-parse-arguments (car command) (cdr command)) - (eshell-with-temp-command command - (goto-char (point-max)) - (eshell-parse-arguments (point-min) (point-max)))) - args)) - (commands - (mapcar - (lambda (cmd) - (let ((sep (pop eshell--sep-terms))) - (setq cmd (eshell-parse-pipeline cmd)) - (when (equal sep "&") - (setq cmd `(eshell-do-subjob (cons :eshell-background ,cmd)))) - (unless eshell-in-pipeline-p - (setq cmd `(eshell-trap-errors ,cmd))) - ;; Copy I/O handles so each full statement can manipulate - ;; them if they like. Steal the handles for the last - ;; command in the list; we won't use the originals again - ;; anyway. - (setq cmd `(eshell-with-copied-handles ,cmd ,(not sep))) - cmd)) - (eshell-separate-commands terms "[&;]" nil 'eshell--sep-terms)))) + (pcase-let* + ((terms + (append + (if (consp command) + (eshell-parse-arguments (car command) (cdr command)) + (eshell-with-temp-command command + (goto-char (point-max)) + (eshell-parse-arguments (point-min) (point-max)))) + args)) + (`(,sub-chains . ,sep-terms) + (eshell-split-commands terms "[&;]" nil t)) + (commands + (mapcar + (lambda (cmd) + (let ((sep (pop sep-terms))) + (setq cmd (eshell-parse-pipeline cmd)) + (when (equal sep "&") + (setq cmd `(eshell-do-subjob (cons :eshell-background ,cmd)))) + (unless eshell-in-pipeline-p + (setq cmd `(eshell-trap-errors ,cmd))) + ;; Copy I/O handles so each full statement can manipulate + ;; them if they like. Steal the handles for the last + ;; command in the list; we won't use the originals again + ;; anyway. + (setq cmd `(eshell-with-copied-handles ,cmd ,(not sep))) + cmd)) + sub-chains))) (if toplevel `(eshell-commands (progn (run-hooks 'eshell-pre-command-hook) @@ -628,12 +628,12 @@ eshell--cmd (defun eshell-parse-pipeline (terms) "Parse a pipeline from TERMS, return the appropriate Lisp forms." - (let* (eshell--sep-terms - (bigpieces (eshell-separate-commands terms "\\(&&\\|||\\)" - nil 'eshell--sep-terms)) - results final) + (pcase-let* + ((`(,bigpieces . ,sep-terms) + (eshell-split-commands terms "\\(&&\\|||\\)" nil t)) + (results) (final)) (dolist (subterms bigpieces) - (let* ((pieces (eshell-separate-commands subterms "|")) + (let* ((pieces (eshell-split-commands subterms "|")) (p pieces)) (while p (let ((cmd (car p))) @@ -655,11 +655,11 @@ eshell-parse-pipeline ;; multi-line input (setq final (car results) results (cdr results) - eshell--sep-terms (nreverse eshell--sep-terms)) + sep-terms (nreverse sep-terms)) (while results - (cl-assert (car eshell--sep-terms)) + (cl-assert (car sep-terms)) (setq final (eshell-structure-basic-command - 'if (string= (pop eshell--sep-terms) "&&") "if" + 'if (string= (pop sep-terms) "&&") "if" `(eshell-protect ,(pop results)) `(eshell-protect ,final)))) final)) @@ -696,6 +696,34 @@ eshell-parse-lisp-argument (eshell-lisp-command (quote ,obj))) (ignore (goto-char here)))))) +(defun eshell-split-commands (terms separator &optional + reversed return-seps) + "Split TERMS using SEPARATOR. +If REVERSED is non-nil, the list of separated term groups will be +returned in reverse order. + +If RETURN-SEPS is nil, return just the separated terms as a list; +otherwise, return both the separated terms and their separators +as a pair of lists." + (let (sub-chains sub-terms sep-terms) + (dolist (term terms) + (if (and (eq (car-safe term) 'eshell-operator) + (string-match (concat "^" separator "$") + (nth 1 term))) + (progn + (push (nth 1 term) sep-terms) + (push (nreverse sub-terms) sub-chains) + (setq sub-terms nil)) + (push term sub-terms))) + (when sub-terms + (push (nreverse sub-terms) sub-chains)) + (unless reversed + (setq sub-chains (nreverse sub-chains) + sep-terms (nreverse sep-terms))) + (if return-seps + (cons sub-chains sep-terms) + sub-chains))) + (defun eshell-separate-commands (terms separator &optional reversed last-terms-sym) "Separate TERMS using SEPARATOR. @@ -703,30 +731,14 @@ eshell-separate-commands returned in reverse order. If LAST-TERMS-SYM is a symbol, its value will be set to a list of all the separator operators found (or (nil) if none)." - (let ((sub-terms (list t)) - (eshell-sep-terms (list t)) - subchains) - (while terms - (if (and (consp (car terms)) - (eq (caar terms) 'eshell-operator) - (string-match (concat "^" separator "$") - (nth 1 (car terms)))) - (progn - (nconc eshell-sep-terms (list (nth 1 (car terms)))) - (setq subchains (cons (cdr sub-terms) subchains) - sub-terms (list t))) - (nconc sub-terms (list (car terms)))) - (setq terms (cdr terms))) - (if (> (length sub-terms) 1) - (setq subchains (cons (cdr sub-terms) subchains))) - (if reversed - (progn - (if last-terms-sym - (set last-terms-sym (reverse (cdr eshell-sep-terms)))) - subchains) ; already reversed - (if last-terms-sym - (set last-terms-sym (cdr eshell-sep-terms))) - (nreverse subchains)))) + (declare (obsolete eshell-split-commands "30.1")) + (let ((split-terms (eshell-split-commands terms separator reversed + last-terms-sym))) + (if last-terms-sym + (progn + (set last-terms-sym (cdr split-terms)) + (car split-terms)) + split-terms))) ;;_* Command evaluation macros ;; commit 3659fc3ed8aa3b500fdb98fe22e8e86f6d34d754 Author: Jim Porter Date: Mon Aug 7 22:15:18 2023 -0700 Simplify command parsing in Eshell * lisp/eshell/esh-cmd.el (eshell-parse-command): Do all modifications to each command in a single pass. (eshell-parse-pipeline): Remove unncessary reversing of parsed results. diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 94aa2ed8906..bd00e9f5406 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -416,26 +416,19 @@ eshell-parse-command (commands (mapcar (lambda (cmd) - (setq cmd - (if (or (not (car eshell--sep-terms)) - (string= (car eshell--sep-terms) ";")) - (eshell-parse-pipeline cmd) - `(eshell-do-subjob - (cons :eshell-background - ,(eshell-parse-pipeline cmd))))) - (setq eshell--sep-terms (cdr eshell--sep-terms)) - (if eshell-in-pipeline-p - cmd - `(eshell-trap-errors ,cmd))) + (let ((sep (pop eshell--sep-terms))) + (setq cmd (eshell-parse-pipeline cmd)) + (when (equal sep "&") + (setq cmd `(eshell-do-subjob (cons :eshell-background ,cmd)))) + (unless eshell-in-pipeline-p + (setq cmd `(eshell-trap-errors ,cmd))) + ;; Copy I/O handles so each full statement can manipulate + ;; them if they like. Steal the handles for the last + ;; command in the list; we won't use the originals again + ;; anyway. + (setq cmd `(eshell-with-copied-handles ,cmd ,(not sep))) + cmd)) (eshell-separate-commands terms "[&;]" nil 'eshell--sep-terms)))) - (let ((cmd commands)) - (while cmd - ;; Copy I/O handles so each full statement can manipulate them - ;; if they like. Steal the handles for the last command in - ;; the list; we won't use the originals again anyway. - (setcar cmd `(eshell-with-copied-handles - ,(car cmd) ,(not (cdr cmd)))) - (setq cmd (cdr cmd)))) (if toplevel `(eshell-commands (progn (run-hooks 'eshell-pre-command-hook) @@ -638,46 +631,37 @@ eshell-parse-pipeline (let* (eshell--sep-terms (bigpieces (eshell-separate-commands terms "\\(&&\\|||\\)" nil 'eshell--sep-terms)) - (bp bigpieces) - (results (list t)) - final) - (while bp - (let ((subterms (car bp))) - (let* ((pieces (eshell-separate-commands subterms "|")) - (p pieces)) - (while p - (let ((cmd (car p))) - (run-hook-with-args 'eshell-pre-rewrite-command-hook cmd) - (setq cmd (run-hook-with-args-until-success - 'eshell-rewrite-command-hook cmd)) - (let ((eshell--cmd cmd)) - (run-hook-with-args 'eshell-post-rewrite-command-hook - 'eshell--cmd) - (setq cmd eshell--cmd)) - (setcar p (funcall eshell-post-rewrite-command-function cmd))) - (setq p (cdr p))) - (nconc results - (list - (if (<= (length pieces) 1) - (car pieces) - (cl-assert (not eshell-in-pipeline-p)) - `(eshell-execute-pipeline (quote ,pieces)))))) - (setq bp (cdr bp)))) + results final) + (dolist (subterms bigpieces) + (let* ((pieces (eshell-separate-commands subterms "|")) + (p pieces)) + (while p + (let ((cmd (car p))) + (run-hook-with-args 'eshell-pre-rewrite-command-hook cmd) + (setq cmd (run-hook-with-args-until-success + 'eshell-rewrite-command-hook cmd)) + (let ((eshell--cmd cmd)) + (run-hook-with-args 'eshell-post-rewrite-command-hook + 'eshell--cmd) + (setq cmd eshell--cmd)) + (setcar p (funcall eshell-post-rewrite-command-function cmd))) + (setq p (cdr p))) + (push (if (<= (length pieces) 1) + (car pieces) + (cl-assert (not eshell-in-pipeline-p)) + `(eshell-execute-pipeline (quote ,pieces))) + results))) ;; `results' might be empty; this happens in the case of ;; multi-line input - (setq results (cdr results) - results (nreverse results) - final (car results) - results (cdr results) - eshell--sep-terms (nreverse eshell--sep-terms)) + (setq final (car results) + results (cdr results) + eshell--sep-terms (nreverse eshell--sep-terms)) (while results (cl-assert (car eshell--sep-terms)) (setq final (eshell-structure-basic-command - 'if (string= (car eshell--sep-terms) "&&") "if" - `(eshell-protect ,(car results)) - `(eshell-protect ,final)) - results (cdr results) - eshell--sep-terms (cdr eshell--sep-terms))) + 'if (string= (pop eshell--sep-terms) "&&") "if" + `(eshell-protect ,(pop results)) + `(eshell-protect ,final)))) final)) (defun eshell-parse-subcommand-argument () commit 65f71ca9aaa1587284293e2e34a0e28ee6b42380 Author: Po Lu Date: Thu Aug 10 17:24:24 2023 +0800 Uniformly verify sfnt_read_table_directory doesn't return TTC header * src/sfntfont.c (sfnt_enum_font, sfntfont_read_cmap) (sfnt_open_tables): Check for -1 return value from sfnt_read_table_directory. diff --git a/src/sfntfont.c b/src/sfntfont.c index 22e7f0e3832..600eac811d5 100644 --- a/src/sfntfont.c +++ b/src/sfntfont.c @@ -1104,7 +1104,12 @@ sfnt_enum_font (const char *file) subtables = sfnt_read_table_directory (fd); - if (!subtables) + if (!subtables + /* This value means that FD was pointing at a TTC + header. Since FD should already have been moved to + the beginning of the TrueType header above, it + follows that the font format is invalid. */ + || (subtables == (struct sfnt_offset_subtable *) -1)) continue; sfnt_enum_font_1 (fd, file, subtables, @@ -1356,7 +1361,7 @@ sfntfont_read_cmap (struct sfnt_font_desc *desc, already have been moved to the start of the table directory if so. */ - if (!font || font == (struct sfnt_offset_subtable *) -1) + if (!font || (font == (struct sfnt_offset_subtable *) -1)) { emacs_close (fd); return; @@ -2736,7 +2741,7 @@ sfnt_open_tables (struct sfnt_font_desc *desc) /* Read the offset subtable. */ subtable = sfnt_read_table_directory (fd); - if (!subtable) + if (!subtable || (subtable == (struct sfnt_offset_subtable *) -1)) goto bail1; /* Read required tables. This font backend is supposed to be used commit f48e47fb49e1e552a6e63ae13e9b4b76722ec598 Author: Mattias EngdegÄrd Date: Thu Aug 10 10:56:21 2023 +0200 ; [NSString lispString]: clarify unpaired surrogate behaviour diff --git a/src/nsfns.m b/src/nsfns.m index 508568d90c3..b846b490ff7 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -3797,7 +3797,7 @@ - (NSString *)panel: (id)sender userEnteredFilename: (NSString *)filename } /* Count the number of characters in STR, NBYTES long. - The string is valid UTF-8 except that it may contain unpaired surrogates. */ + The string must be valid UTF-8. */ static ptrdiff_t count_utf8_chars (const char *str, ptrdiff_t nbytes) { @@ -3861,6 +3861,8 @@ handled fairly well by the NS libraries (displayed with distinct /* Make a Lisp string from an NSString. */ - (Lisp_Object)lispString { + /* If the input string includes unpaired surrogates, then the result + will be an empty string. */ const char *utf8 = [self UTF8String]; ptrdiff_t bytes = [self lengthOfBytesUsingEncoding: NSUTF8StringEncoding]; return make_multibyte_string (utf8, count_utf8_chars (utf8, bytes), bytes); commit 2026cba0c998c60c60ed4d87e81b537f2a931cb7 Author: Manuel Giraud Date: Thu Mar 9 14:35:31 2023 +0100 Scroll up and down in image-dired * lisp/image/image-dired.el (image-dired-scroll): Function to manage scroll in image-dired. (image-dired-scroll-up, image-dired-scroll-down): Scroll up and down command in image-dired. (image-dired-thumbnail-mode-map): Use them. (Bug#65052) diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index 9a92cae8ad5..8e2e4c6f644 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -770,6 +770,24 @@ image-dired-move-end-of-line (interactive nil image-dired-thumbnail-mode) (image-dired--movement-command (pos-eol) 'reverse)) +(defun image-dired-scroll (&optional down) + "Scroll in the thumbnail buffer." + (let ((goal-column (current-column))) + (if down (scroll-down) (scroll-up)) + (move-to-column goal-column) + (image-dired--movement-ensure-point-pos down) + (when image-dired-track-movement + (image-dired-track-original-file)) + (image-dired--update-header-line))) + +(defun image-dired-scroll-up () + (interactive nil image-dired-thumbnail-mode) + (image-dired-scroll)) + +(defun image-dired-scroll-down () + (interactive nil image-dired-thumbnail-mode) + (image-dired-scroll 'down)) + ;;; Header line @@ -980,6 +998,8 @@ image-dired-thumbnail-mode-map " " #'image-dired-end-of-buffer " " #'image-dired-move-beginning-of-line " " #'image-dired-move-end-of-line + " " #'image-dired-scroll-up + " " #'image-dired-scroll-down :menu '("Image-Dired" commit f2e3d2f1256da2a551cfe3fa685e582eb6d09d60 Author: Eli Zaretskii Date: Thu Aug 10 11:44:49 2023 +0300 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. diff --git a/configure.ac b/configure.ac index 0bc0de1bfac..0236dbd89d8 100644 --- a/configure.ac +++ b/configure.ac @@ -2643,6 +2643,17 @@ AC_DEFUN do test -f $file && { emacs_cv_boot_time_file=$file; break; } done])], + # This isn't perfect, as some systems might have the page file in + # another place. Also, I suspect that the time stamp of that + # file might also change when Windows enlarges the file due to + # insufficient VM. Still, this seems to be the most reliable + # way; the alternative (of using GetSystemTimes) won't work on + # laptops that hibernate, because the system clock is stopped + # then. Other possibility would be to run "net statistics + # workstation" and parse the output, but that's gross. So this + # should do; if the file is not there, the boot time will be + # returned as zero, and filelock.c already handles that. + [mingw32], [emacs_cv_boot_time_file=C:/pagefile.sys], [*], [emacs_cv_boot_time_file=not-needed])]) 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 @@ #define HAVE_C99_STRTOLD 1 # endif #endif -/* This isn't perfect, as some systems might have the page file in - another place. Also, I suspect that the time stamp of that file - might also change when Windows enlarges the file due to - insufficient VM. Still, this seems to be the most reliable way; - the alternative (of using GetSystemTimes) won't work on laptops - that hibernate, because the system clock is stopped then. Other - possibility would be to run "net statistics workstation" and parse - the output, but that's gross. So this should do; if the file is - not there, the boot time will be returned as zero, and filelock.c - already handles that. */ -#define BOOT_TIME_FILE "C:/pagefile.sys" - /* ============================================================ */ /* Here, add any special hacks needed to make Emacs work on this