1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

Merge remote-tracking branch 'origin/master' into feature/pgtk

This commit is contained in:
Po Lu 2021-12-12 21:40:17 +08:00
commit 2de147e93c
36 changed files with 367 additions and 92 deletions

View File

@ -283,6 +283,7 @@ If Exist execinfo.in.h update execinfo.in.h execinfo.in-h
If Exist fcntl.in.h update fcntl.in.h fcntl.in-h If Exist fcntl.in.h update fcntl.in.h fcntl.in-h
If Exist getopt.in.h update getopt.in.h getopt.in-h If Exist getopt.in.h update getopt.in.h getopt.in-h
If Exist getopt-cdefs.in.h update getopt-cdefs.in.h getopt-cdefs.in-h If Exist getopt-cdefs.in.h update getopt-cdefs.in.h getopt-cdefs.in-h
If Exist ieee754.in.h update ieee754.in.h ieee754.in-h
If Exist inttypes.in.h update inttypes.in.h inttypes.in-h If Exist inttypes.in.h update inttypes.in.h inttypes.in-h
If Exist limits.in.h update limits.in.h limits.in-h If Exist limits.in.h update limits.in.h limits.in-h
If Exist signal.in.h update signal.in.h signal.in-h If Exist signal.in.h update signal.in.h signal.in-h
@ -293,6 +294,7 @@ If Exist stdint.in.h update stdint.in.h stdint.in-h
If Exist stdio.in.h update stdio.in.h stdio.in-h If Exist stdio.in.h update stdio.in.h stdio.in-h
If Exist stdlib.in.h update stdlib.in.h stdlib.in-h If Exist stdlib.in.h update stdlib.in.h stdlib.in-h
If Exist string.in.h update string.in.h string.in-h If Exist string.in.h update string.in.h string.in-h
If Exist sys_random.in.h update sys_random.in.h sys_random.in-h
If Exist sys_select.in.h update sys_select.in.h sys_select.in-h If Exist sys_select.in.h update sys_select.in.h sys_select.in-h
If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h If Exist sys_stat.in.h update sys_stat.in.h sys_stat.in-h
If Exist sys_time.in.h update sys_time.in.h sys_time.in-h If Exist sys_time.in.h update sys_time.in.h sys_time.in-h
@ -308,10 +310,13 @@ rm -f makefile.tmp
sed -f ../msdos/sedlibcf.inp < gnulib.mk-in > gnulib.tmp sed -f ../msdos/sedlibcf.inp < gnulib.mk-in > gnulib.tmp
sed -f ../msdos/sedlibmk.inp < gnulib.tmp > gnulib.mk sed -f ../msdos/sedlibmk.inp < gnulib.tmp > gnulib.mk
rm -f gnulib.tmp rm -f gnulib.tmp
Rem Create .d files for new files in lib/ Rem Create .d files for new files in lib/ and lib/malloc/
If Not Exist deps\stamp mkdir deps If Not Exist deps\stamp mkdir deps
for %%f in (*.c) do @call ..\msdos\depfiles.bat %%f for %%f in (*.c) do @call ..\msdos\depfiles.bat %%f
echo deps-stamp > deps\stamp echo deps-stamp > deps\stamp
If Not Exist deps\malloc\stamp mkdir deps\malloc
for %%f in (malloc\*.c) do @call ..\msdos\depfiles.bat %%f
echo deps-stamp > deps\malloc\stamp
cd .. cd ..
rem ---------------------------------------------------------------------- rem ----------------------------------------------------------------------
Echo Configuring the lisp directory... Echo Configuring the lisp directory...

View File

@ -5773,7 +5773,7 @@ static void
TEX_decode_env (const char *evarname, const char *defenv) TEX_decode_env (const char *evarname, const char *defenv)
{ {
const char *env, *p; const char *env, *p;
ptrdiff_t len; ptrdiff_t len = 1;
/* Append default string to environment. */ /* Append default string to environment. */
env = getenv (evarname); env = getenv (evarname);
@ -5782,8 +5782,13 @@ TEX_decode_env (const char *evarname, const char *defenv)
else else
env = concat (env, defenv, ""); env = concat (env, defenv, "");
/* If the environment variable doesn't start with a colon, increase
the length of the token table. */
if (*env != ':')
len++;
/* Allocate a token table */ /* Allocate a token table */
for (len = 1, p = env; (p = strchr (p, ':')); ) for (p = env; (p = strchr (p, ':')); )
if (*++p) if (*++p)
len++; len++;
TEX_toktab = xnew (len, linebuffer); TEX_toktab = xnew (len, linebuffer);

View File

@ -1232,7 +1232,7 @@ There can be any number of :example/:result elements."
(define-keymap (define-keymap
:no-eval (define-keymap "C-c C-c" #'quit-buffer)) :no-eval (define-keymap "C-c C-c" #'quit-buffer))
(defvar-keymap (defvar-keymap
:no-eval (defvar-keymap my-keymap "C-c C-c" map #'quit-buffer)) :no-eval (defvar-keymap my-keymap "C-c C-c" #'quit-buffer))
"Setting keys" "Setting keys"
(keymap-set (keymap-set
:no-eval (keymap-set map "C-c C-c" #'quit-buffer)) :no-eval (keymap-set map "C-c C-c" #'quit-buffer))

View File

@ -63,11 +63,11 @@ has no effect."
Setting this to nil is offered as an aid to debugging only." Setting this to nil is offered as an aid to debugging only."
:type 'boolean) :type 'boolean)
(defcustom eshell-private-file-modes 384 ; umask 177 (defcustom eshell-private-file-modes #o600 ; umask 177
"The file-modes value to use for creating \"private\" files." "The file-modes value to use for creating \"private\" files."
:type 'integer) :type 'integer)
(defcustom eshell-private-directory-modes 448 ; umask 077 (defcustom eshell-private-directory-modes #o700 ; umask 077
"The file-modes value to use for creating \"private\" directories." "The file-modes value to use for creating \"private\" directories."
:type 'integer) :type 'integer)

View File

@ -562,7 +562,9 @@ lost after dumping")))
(lexical-binding nil)) (lexical-binding nil))
(if (member tmp-dump-mode '("pdump" "pbootstrap")) (if (member tmp-dump-mode '("pdump" "pbootstrap"))
(dump-emacs-portable (expand-file-name output invocation-directory)) (dump-emacs-portable (expand-file-name output invocation-directory))
(dump-emacs output "temacs") (dump-emacs output (if (eq system-type 'ms-dos)
"temacs.exe"
"temacs"))
(message "%d pure bytes used" pure-bytes-used)) (message "%d pure bytes used" pure-bytes-used))
(setq success t)) (setq success t))
(unless success (unless success

View File

@ -68,6 +68,7 @@
(require 'bibtex) (require 'bibtex)
(require 'json) (require 'json)
(require 'map)
(require 'oc) (require 'oc)
(require 'seq) (require 'seq)
@ -704,11 +705,18 @@ Return chosen style as a string."
(defun org-cite-basic--key-completion-table () (defun org-cite-basic--key-completion-table ()
"Return completion table for cite keys, as a hash table. "Return completion table for cite keys, as a hash table.
In this hash table, keys are a strings with author, date, and title of the
reference. Values are the cite key." In this hash table, keys are a strings with author, date, and
(let ((cache-key (mapcar #'car org-cite-basic--bibliography-cache))) title of the reference. Values are the cite keys.
(if (gethash cache-key org-cite-basic--completion-cache)
org-cite-basic--completion-cache Return nil if there are no bibliography files or no entries."
;; Populate bibliography cache.
(let ((entries (org-cite-basic--parse-bibliography)))
(cond
((null entries) nil) ;no bibliography files
((gethash entries org-cite-basic--completion-cache)
org-cite-basic--completion-cache)
(t
(clrhash org-cite-basic--completion-cache) (clrhash org-cite-basic--completion-cache)
(dolist (key (org-cite-basic--all-keys)) (dolist (key (org-cite-basic--all-keys))
(let ((completion (let ((completion
@ -725,14 +733,16 @@ reference. Values are the cite key."
org-cite-basic-column-separator org-cite-basic-column-separator
(org-cite-basic--get-field 'title key nil t)))) (org-cite-basic--get-field 'title key nil t))))
(puthash completion key org-cite-basic--completion-cache))) (puthash completion key org-cite-basic--completion-cache)))
(puthash cache-key t org-cite-basic--completion-cache) (unless (map-empty-p org-cite-basic--completion-cache) ;no key
org-cite-basic--completion-cache))) (puthash entries t org-cite-basic--completion-cache)
org-cite-basic--completion-cache)))))
(defun org-cite-basic--complete-key (&optional multiple) (defun org-cite-basic--complete-key (&optional multiple)
"Prompt for a reference key and return a citation reference string. "Prompt for a reference key and return a citation reference string.
When optional argument MULTIPLE is non-nil, prompt for multiple keys, until one When optional argument MULTIPLE is non-nil, prompt for multiple
of them is nil. Then return the list of reference strings selected. keys, until one of them is nil. Then return the list of
reference strings selected.
Raise an error when no bibliography is set in the buffer." Raise an error when no bibliography is set in the buffer."
(let* ((table (let* ((table
@ -748,9 +758,9 @@ Raise an error when no bibliography is set in the buffer."
(build-prompt (build-prompt
(lambda () (lambda ()
(if keys (if keys
(format "Key (\"\" to exit) %s: " (format "Key (empty input exits) %s: "
(mapconcat #'identity (reverse keys) ";")) (mapconcat #'identity (reverse keys) ";"))
"Key (\"\" to exit): ")))) "Key (empty input exits): "))))
(let ((key (funcall prompt (funcall build-prompt)))) (let ((key (funcall prompt (funcall build-prompt))))
(while (org-string-nw-p key) (while (org-string-nw-p key)
(push (gethash key table) keys) (push (gethash key table) keys)

View File

@ -605,10 +605,10 @@ property list."
(with-temp-buffer (with-temp-buffer
(save-excursion (insert output)) (save-excursion (insert output))
(when (search-forward "\\begin{document}" nil t) (when (search-forward "\\begin{document}" nil t)
;; Ensure that \citeprocitem is defined for citeproc-el (goto-char (match-beginning 0))
;; Ensure that \citeprocitem is defined for citeproc-el.
(insert "\\makeatletter\n\\newcommand{\\citeprocitem}[2]{\\hyper@linkstart{cite}{citeproc_bib_item_#1}#2\\hyper@linkend}\n\\makeatother\n\n") (insert "\\makeatletter\n\\newcommand{\\citeprocitem}[2]{\\hyper@linkstart{cite}{citeproc_bib_item_#1}#2\\hyper@linkend}\n\\makeatother\n\n")
;; Ensure there is a \usepackage{hanging} somewhere or add one. ;; Ensure there is a \usepackage{hanging} somewhere or add one.
(goto-char (match-beginning 0))
(let ((re (rx "\\usepackage" (opt "[" (*? nonl) "]") "{hanging}"))) (let ((re (rx "\\usepackage" (opt "[" (*? nonl) "]") "{hanging}")))
(unless (re-search-backward re nil t) (unless (re-search-backward re nil t)
(insert "\\usepackage[notquote]{hanging}\n")))) (insert "\\usepackage[notquote]{hanging}\n"))))

View File

@ -1540,7 +1540,7 @@ The generated function inserts or edit a citation at point. More specifically,
On a citation reference: On a citation reference:
- on the prefix or right before th \"@\" character, insert a new reference - on the prefix or right before the \"@\" character, insert a new reference
before the current one, before the current one,
- on the suffix, insert it after the reference, - on the suffix, insert it after the reference,
- otherwise, update the cite key, preserving both affixes. - otherwise, update the cite key, preserving both affixes.

View File

@ -444,7 +444,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
;;;; TAB key with modifiers ;;;; TAB key with modifiers
(org-defkey org-mode-map (kbd "TAB") #'org-cycle) (org-defkey org-mode-map (kbd "TAB") #'org-cycle)
(org-defkey org-mode-map (kbd "C-c C-TAB") #'org-force-cycle-archived) (org-defkey org-mode-map (kbd "C-c C-<tab>") #'org-force-cycle-archived)
;; Override text-mode binding to expose `complete-symbol' for ;; Override text-mode binding to expose `complete-symbol' for
;; pcomplete functionality. ;; pcomplete functionality.
(org-defkey org-mode-map (kbd "M-TAB") nil) (org-defkey org-mode-map (kbd "M-TAB") nil)

View File

@ -368,7 +368,7 @@ Return value as a string."
date) date)
(unwind-protect (unwind-protect
(progn (progn
(vc-call print-log file buf nil nil 1) (vc-call print-log (list file) buf nil nil 1)
(with-current-buffer buf (with-current-buffer buf
(vc-exec-after (vc-exec-after
(lambda () (lambda ()

View File

@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
(defun org-git-version () (defun org-git-version ()
"The Git version of Org mode. "The Git version of Org mode.
Inserted by installing Org or when a release is made." Inserted by installing Org or when a release is made."
(let ((org-git-version "release_9.5.1-15-gdb4805")) (let ((org-git-version "release_9.5.1-25-g9ca3bc"))
org-git-version)) org-git-version))
(provide 'org-version) (provide 'org-version)

View File

@ -11323,13 +11323,14 @@ or a character."
(setq (setq
new new
(if nump (if nump
(let ((msg (format "Priority %s-%s, SPC to remove: " (let* ((msg (format "Priority %s-%s, SPC to remove: "
(number-to-string org-priority-highest) (number-to-string org-priority-highest)
(number-to-string org-priority-lowest)))) (number-to-string org-priority-lowest)))
(if (< 9 org-priority-lowest) (s (if (< 9 org-priority-lowest)
(string-to-number (read-string msg)) (read-string msg)
(message msg) (message msg)
(string-to-number (char-to-string (read-char-exclusive))))) (char-to-string (read-char-exclusive)))))
(if (equal s " ") ?\s (string-to-number s)))
(progn (message "Priority %c-%c, SPC to remove: " (progn (message "Priority %c-%c, SPC to remove: "
org-priority-highest org-priority-lowest) org-priority-highest org-priority-lowest)
(save-match-data (save-match-data

View File

@ -1059,7 +1059,7 @@ Return PDF file's name."
(let ((file (org-export-output-file-name ".tex" subtreep))) (let ((file (org-export-output-file-name ".tex" subtreep)))
(org-export-to-file 'beamer file (org-export-to-file 'beamer file
async subtreep visible-only body-only ext-plist async subtreep visible-only body-only ext-plist
(lambda (file) (org-latex-compile file))))) #'org-latex-compile)))
;;;###autoload ;;;###autoload
(defun org-beamer-select-environment () (defun org-beamer-select-environment ()

View File

@ -888,7 +888,7 @@ Return ICS file name."
(org-export-to-file 'icalendar outfile (org-export-to-file 'icalendar outfile
async subtreep visible-only body-only async subtreep visible-only body-only
'(:ascii-charset utf-8 :ascii-links-to-notes nil) '(:ascii-charset utf-8 :ascii-links-to-notes nil)
(lambda (file) '(lambda (file)
(run-hook-with-args 'org-icalendar-after-save-hook file) nil)))) (run-hook-with-args 'org-icalendar-after-save-hook file) nil))))
;;;###autoload ;;;###autoload

View File

@ -982,7 +982,7 @@ Return PDF file's name."
(org-koma-letter-special-contents)) (org-koma-letter-special-contents))
(org-export-to-file 'koma-letter file (org-export-to-file 'koma-letter file
async subtreep visible-only body-only ext-plist async subtreep visible-only body-only ext-plist
(lambda (file) (org-latex-compile file))))) #'org-latex-compile)))
(provide 'ox-koma-letter) (provide 'ox-koma-letter)

View File

@ -1117,7 +1117,7 @@ Return PDF file's name."
(let ((outfile (org-export-output-file-name ".man" subtreep))) (let ((outfile (org-export-output-file-name ".man" subtreep)))
(org-export-to-file 'man outfile (org-export-to-file 'man outfile
async subtreep visible-only body-only ext-plist async subtreep visible-only body-only ext-plist
(lambda (file) (org-latex-compile file))))) #'org-latex-compile)))
(defun org-man-compile (file) (defun org-man-compile (file)
"Compile a Groff file. "Compile a Groff file.

View File

@ -1701,7 +1701,7 @@ Return INFO file's name."
(org-export-coding-system org-texinfo-coding-system)) (org-export-coding-system org-texinfo-coding-system))
(org-export-to-file 'texinfo outfile (org-export-to-file 'texinfo outfile
async subtreep visible-only body-only ext-plist async subtreep visible-only body-only ext-plist
(lambda (file) (org-texinfo-compile file))))) #'org-texinfo-compile)))
;;;###autoload ;;;###autoload
(defun org-texinfo-publish-to-texinfo (plist filename pub-dir) (defun org-texinfo-publish-to-texinfo (plist filename pub-dir)

View File

@ -6373,7 +6373,11 @@ use it to set a major mode there, e.g,
(&optional async subtreep visible-only body-only ext-plist) (&optional async subtreep visible-only body-only ext-plist)
(interactive) (interactive)
(org-export-to-buffer \\='latex \"*Org LATEX Export*\" (org-export-to-buffer \\='latex \"*Org LATEX Export*\"
async subtreep visible-only body-only ext-plist (lambda () (LaTeX-mode)))) async subtreep visible-only body-only ext-plist
#'LaTeX-mode))
When expressed as an anonymous function, using `lambda',
POST-PROCESS needs to be quoted.
This function returns BUFFER." This function returns BUFFER."
(declare (indent 2)) (declare (indent 2))
@ -6436,7 +6440,10 @@ to send the output file through additional processing, e.g,
(let ((outfile (org-export-output-file-name \".tex\" subtreep))) (let ((outfile (org-export-output-file-name \".tex\" subtreep)))
(org-export-to-file \\='latex outfile (org-export-to-file \\='latex outfile
async subtreep visible-only body-only ext-plist async subtreep visible-only body-only ext-plist
(lambda (file) (org-latex-compile file))) #'org-latex-compile)))
When expressed as an anonymous function, using `lambda',
POST-PROCESS needs to be quoted.
The function returns either a file name returned by POST-PROCESS, The function returns either a file name returned by POST-PROCESS,
or FILE." or FILE."

View File

@ -25,6 +25,14 @@
(require 'cl-lib) (require 'cl-lib)
(declare-function sqlite-execute "sqlite.c")
(declare-function sqlite-more-p "sqlite.c")
(declare-function sqlite-next "sqlite.c")
(declare-function sqlite-columns "sqlite.c")
(declare-function sqlite-finalize "sqlite.c")
(declare-function sqlite-select "sqlite.c")
(declare-function sqlite-open "sqlite.c")
(defvar-keymap sqlite-mode-map (defvar-keymap sqlite-mode-map
"g" #'sqlite-mode-list-tables "g" #'sqlite-mode-list-tables
"c" #'sqlite-mode-list-columns "c" #'sqlite-mode-list-columns
@ -44,6 +52,8 @@
(defun sqlite-mode-open-file (file) (defun sqlite-mode-open-file (file)
"Browse the contents of an sqlite file." "Browse the contents of an sqlite file."
(interactive "fSQLite file name: ") (interactive "fSQLite file name: ")
(unless (sqlite-available-p)
(error "This Emacs doesn't have SQLite support, so it can't view SQLite files"))
(pop-to-buffer (get-buffer-create (pop-to-buffer (get-buffer-create
(format "*SQLite %s*" (file-name-nondirectory file)))) (format "*SQLite %s*" (file-name-nondirectory file))))
(sqlite-mode) (sqlite-mode)
@ -57,7 +67,7 @@
(db sqlite--db) (db sqlite--db)
(entries nil)) (entries nil))
(erase-buffer) (erase-buffer)
(dolist (table (sqlite-select db "select name from sqlite_schema where type = 'table' and name not like 'sqlite_%' order by name")) (dolist (table (sqlite-select db "select name from sqlite_master where type = 'table' and name not like 'sqlite_%' order by name"))
(push (list (car table) (push (list (car table)
(caar (sqlite-select db (format "select count(*) from %s" (caar (sqlite-select db (format "select count(*) from %s"
(car table))))) (car table)))))
@ -188,7 +198,7 @@
(not (eq (car table) 'row))) (not (eq (car table) 'row)))
(user-error "No row under point")) (user-error "No row under point"))
(unless (yes-or-no-p "Really delete the row under point? ") (unless (yes-or-no-p "Really delete the row under point? ")
(error "Not deleting")) (user-error "Not deleting"))
(sqlite-execute (sqlite-execute
sqlite--db sqlite--db
(format "delete from %s where %s" (format "delete from %s where %s"

View File

@ -26,16 +26,17 @@
(defmacro with-sqlite-transaction (db &rest body) (defmacro with-sqlite-transaction (db &rest body)
"Execute BODY while holding a transaction for DB." "Execute BODY while holding a transaction for DB."
(declare (indent 1) (debug (form body))) (declare (indent 1) (debug (form body)))
(let ((db-var (gensym))) (let ((db-var (gensym))
`(let ((,db-var ,db)) (func-var (gensym)))
`(let ((,db-var ,db)
(,func-var (lambda () ,@body)))
(if (sqlite-available-p) (if (sqlite-available-p)
(unwind-protect (unwind-protect
(progn (progn
(sqlite-transaction ,db-var) (sqlite-transaction ,db-var)
,@body) (funcall ,func-var))
(sqlite-commit ,db-var)) (sqlite-commit ,db-var))
(progn (funcall ,func-var)))))
,@body)))))
(provide 'sqlite) (provide 'sqlite)

20
msdos/langinfo.h Normal file
View File

@ -0,0 +1,20 @@
/* Replacement langinfo.h file for building GNU Emacs on MS-DOS with DJGPP.
Copyright (C) 2021 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#define nl_langinfo(ignore) "cp437"

View File

@ -55,6 +55,10 @@ s/ *@LIBJPEG@//
s/ *@LIBPNG@// s/ *@LIBPNG@//
s/ *@LIBGIF@// s/ *@LIBGIF@//
s/ *@LIBXPM@// s/ *@LIBXPM@//
/^HAVE_NATIVE_COMP *=/s/@HAVE_NATIVE_COMP@/no/
/^HAVE_PDUMPER *=/s/@HAVE_PDUMPER@/no/
/^CHECK_STRUCTS *=/s/@CHECK_STRUCTS@//
/^RUN_TEMACS \=/s/temacs/temacs.exe/
/^XFT_LIBS *=/s/@XFT_LIBS@// /^XFT_LIBS *=/s/@XFT_LIBS@//
/^XCB_LIBS *=/s/@XCB_LIBS@// /^XCB_LIBS *=/s/@XCB_LIBS@//
/^FONTCONFIG_CFLAGS *=/s/@FONTCONFIG_CFLAGS@// /^FONTCONFIG_CFLAGS *=/s/@FONTCONFIG_CFLAGS@//
@ -150,6 +154,18 @@ s/ *@LIBXPM@//
/^CANNOT_DUMP *=/s/@CANNOT_DUMP@/no/ /^CANNOT_DUMP *=/s/@CANNOT_DUMP@/no/
/^W32_OBJ *=/s/@W32_OBJ@// /^W32_OBJ *=/s/@W32_OBJ@//
/^W32_LIBS *=/s/@W32_LIBS@// /^W32_LIBS *=/s/@W32_LIBS@//
/^JSON_OBJ *=/s/@JSON_OBJ@//
/^JSON_CFLAGS *=/s/@JSON_CFLAGS@//
/^JSON_LIBS *=/s/@JSON_LIBS@//
/^LIBGCCJIT_OBJ *=/s/@LIBGCCJIT_OBJ@//
/^LIBGCCJIT_CFLAGS *=/s/@LIBGCCJIT_CFLAGS@//
/^LIBGCCJIT_LIBS *=/s/@LIBGCCJIT_LIBS@//
/^HARFBUZZ_CFLAGS *=/s/@HARFBUZZ_CFLAGS@//
/^HARFBUZZ_LIBS *=/s/@HARFBUZZ_LIBS@//
/^LCMS2_CFLAGS *=/s/@LCMS2_CFLAGS@//
/^LCMS2_LIBS *=/s/@LCMS2_LIBS@//
/^LIBGMP *=/s/@LIBGMP@//
/^DYNLIB_OBJ *=/s/@DYNLIB_OBJ@//
/^version *=/s/@[^@\n]*@// /^version *=/s/@[^@\n]*@//
/^EMACSRES *=/s/@EMACSRES@// /^EMACSRES *=/s/@EMACSRES@//
/^W32_RES_LINK *=/s/@W32_RES_LINK@// /^W32_RES_LINK *=/s/@W32_RES_LINK@//
@ -162,6 +178,7 @@ s/ *@LIBXPM@//
/^AUTO_DEPEND *=/s/@AUTO_DEPEND@/yes/ /^AUTO_DEPEND *=/s/@AUTO_DEPEND@/yes/
/^PAXCTL_dumped *=/s/=.*$/=/ /^PAXCTL_dumped *=/s/=.*$/=/
/^PAXCTL_notdumped *=/s/=.*$/=/ /^PAXCTL_notdumped *=/s/=.*$/=/
/^DUMPING *=/s/@DUMPING@/unexec/
/^lisp\.mk:/,/^$/c\ /^lisp\.mk:/,/^$/c\
lisp.mk: $(lispsource)/loadup.el\ lisp.mk: $(lispsource)/loadup.el\
@rm -f $@\ @rm -f $@\
@ -183,6 +200,7 @@ lisp.mk: $(lispsource)/loadup.el\
/^ *ifneq (\$(PAXCTL_dumped),)/,/^ *endif/d /^ *ifneq (\$(PAXCTL_dumped),)/,/^ *endif/d
/^ *ln /s/ln /cp / /^ *ln /s/ln /cp /
/^ fi/d /^ fi/d
/ifeq (\$(HAVE_NATIVE_COMP):\$(NATIVE_DISABLED),yes:)/,/endif/d
/^ *\$(RUN_TEMACS) /i\ /^ *\$(RUN_TEMACS) /i\
stubedit temacs.exe minstack=1024k stubedit temacs.exe minstack=1024k
/^ *LC_ALL=C \$(RUN_TEMACS)/i\ /^ *LC_ALL=C \$(RUN_TEMACS)/i\
@ -214,8 +232,8 @@ s/echo.*buildobj.lst/dj&/
/^ -\{0,1\}rm -f/s/\\#/#/ /^ -\{0,1\}rm -f/s/\\#/#/
/^ echo.* buildobj.h/s|echo |djecho | /^ echo.* buildobj.h/s|echo |djecho |
/^buildobj\.h:/,/^ *\$(AM_V_at)mv /{ /^buildobj\.h:/,/^ *\$(AM_V_at)mv /{
/^ *\$(AM_V_GEN)for /,/^ *done /c\ /^ *\$(AM_V_GEN)for /,/mv \$@.tmp \$@/c\
djecho "$(ALLOBJS)" | sed -e 's/^ */"/' -e 's/ *$$/"/' -e 's/ */", "/g' >>$@.tmp djecho "$(ALLOBJS)" | sed -e 's/^ */"/' -e 's/ *$$/"/' -e 's/ */", "/g' >>$@
} }
# Remove or replace dependencies we cannot have # Remove or replace dependencies we cannot have
/^\.PRECIOUS: /s!\.\./config.status !! /^\.PRECIOUS: /s!\.\./config.status !!
@ -236,3 +254,5 @@ s| -I\$(srcdir)/\.\./lib||
s| -I\$(top_srcdir)/lib|| s| -I\$(top_srcdir)/lib||
s| -I\. -I\$(srcdir)| -I.| s| -I\. -I\$(srcdir)| -I.|
/^ *test "X/d /^ *test "X/d
/\$(CC) -o \$@.tmp/s/\$@.tmp/\$@/
/mv \$@.tmp \$@/d

View File

@ -37,6 +37,7 @@
/^#undef HAVE_STRUCT_UTIMBUF *$/s/^.*$/#define HAVE_STRUCT_UTIMBUF 1/ /^#undef HAVE_STRUCT_UTIMBUF *$/s/^.*$/#define HAVE_STRUCT_UTIMBUF 1/
/^#undef LOCALTIME_CACHE *$/s/^.*$/#define LOCALTIME_CACHE 1/ /^#undef LOCALTIME_CACHE *$/s/^.*$/#define LOCALTIME_CACHE 1/
/^#undef HAVE_TZSET *$/s/^.*$/#define HAVE_TZSET 1/ /^#undef HAVE_TZSET *$/s/^.*$/#define HAVE_TZSET 1/
/^#undef HAVE_UNEXEC *$/s/^.*$/#define HAVE_UNEXEC 1/
/^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/ /^#undef HAVE_RINT *$/s/^.*$/#define HAVE_RINT 1/
/^#undef HAVE_C99_STRTOLD *$/s/^.*$/#define HAVE_C99_STRTOLD 1/ /^#undef HAVE_C99_STRTOLD *$/s/^.*$/#define HAVE_C99_STRTOLD 1/
/^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/ /^#undef HAVE_DIFFTIME *$/s/^.*$/#define HAVE_DIFFTIME 1/

View File

@ -34,6 +34,7 @@
/^LIBS_SYSTEM *=/s/@[^@\n]*@//g /^LIBS_SYSTEM *=/s/@[^@\n]*@//g
/^LIB_CLOCK_GETTIME *=/s/@[^@\n]*@//g /^LIB_CLOCK_GETTIME *=/s/@[^@\n]*@//g
/^LIB_TIMER_TIME *=/s/@[^@\n]*@//g /^LIB_TIMER_TIME *=/s/@[^@\n]*@//g
/^LIB_GETRANDOM *=/s/@[^@\n]*@//g
/^CFLAGS *=/s!=.*$!=-O2 -g! /^CFLAGS *=/s!=.*$!=-O2 -g!
/^CPPFLAGS *=/s/@CPPFLAGS@// /^CPPFLAGS *=/s/@CPPFLAGS@//
/^LDFLAGS *=/s/@LDFLAGS@// /^LDFLAGS *=/s/@LDFLAGS@//

View File

@ -144,7 +144,7 @@ s/@PACKAGE@/emacs/
/^CPP *=/s/@[^@\n]*@/gcc -e/ /^CPP *=/s/@[^@\n]*@/gcc -e/
/^CPPFLAGS *=/s/@[^@\n]*@// /^CPPFLAGS *=/s/@[^@\n]*@//
/^CCDEPMODE *=/s/@[^@\n]*@/depmode=gcc3/ /^CCDEPMODE *=/s/@[^@\n]*@/depmode=gcc3/
/^CFLAGS *=/s/@[^@\n]*@/-g -O2/ /^CFLAGS *=/s/@[^@\n]*@/-g -O2 -I$\(srcdir\)\/..\/msdos/
/^CYGPATH_W *=/s/@[^@\n]*@// /^CYGPATH_W *=/s/@[^@\n]*@//
/^CYGWIN_OBJ *=/s/@[^@\n]*@// /^CYGWIN_OBJ *=/s/@[^@\n]*@//
/^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@//
@ -170,28 +170,28 @@ s/@PACKAGE@/emacs/
/^BITSIZEOF_WCHAR_T *=/s/@BITSIZEOF_WCHAR_T@/16/ /^BITSIZEOF_WCHAR_T *=/s/@BITSIZEOF_WCHAR_T@/16/
/^BITSIZEOF_WINT_T *=/s/@BITSIZEOF_WINT_T@/32/ /^BITSIZEOF_WINT_T *=/s/@BITSIZEOF_WINT_T@/32/
/^APPLE_UNIVERSAL_BUILD *=/s/@APPLE_UNIVERSAL_BUILD@/0/ /^APPLE_UNIVERSAL_BUILD *=/s/@APPLE_UNIVERSAL_BUILD@/0/
# # Most GL_GNULIB_* are replaced with zero even though DJGPP does not
# Most GNULIB_* are replaced with zero even though DJGPP does not have # have these features. That's because the gnulib replacements cannot
# these features. That's because the gnulib replacements cannot
# possibly work for DJGPP, so we prefer to fail the link than have a # possibly work for DJGPP, so we prefer to fail the link than have a
# subtly botched executable. Those replacements that _are_ needed # subtly botched executable. Those replacements that _are_ needed
# should be before the last catch-all rule. # should be before the last catch-all rule.
/^GNULIB_ATOLL *=/s/@GNULIB_ATOLL@/1/ /^GL_GNULIB_ATOLL *=/s/@GL_GNULIB_ATOLL@/1/
/^GNULIB_DUP3 *=/s/@GNULIB_DUP3@/1/ /^GL_GNULIB_DUP3 *=/s/@GL_GNULIB_DUP3@/1/
/^GNULIB_ENVIRON *=/s/@GNULIB_ENVIRON@/1/ /^GL_GNULIB_ENVIRON *=/s/@GL_GNULIB_ENVIRON@/1/
/^GNULIB_FDATASYNC *=/s/@GNULIB_FDATASYNC@/1/ /^GL_GNULIB_FDATASYNC *=/s/@GL_GNULIB_FDATASYNC@/1/
/^GNULIB_GETLOADAVG *=/s/@GNULIB_GETLOADAVG@/1/ /^GL_GNULIB_GETLOADAVG *=/s/@GL_GNULIB_GETLOADAVG@/1/
/^GNULIB_GL_UNISTD_H_GETOPT *=/s/@GNULIB_GL_UNISTD_H_GETOPT@/1/ /^GL_GNULIB_UNISTD_H_GETOPT *=/s/@GL_GNULIB_UNISTD_H_GETOPT@/1/
/^GNULIB_MEMRCHR *=/s/@GNULIB_MEMRCHR@/1/ /^GL_GNULIB_MEMRCHR *=/s/@GL_GNULIB_MEMRCHR@/1/
/^GNULIB_MKOSTEMP *=/s/@GNULIB_MKOSTEMP@/1/ /^GL_GNULIB_MEMPCPY *=/s/@GL_GNULIB_MEMPCPY@/1/
/^GNULIB_MKTIME *=/s/@GNULIB_MKTIME@/1/ /^GL_GNULIB_MKOSTEMP *=/s/@GL_GNULIB_MKOSTEMP@/1/
/^GNULIB_TIME_R *=/s/@GNULIB_TIME_R@/1/ /^GL_GNULIB_MKTIME *=/s/@GL_GNULIB_MKTIME@/1/
/^GNULIB_TIMEGM *=/s/@GNULIB_TIMEGM@/1/ /^GL_GNULIB_TIME_R *=/s/@GL_GNULIB_TIME_R@/1/
/^GNULIB_TIME_RZ *=/s/@GNULIB_TIME_RZ@/1/ /^GL_GNULIB_TIMEGM *=/s/@GL_GNULIB_TIMEGM@/1/
/^GNULIB_UNSETENV *=/s/@GNULIB_UNSETENV@/1/ /^GL_GNULIB_TIME_RZ *=/s/@GL_GNULIB_TIME_RZ@/1/
/^GNULIB_[^ =]* *= *@/s/@[^@\n]*@/0/ /^GL_GNULIB_UNSETENV *=/s/@GL_GNULIB_UNSETENV@/1/
/^GSETTINGS_CFLAGS *=/s/@[^@\n]*@// /^GL_GNULIB_[^ =]* *= *@/s/@[^@\n]*@/0/
/^GSETTINGS_LIBS *=/s/@[^@\n]*@// /^GL_GSETTINGS_CFLAGS *=/s/@[^@\n]*@//
/^GL_GSETTINGS_LIBS *=/s/@[^@\n]*@//
# #
# Edit the HAVE_foo variables # Edit the HAVE_foo variables
/^HAVE_ATOLL *=/s/@HAVE_ATOLL@/0/ /^HAVE_ATOLL *=/s/@HAVE_ATOLL@/0/
@ -253,6 +253,7 @@ s/@PACKAGE@/emacs/
/^HAVE_USLEEP *=/s/@HAVE_USLEEP@/1/ /^HAVE_USLEEP *=/s/@HAVE_USLEEP@/1/
/^HAVE_WCHAR_H *=/s/@HAVE_WCHAR_H@/1/ /^HAVE_WCHAR_H *=/s/@HAVE_WCHAR_H@/1/
/^HAVE_WCHAR_T *=/s/@HAVE_WCHAR_T@/1/ /^HAVE_WCHAR_T *=/s/@HAVE_WCHAR_T@/1/
/^HAVE_LIBGMP *=/s/@HAVE_LIBGMP@/0/
/^HAVE__BOOL *=/s/@HAVE__BOOL@/1/ /^HAVE__BOOL *=/s/@HAVE__BOOL@/1/
/^HAVE__EXIT *=/s/@HAVE__EXIT@/1/ /^HAVE__EXIT *=/s/@HAVE__EXIT@/1/
/^HAVE_[^ =]* *= *@/s/@[^@\n]*@/0/ /^HAVE_[^ =]* *= *@/s/@[^@\n]*@/0/
@ -265,7 +266,9 @@ s/@PACKAGE@/emacs/
/^LIBS *=/s/@[^@\n]*@// /^LIBS *=/s/@[^@\n]*@//
/^MAKEINFO *=/s/@MAKEINFO@/makeinfo/ /^MAKEINFO *=/s/@MAKEINFO@/makeinfo/
# MKDIR_P lines are edited further below # MKDIR_P lines are edited further below
/^MKDIR_P *=/s/@MKDIR_P@// # MKDIR_P is only used to create lib/malloc, and the folder is
# already present in the distribution, so this should work fine.
/^MKDIR_P *=/s/@MKDIR_P@/echo/
/^NEXT_AS_FIRST_DIRECTIVE_DIRENT_H *=/s/@[^@\n]*@/<dirent.h>/ /^NEXT_AS_FIRST_DIRECTIVE_DIRENT_H *=/s/@[^@\n]*@/<dirent.h>/
/^NEXT_AS_FIRST_DIRECTIVE_ERRNO_H *=/s/@[^@\n]*@// /^NEXT_AS_FIRST_DIRECTIVE_ERRNO_H *=/s/@[^@\n]*@//
/^NEXT_AS_FIRST_DIRECTIVE_FCNTL_H *=/s/@[^@\n]*@/<fcntl.h>/ /^NEXT_AS_FIRST_DIRECTIVE_FCNTL_H *=/s/@[^@\n]*@/<fcntl.h>/
@ -309,6 +312,7 @@ s/@PACKAGE@/emacs/
/^REPLACE_MKTIME *=/s/@[^@\n]*@/1/ /^REPLACE_MKTIME *=/s/@[^@\n]*@/1/
# We don't want any other gnulib replacement functions # We don't want any other gnulib replacement functions
/^REPLACE_[^ =]* *= *@/s/@[^@\n]*@/0/ /^REPLACE_[^ =]* *= *@/s/@[^@\n]*@/0/
/^LIB_GETRANDOM[^ =]* *= *@/s/@[^@\n]*@//
/^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@// /^SIG_ATOMIC_T_SUFFIX *=/s/@SIG_ATOMIC_T_SUFFIX@//
/^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/ /^SIZE_T_SUFFIX *=/s/@SIZE_T_SUFFIX@/u/
/^ALLOCA_H *=/s/@[^@\n]*@/alloca.h/ /^ALLOCA_H *=/s/@[^@\n]*@/alloca.h/
@ -317,18 +321,23 @@ s/@PACKAGE@/emacs/
/^ERRNO_H *=/s/@[^@\n]*@// /^ERRNO_H *=/s/@[^@\n]*@//
/^EXECINFO_H *=/s/@[^@\n]*@/execinfo.h/ /^EXECINFO_H *=/s/@[^@\n]*@/execinfo.h/
/^GETOPT_CDEFS_H *=/s/@[^@\n]*@/getopt-cdefs.h/ /^GETOPT_CDEFS_H *=/s/@[^@\n]*@/getopt-cdefs.h/
/^GMP_H *=/s/@[^@\n]*@/gmp.h/
/^LIMITS_H *=/s/@[^@\n]*@/limits.h/ /^LIMITS_H *=/s/@[^@\n]*@/limits.h/
/^IEEE754_H *=/s/@[^@\n]*@/ieee754.h/
/^STDALIGN_H *=/s/@[^@\n]*@/stdalign.h/ /^STDALIGN_H *=/s/@[^@\n]*@/stdalign.h/
/^STDDEF_H *=/s/@[^@\n]*@/stddef.h/ /^STDDEF_H *=/s/@[^@\n]*@/stddef.h/
/^STDINT_H *=/s/@[^@\n]*@/stdint.h/ /^STDINT_H *=/s/@[^@\n]*@/stdint.h/
/^SYS_TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^SYS_TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/
/^TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^TIME_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/
/^TIME_H_DEFINES_TIME_UTC *=/s/@[^@\n]*@/0/
/^UNISTD_H_HAVE_SYS_RANDOM_H *=/s/@[^@\n]*@/0/
/^UNISTD_H_HAVE_WINSOCK2_H *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H *=/s/@[^@\n]*@/0/
/^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS *=/s/@[^@\n]*@/0/ /^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS *=/s/@[^@\n]*@/0/
/^UNISTD_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/ /^UNISTD_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/
/^UNDEFINE_STRTOK_R *=/s/@UNDEFINE_STRTOK_R@/0/ /^UNDEFINE_STRTOK_R *=/s/@UNDEFINE_STRTOK_R@/0/
/^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/ /^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/
/^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@// /^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@//
/^GNULIBHEADERS_OVERRIDE_WINT_T *=/s/@[^@\n]*@/0/
/^WINDOWS_64_BIT_OFF_T *=/s/@WINDOWS_64_BIT_OFF_T@/0/ /^WINDOWS_64_BIT_OFF_T *=/s/@WINDOWS_64_BIT_OFF_T@/0/
/^WINDOWS_64_BIT_ST_SIZE *=/s/@WINDOWS_64_BIT_ST_SIZE@/0/ /^WINDOWS_64_BIT_ST_SIZE *=/s/@WINDOWS_64_BIT_ST_SIZE@/0/
/^WINDOWS_STAT_INODES *=/s/@WINDOWS_STAT_INODES@/0/ /^WINDOWS_STAT_INODES *=/s/@WINDOWS_STAT_INODES@/0/
@ -337,7 +346,7 @@ s/@PACKAGE@/emacs/
/am__append_[1-9][0-9]* *=.*gettext\.h/s/@[^@\n]*@/\#/ /am__append_[1-9][0-9]* *=.*gettext\.h/s/@[^@\n]*@/\#/
/am__append_2 *=.*verify\.h/s/@[^@\n]*@// /am__append_2 *=.*verify\.h/s/@[^@\n]*@//
/^@gl_GNULIB_ENABLED_tempname_TRUE@/s/@[^@\n]*@// /^@gl_GNULIB_ENABLED_tempname_TRUE@/s/@[^@\n]*@//
/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o memrchr.o sig2str.o time_r.o time_rz.o timegm.o mktime.o getloadavg.o pthread_sigmask.o mkostemp.o fpending.o fdatasync.o execinfo.o/ /^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o getrandom.o memrchr.o mempcpy.o regex.o memmem.o sig2str.o sigdescr_np.o time_r.o time_rz.o timegm.o mktime.o mini-gmp-gnulib.o getloadavg.o pthread_sigmask.o mkostemp.o fpending.o execinfo.o tempname.o/
/^am__append_[1-9][0-9]* *=/,/^[^ ]/{ /^am__append_[1-9][0-9]* *=/,/^[^ ]/{
s/ *inttypes\.h// s/ *inttypes\.h//
s| *sys/select\.h|| s| *sys/select\.h||
@ -394,15 +403,19 @@ s/^ -*test -z.*|| rm/ -rm/
s/@echo /@djecho / s/@echo /@djecho /
# #
# Determine which headers to generate # Determine which headers to generate
s/= @GL_GENERATE_ALLOCA_H@/= 1/ s/= @GL_GENERATE_ALLOCA_H_TRUE@/= 1/
s/= @GL_GENERATE_BYTESWAP_H@/= 1/ s/= @GL_GENERATE_BYTESWAP_H@/= 1/
s/= @GL_GENERATE_EXECINFO_H@/= 1/ s/= @GL_GENERATE_EXECINFO_H@/= 1/
s/= @GL_GENERATE_IEEE754_H@/= 1/
s/= @GL_GENERATE_STDALIGN_H@/= 1/ s/= @GL_GENERATE_STDALIGN_H@/= 1/
s/= @GL_GENERATE_STDDEF_H@/= 1/ s/= @GL_GENERATE_STDDEF_H@/= 1/
s/= @GL_GENERATE_STDINT_H@/= 1/ s/= @GL_GENERATE_STDINT_H@/= 1/
s/= @GL_GENERATE_LIMITS_H@/= 1/ s/= @GL_GENERATE_LIMITS_H@/= 1/
s/= @GL_GENERATE_ERRNO_H@/= / s/= @GL_GENERATE_ERRNO_H@/= /
s/= @GL_GENERATE_LIMITS_H@/= / s/= @GL_GENERATE_LIMITS_H@/= /
s/= @GL_GENERATE_GMP_GMP_H@/= 1/
s/= @GL_GENERATE_MINI_GMP_H@/= 1/
s/\$\(MKDIR_P\) malloc//
# #
# Determine which modules to build and which to omit # Determine which modules to build and which to omit
/^noinst_LIBRARIES /a\ /^noinst_LIBRARIES /a\
@ -413,6 +426,7 @@ OMIT_GNULIB_MODULE_careadlinkat = true\
OMIT_GNULIB_MODULE_cloexec = true\ OMIT_GNULIB_MODULE_cloexec = true\
OMIT_GNULIB_MODULE_dirent = true\ OMIT_GNULIB_MODULE_dirent = true\
OMIT_GNULIB_MODULE_dirfd = true\ OMIT_GNULIB_MODULE_dirfd = true\
OMIT_GNULIB_MODULE_scratch_buffer = true\
OMIT_GNULIB_MODULE_dup2 = true\ OMIT_GNULIB_MODULE_dup2 = true\
OMIT_GNULIB_MODULE_errno = true\ OMIT_GNULIB_MODULE_errno = true\
OMIT_GNULIB_MODULE_euidaccess = true\ OMIT_GNULIB_MODULE_euidaccess = true\
@ -439,7 +453,8 @@ OMIT_GNULIB_MODULE_strtoimax = true\
OMIT_GNULIB_MODULE_strtoll = true\ OMIT_GNULIB_MODULE_strtoll = true\
OMIT_GNULIB_MODULE_symlink = true\ OMIT_GNULIB_MODULE_symlink = true\
OMIT_GNULIB_MODULE_sys_select = true\ OMIT_GNULIB_MODULE_sys_select = true\
OMIT_GNULIB_MODULE_sys_time = true OMIT_GNULIB_MODULE_sys_time = true\
OMIT_GNULIB_MODULE_crypto\/md5 = true
/^arg-nonnull\.h:/,/^[ ][ ]*mv /c\ /^arg-nonnull\.h:/,/^[ ][ ]*mv /c\
arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h\ arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h\
sed -n -e '/GL_ARG_NONNULL/,$$p' < $(top_srcdir)/build-aux/snippet/arg-nonnull.h > $@ sed -n -e '/GL_ARG_NONNULL/,$$p' < $(top_srcdir)/build-aux/snippet/arg-nonnull.h > $@

View File

@ -25,6 +25,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#ifdef MSDOS
extern char **environ;
#endif
#include <sys/file.h> #include <sys/file.h>
#include <fcntl.h> #include <fcntl.h>
@ -1199,6 +1203,11 @@ static CHILD_SETUP_TYPE
child_setup (int in, int out, int err, char **new_argv, char **env, child_setup (int in, int out, int err, char **new_argv, char **env,
const char *current_dir) const char *current_dir)
{ {
#ifdef MSDOS
char *pwd_var;
char *temp;
ptrdiff_t i;
#endif
#ifdef WINDOWSNT #ifdef WINDOWSNT
int cpid; int cpid;
HANDLE handles[3]; HANDLE handles[3];
@ -1251,6 +1260,22 @@ child_setup (int in, int out, int err, char **new_argv, char **env,
exec_failed (new_argv[0], errnum); exec_failed (new_argv[0], errnum);
#else /* MSDOS */ #else /* MSDOS */
i = strlen (current_dir);
pwd_var = xmalloc (i + 5);
temp = pwd_var + 4;
memcpy (pwd_var, "PWD=", 4);
stpcpy (temp, current_dir);
if (i > 2 && IS_DEVICE_SEP (temp[1]) && IS_DIRECTORY_SEP (temp[2]))
{
temp += 2;
i -= 2;
}
/* Strip trailing slashes for PWD, but leave "/" and "//" alone. */
while (i > 2 && IS_DIRECTORY_SEP (temp[i - 1]))
temp[--i] = 0;
pid = run_msdos_command (new_argv, pwd_var + 4, in, out, err, env); pid = run_msdos_command (new_argv, pwd_var + 4, in, out, err, env);
xfree (pwd_var); xfree (pwd_var);
if (pid == -1) if (pid == -1)
@ -1582,11 +1607,13 @@ emacs_spawn (pid_t *newpid, int std_in, int std_out, int std_err,
signal (SIGPROF, SIG_DFL); signal (SIGPROF, SIG_DFL);
#endif #endif
#ifdef subprocesses
/* Stop blocking SIGCHLD in the child. */ /* Stop blocking SIGCHLD in the child. */
unblock_child_signal (oldset); unblock_child_signal (oldset);
if (pty_flag) if (pty_flag)
child_setup_tty (std_out); child_setup_tty (std_out);
#endif
if (std_err < 0) if (std_err < 0)
std_err = std_out; std_err = std_out;

View File

@ -2286,6 +2286,7 @@ permissions. */)
off_t insize = st.st_size; off_t insize = st.st_size;
ssize_t copied; ssize_t copied;
#ifndef MSDOS
for (newsize = 0; newsize < insize; newsize += copied) for (newsize = 0; newsize < insize; newsize += copied)
{ {
/* Copy at most COPY_MAX bytes at a time; this is min /* Copy at most COPY_MAX bytes at a time; this is min
@ -2300,6 +2301,7 @@ permissions. */)
break; break;
maybe_quit (); maybe_quit ();
} }
#endif /* MSDOS */
/* Fall back on read+write if copy_file_range failed, or if the /* Fall back on read+write if copy_file_range failed, or if the
input is empty and so could be a /proc file. read+write will input is empty and so could be a /proc file. read+write will

View File

@ -1874,6 +1874,7 @@ initialize_msdos_display (struct terminal *term)
term->redeem_scroll_bar_hook = 0; term->redeem_scroll_bar_hook = 0;
term->judge_scroll_bars_hook = 0; term->judge_scroll_bars_hook = 0;
term->read_socket_hook = &tty_read_avail_input; /* from keyboard.c */ term->read_socket_hook = &tty_read_avail_input; /* from keyboard.c */
term->defined_color_hook = &tty_defined_color; /* from xfaces.c */
} }
int int
@ -3915,6 +3916,50 @@ readlinkat (int fd, char const *name, char *buffer, size_t buffer_size)
return readlink (name, buffer, buffer_size); return readlink (name, buffer, buffer_size);
} }
int
openat (int fd, const char * path, int oflag, int mode)
{
/* Rely on a hack: an open directory is modeled as file descriptor 0,
as in fstatat. FIXME: Add proper support for openat. */
char fullname[MAXPATHLEN];
if (fd != AT_FDCWD)
{
if (strlen (dir_pathname) + strlen (path) + 1 >= MAXPATHLEN)
{
errno = ENAMETOOLONG;
return -1;
}
sprintf (fullname, "%s/%s", dir_pathname, path);
path = fullname;
}
return open (path, oflag, mode);
}
int
fchmodat (int fd, const char *path, mode_t mode, int flags)
{
/* Rely on a hack: an open directory is modeled as file descriptor 0,
as in fstatat. FIXME: Add proper support for openat. */
char fullname[MAXPATHLEN];
if (fd != AT_FDCWD)
{
if (strlen (dir_pathname) + strlen (path) + 1 >= MAXPATHLEN)
{
errno = ENAMETOOLONG;
return -1;
}
sprintf (fullname, "%s/%s", dir_pathname, path);
path = fullname;
}
return chmod (path, mode);
}
char * char *
careadlinkat (int fd, char const *filename, careadlinkat (int fd, char const *filename,
char *buffer, size_t buffer_size, char *buffer, size_t buffer_size,
@ -3942,6 +3987,63 @@ careadlinkat (int fd, char const *filename,
return buffer; return buffer;
} }
int
futimens (int fd, const struct timespec times[2])
{
struct tm *tm;
struct ftime ft;
time_t t;
block_input ();
if (times[1].tv_sec == UTIME_NOW)
t = time (NULL);
else
t = times[1].tv_sec;
tm = localtime (&t);
ft.ft_tsec = min (29, tm->tm_sec / 2);
ft.ft_min = tm->tm_min;
ft.ft_hour = tm->tm_hour;
ft.ft_day = tm->tm_mday;
ft.ft_month = tm->tm_mon + 1;
ft.ft_year = max (0, tm->tm_year - 80);
unblock_input ();
return setftime (fd, &ft);
}
int
utimensat (int dirfd, const char *pathname,
const struct timespec times[2], int flags)
{
int fd, ret;
char fullname[MAXPATHLEN];
/* Rely on a hack: dirfd in its current usage in Emacs is always
AT_FDCWD. */
if (dirfd != AT_FDCWD)
{
if (strlen (dir_pathname) + strlen (pathname) + 1 >= MAXPATHLEN)
{
errno = ENAMETOOLONG;
return -1;
}
sprintf (fullname, "%s/%s", dir_pathname, pathname);
pathname = fullname;
}
fd = open (pathname, O_WRONLY);
if (fd < 0)
return -1;
ret = futimens (fd, times);
close (fd);
return ret;
}
/* Emulate faccessat(2). */ /* Emulate faccessat(2). */
int int
faccessat (int dirfd, const char * path, int mode, int flags) faccessat (int dirfd, const char * path, int mode, int flags)

View File

@ -86,6 +86,8 @@ typedef int GC;
typedef int Pixmap; typedef int Pixmap;
typedef int Display; typedef int Display;
typedef int Window; typedef int Window;
#define FRAME_X_DISPLAY(ignored) NULL
#define PIX_TYPE unsigned long #define PIX_TYPE unsigned long
#define XDISPLAY #define XDISPLAY

View File

@ -3858,8 +3858,12 @@ Function modeled after x_draw_glyph_string_box ().
NSRectFill (glyphRect); NSRectFill (glyphRect);
/* Draw overlining, etc. on the stretch glyph (or the part /* Draw overlining, etc. on the stretch glyph (or the part of
of the stretch glyph after the cursor). */ the stretch glyph after the cursor). If the glyph has a box,
then decorations will be drawn after drawing the box in
ns_draw_glyph_string, in order to prevent them from being
overwritten by the box. */
if (s->face->box != FACE_NO_BOX)
ns_draw_text_decoration (s, face, fgCol, NSWidth (glyphRect), ns_draw_text_decoration (s, face, fgCol, NSWidth (glyphRect),
NSMinX (glyphRect)); NSMinX (glyphRect));
@ -4105,6 +4109,16 @@ Function modeled after x_draw_glyph_string_box ().
if (!s->for_overlaps && !box_drawn_p && s->face->box != FACE_NO_BOX) if (!s->for_overlaps && !box_drawn_p && s->face->box != FACE_NO_BOX)
ns_dumpglyphs_box_or_relief (s); ns_dumpglyphs_box_or_relief (s);
if (s->face->box != FACE_NO_BOX
&& s->first_glyph->type == STRETCH_GLYPH)
{
NSColor *fg_color;
fg_color = ns_lookup_indexed_color (NS_FACE_FOREGROUND (s->face), s->f);
ns_draw_text_decoration (s, s->face, fg_color,
s->background_width, s->x);
}
ns_unfocus (s->f); ns_unfocus (s->f);
/* Draw surrounding overhangs. */ /* Draw surrounding overhangs. */

View File

@ -40,7 +40,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#endif /* subprocesses */ #else
#define PIPECONN_P(p) false
#define PIPECONN1_P(p) false
#endif
#ifdef HAVE_SETRLIMIT #ifdef HAVE_SETRLIMIT
# include <sys/resource.h> # include <sys/resource.h>
@ -152,6 +155,7 @@ static bool kbd_is_on_hold;
when exiting. */ when exiting. */
bool inhibit_sentinels; bool inhibit_sentinels;
#ifdef subprocesses
union u_sockaddr union u_sockaddr
{ {
struct sockaddr sa; struct sockaddr sa;
@ -164,8 +168,6 @@ union u_sockaddr
#endif #endif
}; };
#ifdef subprocesses
#ifndef SOCK_CLOEXEC #ifndef SOCK_CLOEXEC
# define SOCK_CLOEXEC 0 # define SOCK_CLOEXEC 0
#endif #endif
@ -6536,6 +6538,9 @@ send_process (Lisp_Object proc, const char *buf, ptrdiff_t len,
/* Send this batch, using one or more write calls. */ /* Send this batch, using one or more write calls. */
ptrdiff_t written = 0; ptrdiff_t written = 0;
int outfd = p->outfd; int outfd = p->outfd;
if (outfd < 0)
error ("Output file descriptor of %s is closed",
SDATA (p->name));
eassert (0 <= outfd && outfd < FD_SETSIZE); eassert (0 <= outfd && outfd < FD_SETSIZE);
#ifdef DATAGRAM_SOCKETS #ifdef DATAGRAM_SOCKETS
if (DATAGRAM_CHAN_P (outfd)) if (DATAGRAM_CHAN_P (outfd))
@ -8257,9 +8262,13 @@ If optional argument QUERY is `current', ignore OMP_NUM_THREADS.
If QUERY is `all', also count processors not available. */) If QUERY is `all', also count processors not available. */)
(Lisp_Object query) (Lisp_Object query)
{ {
#ifndef MSDOS
return make_uint (num_processors (EQ (query, Qall) ? NPROC_ALL return make_uint (num_processors (EQ (query, Qall) ? NPROC_ALL
: EQ (query, Qcurrent) ? NPROC_CURRENT : EQ (query, Qcurrent) ? NPROC_CURRENT
: NPROC_CURRENT_OVERRIDABLE)); : NPROC_CURRENT_OVERRIDABLE));
#else
return make_fixnum (1);
#endif
} }
#ifdef subprocesses #ifdef subprocesses
@ -8304,10 +8313,15 @@ open_channel_for_module (Lisp_Object process)
{ {
CHECK_PROCESS (process); CHECK_PROCESS (process);
CHECK_TYPE (PIPECONN_P (process), Qpipe_process_p, process); CHECK_TYPE (PIPECONN_P (process), Qpipe_process_p, process);
#ifndef MSDOS
int fd = dup (XPROCESS (process)->open_fd[SUBPROCESS_STDOUT]); int fd = dup (XPROCESS (process)->open_fd[SUBPROCESS_STDOUT]);
if (fd == -1) if (fd == -1)
report_file_error ("Cannot duplicate file descriptor", Qnil); report_file_error ("Cannot duplicate file descriptor", Qnil);
return fd; return fd;
#else
/* PIPECONN_P returning true shouldn't be possible on MSDOS. */
emacs_abort ();
#endif
} }

View File

@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#endif #endif
#ifdef MSDOS #ifdef MSDOS
#include <time.h> /* struct rpl_timespec */
#include <signal.h> /* sigset_t */ #include <signal.h> /* sigset_t */
#endif #endif

View File

@ -2540,6 +2540,10 @@ w32_draw_glyph_string (struct glyph_string *s)
if (!s->for_overlaps) if (!s->for_overlaps)
{ {
/* Draw relief if not yet drawn. */
if (!relief_drawn_p && s->face->box != FACE_NO_BOX)
w32_draw_glyph_string_box (s);
/* Draw underline. */ /* Draw underline. */
if (s->face->underline) if (s->face->underline)
{ {
@ -2683,10 +2687,6 @@ w32_draw_glyph_string (struct glyph_string *s)
} }
} }
/* Draw relief if not yet drawn. */
if (!relief_drawn_p && s->face->box != FACE_NO_BOX)
w32_draw_glyph_string_box (s);
if (s->prev) if (s->prev)
{ {
struct glyph_string *prev; struct glyph_string *prev;

View File

@ -4045,6 +4045,10 @@ x_draw_glyph_string (struct glyph_string *s)
if (!s->for_overlaps) if (!s->for_overlaps)
{ {
/* Draw relief if not yet drawn. */
if (!relief_drawn_p && s->face->box != FACE_NO_BOX)
x_draw_glyph_string_box (s);
/* Draw underline. */ /* Draw underline. */
if (s->face->underline) if (s->face->underline)
{ {
@ -4200,10 +4204,6 @@ x_draw_glyph_string (struct glyph_string *s)
} }
} }
/* Draw relief if not yet drawn. */
if (!relief_drawn_p && s->face->box != FACE_NO_BOX)
x_draw_glyph_string_box (s);
if (s->prev) if (s->prev)
{ {
struct glyph_string *prev; struct glyph_string *prev;
@ -5144,9 +5144,13 @@ x_detect_focus_change (struct x_display_info *dpyinfo, struct frame *frame,
int focus_state int focus_state
= focus_frame ? focus_frame->output_data.x->focus_state : 0; = focus_frame ? focus_frame->output_data.x->focus_state : 0;
if (!((xi_event->evtype == XI_Enter if (((((xi_event->evtype == XI_Enter
|| xi_event->evtype == XI_Leave) || xi_event->evtype == XI_Leave)
&& (focus_state & FOCUS_EXPLICIT))) && (((XIEnterEvent *) xi_event)->detail
!= XINotifyInferior)
&& !(focus_state & FOCUS_EXPLICIT))
|| xi_event->evtype == XI_FocusIn
|| xi_event->evtype == XI_FocusOut)))
x_focus_changed ((xi_event->evtype == XI_Enter x_focus_changed ((xi_event->evtype == XI_Enter
|| xi_event->evtype == XI_FocusIn || xi_event->evtype == XI_FocusIn
? FocusIn : FocusOut), ? FocusIn : FocusOut),

View File

@ -127,8 +127,9 @@ gcc version 2.95.2 19991024 (release)"
;; Some macOS machines run llvm when you type gcc. (!) ;; Some macOS machines run llvm when you type gcc. (!)
;; We can't even check if it's a symlink; it's a binary placed in ;; We can't even check if it's a symlink; it's a binary placed in
;; "/usr/bin/gcc". So check the output and just skip this test if ;; "/usr/bin/gcc". So check the output and just skip this test if
;; it says "Apple LLVM". ;; it looks like that's the case.
(unless (string-match "Apple LLVM" (car semantic-gcc-test-strings)) (unless (string-match "Apple LLVM\\|Xcode.app"
(car semantic-gcc-test-strings))
(semantic-gcc-test-output-parser)))) (semantic-gcc-test-output-parser))))
;;; gcc-tests.el ends here ;;; gcc-tests.el ends here

View File

@ -26,6 +26,16 @@
(require 'ert) (require 'ert)
(require 'ert-x) (require 'ert-x)
(declare-function sqlite-execute "sqlite.c")
(declare-function sqlite-close "sqlite.c")
(declare-function sqlitep "sqlite.c")
(declare-function sqlite-available-p "sqlite.c")
(declare-function sqlite-finalize "sqlite.c")
(declare-function sqlite-next "sqlite.c")
(declare-function sqlite-more-p "sqlite.c")
(declare-function sqlite-select "sqlite.c")
(declare-function sqlite-open "sqlite.c")
(ert-deftest sqlite-select () (ert-deftest sqlite-select ()
(skip-unless (sqlite-available-p)) (skip-unless (sqlite-available-p))
(let ((db (sqlite-open))) (let ((db (sqlite-open)))