mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-21 18:23:59 +00:00
Merge from trunk, configury not fixed yet.
This commit is contained in:
commit
d14365f941
40
ChangeLog
40
ChangeLog
@ -1,3 +1,43 @@
|
||||
2013-05-13 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* configure.ac (LD_SWITCH_SYSTEM_TEMACS): OpenBSD needs -nopie.
|
||||
Reported privately by Han Boetes <han@boetes.org>.
|
||||
|
||||
2013-05-08 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* lib/makefile.w32-in (ACL_H): New macro.
|
||||
($(BLD)/acl-errno-valid.$(O)): Update dependencies.
|
||||
|
||||
2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
|
||||
* configure.ac: Remove -with-acl option, since Gnulib does that for
|
||||
us now.
|
||||
(LIBACL_LIBS): Remove; no longer needed.
|
||||
* lib/Makefile.am (CLEANFILES, SUFFIXES): New (empty) macros,
|
||||
for the benefit of the new ACL implementation.
|
||||
* lib/makefile.w32-in (GNULIBOBJS): Add $(BLD)/acl-errno-valid.$(O).
|
||||
($(BLD)/acl-errno-valid.$(O)): New rule.
|
||||
* lib/acl-errno-valid.c, lib/acl-internal.h, lib/acl.h:
|
||||
* lib/acl_entries.c, lib/errno.in.h, lib/file-has-acl.c:
|
||||
* lib/qcopy-acl.c, lib/qset-acl.c, m4/acl.m4, m4/errno_h.m4:
|
||||
New files, taken from gnulib.
|
||||
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
|
||||
|
||||
2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* configure.ac (HAVE_XRANDR, HAVE_XINERAMA): Define if available.
|
||||
(XRANDR_LIBS, XINERAMA_LIBS): New AC_SUBSTs.
|
||||
|
||||
2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Merge from gnulib, incorporating:
|
||||
2013-04-30 utimens, utimensat: work around Solaris UTIME_OMIT bug
|
||||
|
||||
2013-05-01 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* make-dist: Keep necessary restrictions on file access.
|
||||
|
||||
2013-04-29 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Merge from gnulib, incorporating:
|
||||
|
@ -1,3 +1,44 @@
|
||||
2013-05-14 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* cus-test.el (cus-test-get-lisp-files): Ignore obsolete/.
|
||||
(cus-test-libs): Fix let-binding of default-directory.
|
||||
(cus-test-noloads): Load all libs for the comparison.
|
||||
|
||||
2013-05-11 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* cus-test.el (cus-test-libs-noloads): Add a few more files.
|
||||
(cus-test-load-libs, cus-test-opts):
|
||||
Add option to load more/all Lisp files.
|
||||
(cus-test-get-lisp-files): Ignore .*.el files.
|
||||
|
||||
2013-05-10 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* cus-test.el (cus-test-libs-noloads): Add some files.
|
||||
(cus-test-get-lisp-files): New function.
|
||||
(cus-test-libs): Add option to load more/all Lisp files.
|
||||
|
||||
2013-05-09 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* cus-test.el: No need to provide bbdb, bbdb-com any more.
|
||||
(cus-test-libs-noloads): Add dunnet in the defvar.
|
||||
(dunnet): Don't always load it.
|
||||
(viper-mode): Only set if interactive.
|
||||
(cus-test-load-custom-loads): Load dunnet if necessary.
|
||||
(cus-test-load-1): New macro, with common code from cus-test-load-libs
|
||||
and cus-test-libs.
|
||||
(cus-test-load-libs, cus-test-libs): Use cus-test-load-1 macro.
|
||||
Update for cus-test-get-autoload-deps changed result.
|
||||
(cus-test-get-autoload-deps): Simplify. Return file names as they
|
||||
appear in loaddefs.el (directory parts are needed now that not all
|
||||
lisp subdirs are in load-path).
|
||||
(cus-test-deps): Explicitly skip dunnet.
|
||||
|
||||
2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
|
||||
* merge-gnulib (GNULIB_MODULES): Add qacl.
|
||||
(GNULIB_TOOL_FLAGS): Do not avoid errno.
|
||||
|
||||
2013-04-01 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Use UTF-8 for most files with non-ASCII characters (Bug#13936).
|
||||
|
@ -30,11 +30,11 @@
|
||||
;;
|
||||
;; The basic tests can be run in batch mode. Invoke them with
|
||||
;;
|
||||
;; src/emacs -batch -l admin/cus-test.el -f cus-test-opts
|
||||
;; src/emacs -batch -l admin/cus-test.el -f cus-test-opts [all]
|
||||
;;
|
||||
;; src/emacs -batch -l admin/cus-test.el -f cus-test-deps
|
||||
;;
|
||||
;; src/emacs -batch -l admin/cus-test.el -f cus-test-libs
|
||||
;; src/emacs -batch -l admin/cus-test.el -f cus-test-libs [all]
|
||||
;;
|
||||
;; src/emacs -batch -l admin/cus-test.el -f cus-test-noloads
|
||||
;;
|
||||
@ -87,43 +87,6 @@
|
||||
;; The command `cus-test-noloads' returns a list of variables which
|
||||
;; are somewhere declared as custom options, but not loaded by
|
||||
;; `custom-load-symbol'.
|
||||
;;
|
||||
;; Some results from October 2002:
|
||||
;;
|
||||
;; 4523 options tested
|
||||
;; The following variables might have problems:
|
||||
;; ps-mule-font-info-database-default
|
||||
;; grep-tree-command
|
||||
;; grep-find-command
|
||||
;;
|
||||
;; 288 features required
|
||||
;; 10 files loaded
|
||||
;; The following load problems appeared:
|
||||
;; (killing x-win (file-error Cannot open load file x-win))
|
||||
;; Symbol faces has loaddefs as custom dependency
|
||||
;; (reftex-index-support reftex-vars (void-function reftex-set-dirty))
|
||||
;; (eshell-script em-script (void-variable eshell-directory-name))
|
||||
;; (pcomplete em-cmpl (void-function eshell-under-windows-p))
|
||||
;; (eshell-ext esh-ext (void-function eshell-under-windows-p))
|
||||
;; ...
|
||||
;;
|
||||
;; 422 libraries had no load errors
|
||||
;; The following load problems appeared:
|
||||
;; (eudc-export error 255)
|
||||
;; (ada-xref error 255)
|
||||
;; (ada-stmt error 255)
|
||||
;;
|
||||
;; The following options were not loaded by custom-load-symbol:
|
||||
;; edt-bottom-scroll-margin
|
||||
;; edt-keep-current-page-delimiter
|
||||
;; edt-top-scroll-margin
|
||||
;; edt-use-EDT-control-key-bindings
|
||||
;; edt-word-entities
|
||||
;; grep-find-use-xargs
|
||||
;; master-mode-hook
|
||||
;; outline-level
|
||||
;; outline-minor-mode-hook
|
||||
;; refill-mode-hook
|
||||
|
||||
|
||||
;;; Code:
|
||||
@ -136,24 +99,23 @@
|
||||
(defvar cus-test-skip-list nil
|
||||
"List of variables to disregard by `cus-test-apropos'.")
|
||||
|
||||
(defvar cus-test-libs-noloads nil
|
||||
"List of libraries not to load by `cus-test-load-libs'.")
|
||||
|
||||
;; The file eudc-export.el loads libraries "bbdb" and "bbdb-com" which
|
||||
;; are not part of GNU Emacs: (locate-library "bbdb") => nil
|
||||
;; We avoid the resulting errors from loading eudc-export.el:
|
||||
(provide 'bbdb)
|
||||
(provide 'bbdb-com)
|
||||
(defvar cus-test-libs-noloads
|
||||
;; Loading dunnet in batch mode leads to a Dead end.
|
||||
;; blessmail writes a file.
|
||||
;; characters cannot be loaded twice ("Category `a' is already defined").
|
||||
'("play/dunnet.el" "emulation/edt-mapper.el"
|
||||
"loadup.el" "mail/blessmail.el" "international/characters.el"
|
||||
"cedet/ede/loaddefs.el" "cedet/semantic/loaddefs.el"
|
||||
"net/tramp-loaddefs.el")
|
||||
"List of files not to load by `cus-test-load-libs'.
|
||||
Names should be as they appear in loaddefs.el.")
|
||||
|
||||
;; This avoids a hang of `cus-test-apropos' in 21.2.
|
||||
;; (add-to-list 'cus-test-skip-list 'sh-alias-alist)
|
||||
|
||||
;; Loading dunnet in batch mode leads to a Dead end.
|
||||
(let (noninteractive) (load "dunnet"))
|
||||
(add-to-list 'cus-test-libs-noloads "dunnet")
|
||||
|
||||
;; Never Viperize.
|
||||
(setq viper-mode nil)
|
||||
(or noninteractive
|
||||
;; Never Viperize.
|
||||
(setq viper-mode nil))
|
||||
|
||||
;; Don't create a file `save-place-file'.
|
||||
(eval-after-load "saveplace"
|
||||
@ -302,49 +264,71 @@ The detected problematic options are stored in `cus-test-errors'."
|
||||
(defun cus-test-load-custom-loads ()
|
||||
"Call `custom-load-symbol' on all atoms."
|
||||
(interactive)
|
||||
(if noninteractive (let (noninteractive) (require 'dunnet)))
|
||||
(mapatoms 'custom-load-symbol)
|
||||
(run-hooks 'cus-test-after-load-libs-hook))
|
||||
|
||||
(defun cus-test-load-libs ()
|
||||
(defmacro cus-test-load-1 (&rest body)
|
||||
`(progn
|
||||
(setq cus-test-libs-errors nil
|
||||
cus-test-libs-loaded nil)
|
||||
,@body
|
||||
(message "%s libraries loaded successfully"
|
||||
(length cus-test-libs-loaded))
|
||||
(if (not cus-test-libs-errors)
|
||||
(message "No load problems encountered")
|
||||
(message "The following load problems appeared:")
|
||||
(cus-test-message cus-test-libs-errors))
|
||||
(run-hooks 'cus-test-after-load-libs-hook)))
|
||||
|
||||
;; This is just cus-test-libs, but loading in the current Emacs process.
|
||||
(defun cus-test-load-libs (&optional more)
|
||||
"Load the libraries with autoloads.
|
||||
Don't load libraries in `cus-test-libs-noloads'."
|
||||
Don't load libraries in `cus-test-libs-noloads'.
|
||||
If optional argument MORE is \"defcustom\", load all files with defcustoms.
|
||||
If it is \"all\", load all Lisp files."
|
||||
(interactive)
|
||||
(setq cus-test-libs-errors nil)
|
||||
(setq cus-test-libs-loaded nil)
|
||||
(mapc
|
||||
(lambda (file)
|
||||
(condition-case alpha
|
||||
(unless (member file cus-test-libs-noloads)
|
||||
(load file)
|
||||
(push file cus-test-libs-loaded))
|
||||
(error
|
||||
(push (cons file alpha) cus-test-libs-errors)
|
||||
(message "Error for %s: %s" file alpha))))
|
||||
(cus-test-get-autoload-deps))
|
||||
(message "%s libraries loaded successfully"
|
||||
(length cus-test-libs-loaded))
|
||||
(if (not cus-test-libs-errors)
|
||||
(message "No load problems encountered")
|
||||
(message "The following load problems appeared:")
|
||||
(cus-test-message cus-test-libs-errors))
|
||||
(run-hooks 'cus-test-after-load-libs-hook))
|
||||
(cus-test-load-1
|
||||
(let ((lispdir (file-name-directory (locate-library "loaddefs"))))
|
||||
(mapc
|
||||
(lambda (file)
|
||||
(condition-case alpha
|
||||
(unless (member file cus-test-libs-noloads)
|
||||
(load (file-name-sans-extension (expand-file-name file lispdir)))
|
||||
(push file cus-test-libs-loaded))
|
||||
(error
|
||||
(push (cons file alpha) cus-test-libs-errors)
|
||||
(message "Error for %s: %s" file alpha))))
|
||||
(if more
|
||||
(cus-test-get-lisp-files (equal more "all"))
|
||||
(cus-test-get-autoload-deps))))))
|
||||
|
||||
(defun cus-test-get-autoload-deps ()
|
||||
"Return the list of libraries with autoloads."
|
||||
"Return the list of files with autoloads."
|
||||
(with-temp-buffer
|
||||
(insert-file-contents (locate-library "loaddefs"))
|
||||
;; This is from `customize-option'.
|
||||
(let (deps file)
|
||||
(while
|
||||
(search-forward "\n;;; Generated autoloads from " nil t)
|
||||
(goto-char (match-end 0))
|
||||
(setq file (buffer-substring (point)
|
||||
(progn (end-of-line) (point))))
|
||||
(setq file (file-name-nondirectory file))
|
||||
(string-match "\\.el\\'" file)
|
||||
(setq file (substring file 0 (match-beginning 0)))
|
||||
(setq deps (nconc deps (list file))))
|
||||
deps)))
|
||||
(let (files)
|
||||
(while (search-forward "\n;;; Generated autoloads from " nil t)
|
||||
(push (buffer-substring (match-end 0) (line-end-position)) files))
|
||||
files)))
|
||||
|
||||
(defun cus-test-get-lisp-files (&optional all)
|
||||
"Return list of all Lisp files with defcustoms.
|
||||
Optional argument ALL non-nil means list all (non-obsolete) Lisp files."
|
||||
(let ((default-directory (expand-file-name "lisp/" source-directory))
|
||||
(msg "Finding files..."))
|
||||
(message "%s" msg)
|
||||
(prog1
|
||||
;; Hack to remove leading "./".
|
||||
(mapcar (lambda (e) (substring e 2))
|
||||
(apply 'process-lines find-program
|
||||
"-name" "obsolete" "-prune" "-o"
|
||||
"-name" "[^.]*.el" ; ignore .dir-locals.el
|
||||
(if all
|
||||
'("-print")
|
||||
(list "-exec" grep-program
|
||||
"-l" "^[ \t]*(defcustom" "{}" "+"))))
|
||||
(message "%sdone" msg))))
|
||||
|
||||
(defun cus-test-message (list)
|
||||
"Print the members of LIST line by line."
|
||||
@ -353,16 +337,21 @@ Don't load libraries in `cus-test-libs-noloads'."
|
||||
|
||||
;;; The routines for batch mode:
|
||||
|
||||
(defun cus-test-opts ()
|
||||
(defun cus-test-opts (&optional all)
|
||||
"Test custom options.
|
||||
This function is suitable for batch mode. E.g., invoke
|
||||
|
||||
src/emacs -batch -l admin/cus-test.el -f cus-test-opts
|
||||
|
||||
in the Emacs source directory."
|
||||
in the Emacs source directory.
|
||||
Normally only tests options belonging to files in loaddefs.el.
|
||||
If optional argument ALL is non-nil, test all files with defcustoms."
|
||||
(interactive)
|
||||
(and noninteractive
|
||||
command-line-args-left
|
||||
(setq all (pop command-line-args-left)))
|
||||
(message "Running %s" 'cus-test-load-libs)
|
||||
(cus-test-load-libs)
|
||||
(cus-test-load-libs (if all "defcustom"))
|
||||
(message "Running %s" 'cus-test-load-custom-loads)
|
||||
(cus-test-load-custom-loads)
|
||||
(message "Running %s" 'cus-test-apropos)
|
||||
@ -392,7 +381,8 @@ in the Emacs source directory."
|
||||
((symbolp load)
|
||||
;; (condition-case nil (require load) (error nil))
|
||||
(condition-case alpha
|
||||
(unless (featurep load)
|
||||
(unless (or (featurep load)
|
||||
(and noninteractive (eq load 'dunnet)))
|
||||
(require load)
|
||||
(push (list symbol load) cus-test-deps-required))
|
||||
(error
|
||||
@ -444,47 +434,54 @@ in the Emacs source directory."
|
||||
(cus-test-message cus-test-deps-errors))
|
||||
(run-hooks 'cus-test-after-load-libs-hook))
|
||||
|
||||
(defun cus-test-libs ()
|
||||
(defun cus-test-libs (&optional more)
|
||||
"Load the libraries with autoloads in separate processes.
|
||||
This function is useful to detect load problems of libraries.
|
||||
It is suitable for batch mode. E.g., invoke
|
||||
|
||||
src/emacs -batch -l admin/cus-test.el -f cus-test-libs
|
||||
./src/emacs -batch -l admin/cus-test.el -f cus-test-libs
|
||||
|
||||
in the Emacs source directory."
|
||||
in the Emacs source directory.
|
||||
|
||||
If optional argument MORE is \"defcustom\", load all files with defcustoms.
|
||||
If it is \"all\", load all Lisp files."
|
||||
(interactive)
|
||||
(with-temp-buffer
|
||||
(setq cus-test-libs-errors nil)
|
||||
(setq cus-test-libs-loaded nil)
|
||||
(cd source-directory)
|
||||
(if (not (file-executable-p "src/emacs"))
|
||||
(error "No Emacs executable in %ssrc" default-directory))
|
||||
(mapc
|
||||
(lambda (file)
|
||||
(condition-case alpha
|
||||
(let (fn cmd status)
|
||||
(setq fn (locate-library file))
|
||||
(if (not fn)
|
||||
(error "Library %s not found" file))
|
||||
(setq cmd (concat "src/emacs -batch -l " fn))
|
||||
(setq status (call-process shell-file-name nil nil nil
|
||||
shell-command-switch cmd))
|
||||
(if (equal status 0)
|
||||
(message "%s" file)
|
||||
(error "%s" status))
|
||||
(push file cus-test-libs-loaded))
|
||||
(error
|
||||
(push (cons file alpha) cus-test-libs-errors)
|
||||
(message "Error for %s: %s" file alpha))))
|
||||
(cus-test-get-autoload-deps))
|
||||
(message "Default Directory: %s" default-directory)
|
||||
(message "%s libraries had no load errors"
|
||||
(length cus-test-libs-loaded))
|
||||
(if (not cus-test-libs-errors)
|
||||
(message "No load problems encountered")
|
||||
(message "The following load problems appeared:")
|
||||
(cus-test-message cus-test-libs-errors))
|
||||
(run-hooks 'cus-test-after-load-libs-hook)))
|
||||
(and noninteractive
|
||||
command-line-args-left
|
||||
(setq more (pop command-line-args-left)))
|
||||
(cus-test-load-1
|
||||
(let* ((default-directory source-directory)
|
||||
(emacs (expand-file-name "src/emacs"))
|
||||
skipped)
|
||||
(or (file-executable-p emacs)
|
||||
(error "No such executable `%s'" emacs))
|
||||
(mapc
|
||||
(lambda (file)
|
||||
(if (member file cus-test-libs-noloads)
|
||||
(push file skipped)
|
||||
(condition-case alpha
|
||||
(let* ((fn (expand-file-name file "lisp/"))
|
||||
(elc (concat fn "c"))
|
||||
status)
|
||||
(if (file-readable-p elc) ; load compiled if present (faster)
|
||||
(setq fn elc)
|
||||
(or (file-readable-p fn)
|
||||
(error "Library %s not found" file)))
|
||||
(if (equal 0 (setq status (call-process emacs nil nil nil
|
||||
"-batch" "-l" fn)))
|
||||
(message "%s" file)
|
||||
(error "%s" status))
|
||||
(push file cus-test-libs-loaded))
|
||||
(error
|
||||
(push (cons file alpha) cus-test-libs-errors)
|
||||
(message "Error for %s: %s" file alpha)))))
|
||||
(if more
|
||||
(cus-test-get-lisp-files (equal more "all"))
|
||||
(cus-test-get-autoload-deps)))
|
||||
(message "Default directory: %s" default-directory)
|
||||
(when skipped
|
||||
(message "The following libraries were skipped:")
|
||||
(cus-test-message skipped)))))
|
||||
|
||||
(defun cus-test-noloads ()
|
||||
"Find custom options not loaded by `custom-load-symbol'.
|
||||
@ -503,7 +500,7 @@ in the Emacs source directory."
|
||||
(cus-test-get-options ""))
|
||||
|
||||
(message "Running %s" 'cus-test-load-libs)
|
||||
(cus-test-load-libs)
|
||||
(cus-test-load-libs "all")
|
||||
(setq cus-test-vars-not-cus-loaded
|
||||
(cus-test-get-options ""))
|
||||
|
||||
@ -517,11 +514,6 @@ in the Emacs source directory."
|
||||
(cus-test-message
|
||||
(sort cus-test-vars-not-cus-loaded 'string<)))))
|
||||
|
||||
;; And last but not least a quiz:
|
||||
;;
|
||||
;; Evaluation of the form (customize-option 'debug-on-error) yields a
|
||||
;; *Customize* buffer with a mismatch mess. Why?
|
||||
|
||||
(provide 'cus-test)
|
||||
|
||||
;;; cus-test.el ends here
|
||||
|
@ -33,7 +33,7 @@ GNULIB_MODULES='
|
||||
getloadavg getopt-gnu gettime gettimeofday
|
||||
ignore-value intprops largefile lstat
|
||||
manywarnings memrchr mktime
|
||||
pselect pthread_sigmask putenv readlink readlinkat
|
||||
pselect pthread_sigmask putenv qacl readlink readlinkat
|
||||
sig2str socklen stat-time stdalign stdarg stdbool stdio
|
||||
strftime strtoimax strtoumax symlink sys_stat
|
||||
sys_time time timer-time timespec-add timespec-sub unsetenv utimens
|
||||
@ -42,7 +42,7 @@ GNULIB_MODULES='
|
||||
|
||||
GNULIB_TOOL_FLAGS='
|
||||
--avoid=dup
|
||||
--avoid=errno --avoid=fchdir --avoid=fcntl --avoid=fstat
|
||||
--avoid=fchdir --avoid=fcntl --avoid=fstat
|
||||
--avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow
|
||||
--avoid=open --avoid=openat-die --avoid=opendir
|
||||
--avoid=raise
|
||||
|
@ -8,7 +8,8 @@ This is 95% of all you will ever need to know.
|
||||
|
||||
** How do I report a bug?
|
||||
Use M-x report-emacs-bug, or send mail to bug-gnu-emacs@gnu.org.
|
||||
If you want to Cc someone, use an "X-Debbugs-CC" header instead.
|
||||
If you want to Cc someone, use an "X-Debbugs-CC" header (or
|
||||
pseudo-header, see below) instead.
|
||||
|
||||
** How do I comment on a bug?
|
||||
Reply to a mail on the bug-gnu-emacs list in the normal way.
|
||||
@ -52,8 +53,8 @@ i) Your report will be assigned a number and generate an automatic reply.
|
||||
ii) Optionally, you can set some database parameters when you first
|
||||
report a bug (see "Setting bug parameters" below).
|
||||
|
||||
iii) If you want to CC: someone, use X-Debbugs-CC: (this is important;
|
||||
see below).
|
||||
iii) If you want to CC: someone, use X-Debbugs-CC: (note this only
|
||||
applies to _new_ reports, not followups).
|
||||
|
||||
Once your report is filed and assigned a number, it is sent out to the
|
||||
bug mailing list. In some cases, it may be appropriate to just file a
|
||||
@ -92,15 +93,18 @@ but create duplicates and errors. (It is possible, but unlikely, that
|
||||
you might want to have a dialog with the owner address, outside of
|
||||
normal bug reporting.)
|
||||
|
||||
** When reporting a bug, to send a Cc to another address
|
||||
** When reporting a new bug, to send a Cc to another address
|
||||
(e.g. bug-cc-mode@gnu.org), do NOT just use a Cc: header.
|
||||
Instead, use "X-Debbugs-CC:". This ensures the Cc address will get a
|
||||
mail with the bug report number in. If you do not do this, each reply
|
||||
in the subsequent discussion will end up creating a new bug.
|
||||
This is annoying.
|
||||
in the subsequent discussion might end up creating a new bug.
|
||||
This is annoying. (So annoying that a form of message-id tracking has
|
||||
been implemented to hopefully stop this happening, but it is still
|
||||
better to use X-Debbugs-CC.)
|
||||
|
||||
(So annoying that a form of message-id tracking has been implemented
|
||||
to hopefully stop this happening, but it is still better to use X-Debbugs-CC.)
|
||||
Like any X-Debbugs- header, this one can also be specified in the
|
||||
pseudo-header (see below), if your mail client does not let you add
|
||||
"X-" headers.
|
||||
|
||||
If a new report contains X-Debbugs-CC in the input, this is
|
||||
converted to a real Cc header in the output. (See Bug#1780,5384)
|
||||
@ -218,8 +222,8 @@ Package: emacs
|
||||
Version: 23.0.60
|
||||
Severity: minor
|
||||
|
||||
This can also include tags. Some things (e.g. submitter) don't seem to
|
||||
work here.
|
||||
This can also include tags, or any X-Debbugs- setting.
|
||||
Some things (e.g. submitter) don't seem to work here.
|
||||
|
||||
Otherwise, send mail to the control server, control@debbugs.gnu.org.
|
||||
At the start of the message body, supply the desired commands, one per
|
||||
|
@ -36,7 +36,7 @@
|
||||
# the same distribution terms as the rest of that program.
|
||||
#
|
||||
# Generated by gnulib-tool.
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=errno --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
@ -63,12 +63,12 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
subdir = lib
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
|
||||
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/c-strtod.m4 \
|
||||
$(top_srcdir)/m4/clock_time.m4 \
|
||||
$(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
|
||||
$(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/clock_time.m4 \
|
||||
$(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/dirent_h.m4 \
|
||||
$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/environ.m4 \
|
||||
$(top_srcdir)/m4/euidaccess.m4 $(top_srcdir)/m4/execinfo.m4 \
|
||||
$(top_srcdir)/m4/extensions.m4 \
|
||||
$(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/euidaccess.m4 \
|
||||
$(top_srcdir)/m4/execinfo.m4 $(top_srcdir)/m4/extensions.m4 \
|
||||
$(top_srcdir)/m4/extern-inline.m4 \
|
||||
$(top_srcdir)/m4/faccessat.m4 $(top_srcdir)/m4/fcntl_h.m4 \
|
||||
$(top_srcdir)/m4/fdatasync.m4 $(top_srcdir)/m4/fdopendir.m4 \
|
||||
@ -122,19 +122,22 @@ am__DEPENDENCIES_1 =
|
||||
am__libgnu_a_SOURCES_DIST = allocator.c c-ctype.h c-ctype.c \
|
||||
c-strcase.h c-strcasecmp.c c-strncasecmp.c careadlinkat.c \
|
||||
close-stream.c md5.c sha1.c sha256.c sha512.c dtoastr.c \
|
||||
dtotimespec.c filemode.c gettext.h gettime.c stat-time.c \
|
||||
strftime.c timespec.c timespec-add.c timespec-sub.c u64.c \
|
||||
unistd.c utimens.c openat-die.c save-cwd.c
|
||||
dtotimespec.c filemode.c gettext.h gettime.c acl-errno-valid.c \
|
||||
file-has-acl.c qcopy-acl.c qset-acl.c stat-time.c strftime.c \
|
||||
timespec.c timespec-add.c timespec-sub.c u64.c unistd.c \
|
||||
utimens.c openat-die.c save-cwd.c
|
||||
am__objects_1 =
|
||||
am_libgnu_a_OBJECTS = allocator.$(OBJEXT) c-ctype.$(OBJEXT) \
|
||||
c-strcasecmp.$(OBJEXT) c-strncasecmp.$(OBJEXT) \
|
||||
careadlinkat.$(OBJEXT) close-stream.$(OBJEXT) md5.$(OBJEXT) \
|
||||
sha1.$(OBJEXT) sha256.$(OBJEXT) sha512.$(OBJEXT) \
|
||||
dtoastr.$(OBJEXT) dtotimespec.$(OBJEXT) filemode.$(OBJEXT) \
|
||||
$(am__objects_1) gettime.$(OBJEXT) stat-time.$(OBJEXT) \
|
||||
strftime.$(OBJEXT) timespec.$(OBJEXT) timespec-add.$(OBJEXT) \
|
||||
timespec-sub.$(OBJEXT) u64.$(OBJEXT) unistd.$(OBJEXT) \
|
||||
utimens.$(OBJEXT) openat-die.$(OBJEXT) save-cwd.$(OBJEXT)
|
||||
$(am__objects_1) gettime.$(OBJEXT) acl-errno-valid.$(OBJEXT) \
|
||||
file-has-acl.$(OBJEXT) qcopy-acl.$(OBJEXT) qset-acl.$(OBJEXT) \
|
||||
stat-time.$(OBJEXT) strftime.$(OBJEXT) timespec.$(OBJEXT) \
|
||||
timespec-add.$(OBJEXT) timespec-sub.$(OBJEXT) u64.$(OBJEXT) \
|
||||
unistd.$(OBJEXT) utimens.$(OBJEXT) openat-die.$(OBJEXT) \
|
||||
save-cwd.$(OBJEXT)
|
||||
libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS)
|
||||
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@ -192,6 +195,13 @@ ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
|
||||
EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
|
||||
ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
|
||||
ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||
ERRNO_H = @ERRNO_H@
|
||||
EXECINFO_H = @EXECINFO_H@
|
||||
EXEEXT = @EXEEXT@
|
||||
FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
|
||||
@ -623,7 +633,6 @@ LD_SWITCH_SYSTEM = @LD_SWITCH_SYSTEM@
|
||||
LD_SWITCH_SYSTEM_TEMACS = @LD_SWITCH_SYSTEM_TEMACS@
|
||||
LD_SWITCH_X_SITE = @LD_SWITCH_X_SITE@
|
||||
LD_SWITCH_X_SITE_RPATH = @LD_SWITCH_X_SITE_RPATH@
|
||||
LIBACL_LIBS = @LIBACL_LIBS@
|
||||
LIBGIF = @LIBGIF@
|
||||
LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@
|
||||
LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@
|
||||
@ -655,6 +664,7 @@ LIBXSM = @LIBXSM@
|
||||
LIBXTR6 = @LIBXTR6@
|
||||
LIBXT_OTHER = @LIBXT_OTHER@
|
||||
LIBX_OTHER = @LIBX_OTHER@
|
||||
LIB_ACL = @LIB_ACL@
|
||||
LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
|
||||
LIB_EACCESS = @LIB_EACCESS@
|
||||
LIB_EXECINFO = @LIB_EXECINFO@
|
||||
@ -672,6 +682,7 @@ MAKEINFO = @MAKEINFO@
|
||||
MKDEPDIR = @MKDEPDIR@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
|
||||
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
|
||||
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
|
||||
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
|
||||
NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
|
||||
@ -688,6 +699,7 @@ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
|
||||
NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
|
||||
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
|
||||
NEXT_DIRENT_H = @NEXT_DIRENT_H@
|
||||
NEXT_ERRNO_H = @NEXT_ERRNO_H@
|
||||
NEXT_FCNTL_H = @NEXT_FCNTL_H@
|
||||
NEXT_GETOPT_H = @NEXT_GETOPT_H@
|
||||
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
|
||||
@ -873,6 +885,7 @@ UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
|
||||
UNEXEC_OBJ = @UNEXEC_OBJ@
|
||||
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
|
||||
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
|
||||
USE_ACL = @USE_ACL@
|
||||
VERSION = @VERSION@
|
||||
VMLIMIT_OBJ = @VMLIMIT_OBJ@
|
||||
W32_LIBS = @W32_LIBS@
|
||||
@ -890,9 +903,13 @@ WINDRES = @WINDRES@
|
||||
WINT_T_SUFFIX = @WINT_T_SUFFIX@
|
||||
XFT_CFLAGS = @XFT_CFLAGS@
|
||||
XFT_LIBS = @XFT_LIBS@
|
||||
XINERAMA_CFLAGS = @XINERAMA_CFLAGS@
|
||||
XINERAMA_LIBS = @XINERAMA_LIBS@
|
||||
XMENU_OBJ = @XMENU_OBJ@
|
||||
XMKMF = @XMKMF@
|
||||
XOBJ = @XOBJ@
|
||||
XRANDR_CFLAGS = @XRANDR_CFLAGS@
|
||||
XRANDR_LIBS = @XRANDR_LIBS@
|
||||
X_TOOLKIT_TYPE = @X_TOOLKIT_TYPE@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
@ -981,21 +998,23 @@ x_default_search_path = @x_default_search_path@
|
||||
# statements but through direct file reference. Therefore this snippet must be
|
||||
# present in all Makefile.am that need it. This is ensured by the applicability
|
||||
# 'all' defined above.
|
||||
BUILT_SOURCES = $(ALLOCA_H) dirent.h $(EXECINFO_H) fcntl.h $(GETOPT_H) \
|
||||
inttypes.h signal.h arg-nonnull.h c++defs.h warn-on-use.h \
|
||||
$(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) \
|
||||
stdio.h stdlib.h string.h sys/select.h sys/stat.h sys/time.h \
|
||||
time.h unistd.h
|
||||
BUILT_SOURCES = $(ALLOCA_H) dirent.h $(ERRNO_H) $(EXECINFO_H) fcntl.h \
|
||||
$(GETOPT_H) inttypes.h signal.h arg-nonnull.h c++defs.h \
|
||||
warn-on-use.h $(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) \
|
||||
$(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h sys/select.h \
|
||||
sys/stat.h sys/time.h time.h unistd.h
|
||||
CLEANFILES =
|
||||
EXTRA_DIST = alloca.in.h allocator.h openat-priv.h openat-proc.c \
|
||||
careadlinkat.h close-stream.h md5.h sha1.h sha256.h sha512.h \
|
||||
dirent.in.h dosname.h ftoastr.c ftoastr.h dup2.c euidaccess.c \
|
||||
execinfo.c execinfo.in.h at-func.c faccessat.c fcntl.in.h \
|
||||
fdatasync.c fdopendir.c filemode.h fpending.c fpending.h \
|
||||
at-func.c fstatat.c fsync.c getgroups.c getloadavg.c getopt.c \
|
||||
getopt.in.h getopt1.c getopt_int.h gettimeofday.c \
|
||||
group-member.c ignore-value.h intprops.h inttypes.in.h lstat.c \
|
||||
memrchr.c mktime-internal.h mktime.c openat.h pathmax.h \
|
||||
pselect.c pthread_sigmask.c putenv.c readlink.c at-func.c \
|
||||
dirent.in.h dosname.h ftoastr.c ftoastr.h dup2.c errno.in.h \
|
||||
euidaccess.c execinfo.c execinfo.in.h at-func.c faccessat.c \
|
||||
fcntl.in.h fdatasync.c fdopendir.c filemode.h fpending.c \
|
||||
fpending.h at-func.c fstatat.c fsync.c getgroups.c \
|
||||
getloadavg.c getopt.c getopt.in.h getopt1.c getopt_int.h \
|
||||
gettimeofday.c group-member.c ignore-value.h intprops.h \
|
||||
inttypes.in.h lstat.c memrchr.c mktime-internal.h mktime.c \
|
||||
openat.h pathmax.h pselect.c pthread_sigmask.c putenv.c \
|
||||
acl-internal.h acl.h acl_entries.c readlink.c at-func.c \
|
||||
readlinkat.c root-uid.h sig2str.c sig2str.h signal.in.h \
|
||||
$(top_srcdir)/build-aux/snippet/_Noreturn.h \
|
||||
$(top_srcdir)/build-aux/snippet/arg-nonnull.h \
|
||||
@ -1010,21 +1029,23 @@ EXTRA_DIST = alloca.in.h allocator.h openat-priv.h openat-proc.c \
|
||||
xalloc-oversized.h
|
||||
MOSTLYCLEANDIRS = sys sys
|
||||
MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t dirent.h \
|
||||
dirent.h-t execinfo.h execinfo.h-t fcntl.h fcntl.h-t getopt.h \
|
||||
getopt.h-t inttypes.h inttypes.h-t signal.h signal.h-t \
|
||||
arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \
|
||||
dirent.h-t errno.h errno.h-t execinfo.h execinfo.h-t fcntl.h \
|
||||
fcntl.h-t getopt.h getopt.h-t inttypes.h inttypes.h-t signal.h \
|
||||
signal.h-t arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \
|
||||
warn-on-use.h warn-on-use.h-t stdalign.h stdalign.h-t stdarg.h \
|
||||
stdarg.h-t stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h \
|
||||
stdint.h-t stdio.h stdio.h-t stdlib.h stdlib.h-t string.h \
|
||||
string.h-t sys/select.h sys/select.h-t sys/stat.h sys/stat.h-t \
|
||||
sys/time.h sys/time.h-t time.h time.h-t unistd.h unistd.h-t
|
||||
noinst_LIBRARIES = libgnu.a
|
||||
SUFFIXES =
|
||||
AM_CFLAGS = $(PROFILING_CFLAGS) $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
DEFAULT_INCLUDES = -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/src
|
||||
libgnu_a_SOURCES = allocator.c c-ctype.h c-ctype.c c-strcase.h \
|
||||
c-strcasecmp.c c-strncasecmp.c careadlinkat.c close-stream.c \
|
||||
md5.c sha1.c sha256.c sha512.c dtoastr.c dtotimespec.c \
|
||||
filemode.c $(am__append_1) gettime.c stat-time.c strftime.c \
|
||||
filemode.c $(am__append_1) gettime.c acl-errno-valid.c \
|
||||
file-has-acl.c qcopy-acl.c qset-acl.c stat-time.c strftime.c \
|
||||
timespec.c timespec-add.c timespec-sub.c u64.c unistd.c \
|
||||
utimens.c openat-die.c save-cwd.c
|
||||
libgnu_a_LIBADD = $(gl_LIBOBJS)
|
||||
@ -1034,9 +1055,10 @@ EXTRA_libgnu_a_SOURCES = openat-proc.c ftoastr.c dup2.c euidaccess.c \
|
||||
fpending.c at-func.c fstatat.c fsync.c getgroups.c \
|
||||
getloadavg.c getopt.c getopt1.c gettimeofday.c group-member.c \
|
||||
lstat.c memrchr.c mktime.c pselect.c pthread_sigmask.c \
|
||||
putenv.c readlink.c at-func.c readlinkat.c sig2str.c stat.c \
|
||||
strtoimax.c strtol.c strtoll.c strtol.c strtoul.c strtoull.c \
|
||||
strtoimax.c strtoumax.c symlink.c time_r.c unsetenv.c
|
||||
putenv.c acl_entries.c readlink.c at-func.c readlinkat.c \
|
||||
sig2str.c stat.c strtoimax.c strtol.c strtoll.c strtol.c \
|
||||
strtoul.c strtoull.c strtoimax.c strtoumax.c symlink.c \
|
||||
time_r.c unsetenv.c
|
||||
|
||||
# Because this Makefile snippet defines a variable used by other
|
||||
# gnulib Makefile snippets, it must be present in all Makefile.am that
|
||||
@ -1094,6 +1116,8 @@ mostlyclean-compile:
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acl-errno-valid.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acl_entries.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocator.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/at-func.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Po@am__quote@
|
||||
@ -1109,6 +1133,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdatasync.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-has-acl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemode.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpending.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Po@am__quote@
|
||||
@ -1130,6 +1155,8 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pselect.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pthread_sigmask.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qcopy-acl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qset-acl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlinkat.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Po@am__quote@
|
||||
@ -1276,6 +1303,7 @@ mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
@ -1421,6 +1449,28 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
|
||||
# We need the following in order to create <errno.h> when the system
|
||||
# doesn't have one that is POSIX compliant.
|
||||
@GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ < $(srcdir)/errno.in.h; \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ } > $@-t && \
|
||||
@GL_GENERATE_ERRNO_H_TRUE@ mv $@-t $@
|
||||
@GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status
|
||||
@GL_GENERATE_ERRNO_H_FALSE@ rm -f $@
|
||||
|
||||
# We need the following in order to create <execinfo.h> when the system
|
||||
# doesn't have one that works.
|
||||
@GL_GENERATE_EXECINFO_H_TRUE@execinfo.h: execinfo.in.h $(top_builddir)/config.status
|
||||
|
2
autogen/aclocal.m4
vendored
2
autogen/aclocal.m4
vendored
@ -985,6 +985,7 @@ AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([m4/00gnulib.m4])
|
||||
m4_include([m4/acl.m4])
|
||||
m4_include([m4/alloca.m4])
|
||||
m4_include([m4/c-strtod.m4])
|
||||
m4_include([m4/clock_time.m4])
|
||||
@ -992,6 +993,7 @@ m4_include([m4/close-stream.m4])
|
||||
m4_include([m4/dirent_h.m4])
|
||||
m4_include([m4/dup2.m4])
|
||||
m4_include([m4/environ.m4])
|
||||
m4_include([m4/errno_h.m4])
|
||||
m4_include([m4/euidaccess.m4])
|
||||
m4_include([m4/execinfo.m4])
|
||||
m4_include([m4/extensions.m4])
|
||||
|
@ -209,6 +209,75 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if you have the `access' function. */
|
||||
#undef HAVE_ACCESS
|
||||
|
||||
/* Define to 1 if you have the `aclsort' function. */
|
||||
#undef HAVE_ACLSORT
|
||||
|
||||
/* Define to 1 if you have the <aclv.h> header file. */
|
||||
#undef HAVE_ACLV_H
|
||||
|
||||
/* Define to 1 if you have the `aclx_get' function. */
|
||||
#undef HAVE_ACLX_GET
|
||||
|
||||
/* Define to 1 if you have the `acl_copy_ext_native' function. */
|
||||
#undef HAVE_ACL_COPY_EXT_NATIVE
|
||||
|
||||
/* Define to 1 if you have the `acl_create_entry_np' function. */
|
||||
#undef HAVE_ACL_CREATE_ENTRY_NP
|
||||
|
||||
/* Define to 1 if you have the `acl_delete_def_file' function. */
|
||||
#undef HAVE_ACL_DELETE_DEF_FILE
|
||||
|
||||
/* Define to 1 if you have the `acl_delete_fd_np' function. */
|
||||
#undef HAVE_ACL_DELETE_FD_NP
|
||||
|
||||
/* Define to 1 if you have the `acl_delete_file_np' function. */
|
||||
#undef HAVE_ACL_DELETE_FILE_NP
|
||||
|
||||
/* Define to 1 if you have the `acl_entries' function. */
|
||||
#undef HAVE_ACL_ENTRIES
|
||||
|
||||
/* Define to 1 if you have the `acl_extended_file' function. */
|
||||
#undef HAVE_ACL_EXTENDED_FILE
|
||||
|
||||
/* Define to 1 if the constant ACL_FIRST_ENTRY exists. */
|
||||
#undef HAVE_ACL_FIRST_ENTRY
|
||||
|
||||
/* Define to 1 if you have the `acl_free' function. */
|
||||
#undef HAVE_ACL_FREE
|
||||
|
||||
/* Define to 1 if you have the `acl_free_text' function. */
|
||||
#undef HAVE_ACL_FREE_TEXT
|
||||
|
||||
/* Define to 1 if you have the `acl_from_mode' function. */
|
||||
#undef HAVE_ACL_FROM_MODE
|
||||
|
||||
/* Define to 1 if you have the `acl_from_text' function. */
|
||||
#undef HAVE_ACL_FROM_TEXT
|
||||
|
||||
/* Define to 1 if you have the `acl_get_fd' function. */
|
||||
#undef HAVE_ACL_GET_FD
|
||||
|
||||
/* Define to 1 if you have the `acl_get_file' function. */
|
||||
#undef HAVE_ACL_GET_FILE
|
||||
|
||||
/* Define to 1 if you have the <acl/libacl.h> header file. */
|
||||
#undef HAVE_ACL_LIBACL_H
|
||||
|
||||
/* Define to 1 if you have the `acl_set_fd' function. */
|
||||
#undef HAVE_ACL_SET_FD
|
||||
|
||||
/* Define to 1 if you have the `acl_set_file' function. */
|
||||
#undef HAVE_ACL_SET_FILE
|
||||
|
||||
/* Define to 1 if you have the `acl_to_short_text' function. */
|
||||
#undef HAVE_ACL_TO_SHORT_TEXT
|
||||
|
||||
/* Define to 1 if you have the `acl_trivial' function. */
|
||||
#undef HAVE_ACL_TRIVIAL
|
||||
|
||||
/* Define to 1 if the ACL type ACL_TYPE_EXTENDED exists. */
|
||||
#undef HAVE_ACL_TYPE_EXTENDED
|
||||
|
||||
/* Define to 1 if the file /usr/lpp/X11/bin/smt.exp exists. */
|
||||
#undef HAVE_AIX_SMT_EXP
|
||||
|
||||
@ -376,6 +445,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if you have the `faccessat' function. */
|
||||
#undef HAVE_FACCESSAT
|
||||
|
||||
/* Define to 1 if you have the `facl' function. */
|
||||
#undef HAVE_FACL
|
||||
|
||||
/* Define to 1 if you have the `fdatasync' function. */
|
||||
#undef HAVE_FDATASYNC
|
||||
|
||||
@ -415,6 +487,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if using GConf. */
|
||||
#undef HAVE_GCONF
|
||||
|
||||
/* Define to 1 if you have the `getacl' function. */
|
||||
#undef HAVE_GETACL
|
||||
|
||||
/* Define to 1 if you have the `getaddrinfo' function. */
|
||||
#undef HAVE_GETADDRINFO
|
||||
|
||||
@ -749,9 +824,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if you have the <png.h> header file. */
|
||||
#undef HAVE_PNG_H
|
||||
|
||||
/* Define to 1 if using POSIX ACL support. */
|
||||
#undef HAVE_POSIX_ACL
|
||||
|
||||
/* Define to 1 if you have the `posix_memalign' function. */
|
||||
#undef HAVE_POSIX_MEMALIGN
|
||||
|
||||
@ -858,6 +930,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if `speed_t' is declared by <termios.h>. */
|
||||
#undef HAVE_SPEED_T
|
||||
|
||||
/* Define to 1 if you have the `statacl' function. */
|
||||
#undef HAVE_STATACL
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
@ -946,6 +1021,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if you have the `sync' function. */
|
||||
#undef HAVE_SYNC
|
||||
|
||||
/* Define to 1 if you have the <sys/acl.h> header file. */
|
||||
#undef HAVE_SYS_ACL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/bitypes.h> header file. */
|
||||
#undef HAVE_SYS_BITYPES_H
|
||||
|
||||
@ -1106,15 +1184,27 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* Define to 1 if XIM is available */
|
||||
#undef HAVE_XIM
|
||||
|
||||
/* Define to 1 if you have the Xinerama extension. */
|
||||
#undef HAVE_XINERAMA
|
||||
|
||||
/* Define to 1 if you have the Xkb extension. */
|
||||
#undef HAVE_XKB
|
||||
|
||||
/* Define to 1 if you have the Xpm library (-lXpm). */
|
||||
#undef HAVE_XPM
|
||||
|
||||
/* Define to 1 if you have the XRandr extension. */
|
||||
#undef HAVE_XRANDR
|
||||
|
||||
/* Define to 1 if you have the `XrmSetDatabase' function. */
|
||||
#undef HAVE_XRMSETDATABASE
|
||||
|
||||
/* Define to 1 if you have the `XRRGetOutputPrimary' function. */
|
||||
#undef HAVE_XRRGETOUTPUTPRIMARY
|
||||
|
||||
/* Define to 1 if you have the `XRRGetScreenResourcesCurrent' function. */
|
||||
#undef HAVE_XRRGETSCREENRESOURCESCURRENT
|
||||
|
||||
/* Define to 1 if you have the `XScreenNumberOfScreen' function. */
|
||||
#undef HAVE_XSCREENNUMBEROFSCREEN
|
||||
|
||||
@ -1397,6 +1487,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* How to get a user's full name. */
|
||||
#undef USER_FULL_NAME
|
||||
|
||||
/* Define to nonzero if you want access control list support. */
|
||||
#undef USE_ACL
|
||||
|
||||
/* Define to 1 if using GTK. */
|
||||
#undef USE_GTK
|
||||
|
||||
|
1177
autogen/configure
vendored
1177
autogen/configure
vendored
File diff suppressed because it is too large
Load Diff
78
configure.ac
78
configure.ac
@ -199,7 +199,6 @@ OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support])
|
||||
OPTION_DEFAULT_ON([gconf],[don't compile with GConf support])
|
||||
OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings support])
|
||||
OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support])
|
||||
OPTION_DEFAULT_ON([acl],[don't compile with ACL support])
|
||||
OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
|
||||
OPTION_DEFAULT_ON([inotify],[don't compile with inotify (file-watch) support])
|
||||
|
||||
@ -1035,7 +1034,7 @@ case "$opsys" in
|
||||
;;
|
||||
|
||||
openbsd)
|
||||
## Han Boetes <han@mijncomputer.nl> says this is necessary,
|
||||
## Han Boetes <han@boetes.org> says this is necessary,
|
||||
## otherwise Emacs dumps core on elf systems.
|
||||
LD_SWITCH_SYSTEM="-Z"
|
||||
;;
|
||||
@ -2297,23 +2296,6 @@ if test "$ac_cv_func_inotify_init1" = yes; then
|
||||
AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.])
|
||||
fi
|
||||
|
||||
dnl POSIX ACL support: provided by libacl on GNU/Linux, by libc on FreeBSD.
|
||||
HAVE_POSIX_ACL=no
|
||||
LIBACL_LIBS=
|
||||
if test "${with_acl}" = "yes"; then
|
||||
AC_CHECK_LIB([acl], [acl_set_file], HAVE_POSIX_ACL=yes, HAVE_POSIX_ACL=no)
|
||||
if test "$HAVE_POSIX_ACL" = yes; then
|
||||
AC_DEFINE(HAVE_POSIX_ACL, 1, [Define to 1 if using POSIX ACL support.])
|
||||
LIBACL_LIBS=-lacl
|
||||
else
|
||||
AC_CHECK_FUNC(acl_set_file, HAVE_POSIX_ACL=yes, HAVE_POSIX_ACL=no)
|
||||
if test "$HAVE_POSIX_ACL" = yes; then
|
||||
AC_DEFINE(HAVE_POSIX_ACL, 1, [Define to 1 if using POSIX ACL support.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LIBACL_LIBS)
|
||||
|
||||
dnl Do not put whitespace before the #include statements below.
|
||||
dnl Older compilers (eg sunos4 cc) choke on it.
|
||||
HAVE_XAW3D=no
|
||||
@ -2999,6 +2981,56 @@ if test "${HAVE_X11}" = "yes"; then
|
||||
fi
|
||||
AC_SUBST(LIBXSM)
|
||||
|
||||
### Use XRandr (-lXrandr) if available
|
||||
HAVE_XRANDR=no
|
||||
if test "${HAVE_X11}" = "yes"; then
|
||||
XRANDR_REQUIRED=1.2.2
|
||||
XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
|
||||
PKG_CHECK_MODULES(XRANDR, $XRANDR_MODULES, HAVE_XRANDR=yes, HAVE_XRANDR=no)
|
||||
if test $HAVE_XRANDR = no; then
|
||||
# Test old way in case pkg-config doesn't have it (older machines).
|
||||
AC_CHECK_HEADER(X11/extensions/Xrandr.h,
|
||||
[AC_CHECK_LIB(Xrandr, XRRQueryExtension, HAVE_XRANDR=yes)])
|
||||
if test $HAVE_XRANDR = yes; then
|
||||
XRANDR_LIBS=-lXrandr
|
||||
AC_SUBST(XRANDR_LIBS)
|
||||
fi
|
||||
fi
|
||||
if test $HAVE_XRANDR = yes; then
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
SAVE_LIBS="$LIBS"
|
||||
CFLAGS="$XRANDR_CFLAGS $CFLAGS"
|
||||
LIBS="$XRANDR_LIBS $LIBS"
|
||||
AC_CHECK_FUNCS(XRRGetOutputPrimary XRRGetScreenResourcesCurrent)
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
LIBS="$SAVE_LIBS"
|
||||
|
||||
AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have the XRandr extension.])
|
||||
fi
|
||||
fi
|
||||
|
||||
### Use Xinerama (-lXinerama) if available
|
||||
HAVE_XINERAMA=no
|
||||
if test "${HAVE_X11}" = "yes"; then
|
||||
XINERAMA_REQUIRED=1.0.2
|
||||
XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
|
||||
PKG_CHECK_MODULES(XINERAMA, $XINERAMA_MODULES, HAVE_XINERAMA=yes,
|
||||
HAVE_XINERAMA=no)
|
||||
if test $HAVE_XINERAMA = no; then
|
||||
# Test old way in case pkg-config doesn't have it (older machines).
|
||||
AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||
[AC_CHECK_LIB(Xinerama, XineramaQueryExtension, HAVE_XINERAMA=yes)])
|
||||
if test $HAVE_XINERAMA = yes; then
|
||||
XINERAMA_LIBS=-lXinerama
|
||||
AC_SUBST(XINERAMA_LIBS)
|
||||
fi
|
||||
fi
|
||||
if test $HAVE_XINERAMA = yes; then
|
||||
AC_DEFINE(HAVE_XINERAMA, 1, [Define to 1 if you have the Xinerama extension.])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
### Use libxml (-lxml2) if available
|
||||
### mingw32 doesn't use -lxml2, since it loads the library dynamically.
|
||||
HAVE_LIBXML2=no
|
||||
@ -4483,6 +4515,9 @@ case "$opsys" in
|
||||
## each); under Cocoa 31 commands are required.
|
||||
if test "$HAVE_NS" = "yes"; then
|
||||
libs_nsgui="-framework AppKit"
|
||||
if test "$NS_IMPL_COCOA" = "yes"; then
|
||||
libs_nsgui="$libs_nsgui -framework IOKit"
|
||||
fi
|
||||
headerpad_extra=6C8
|
||||
else
|
||||
libs_nsgui=
|
||||
@ -4507,12 +4542,17 @@ case "$opsys" in
|
||||
gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
|
||||
|
||||
mingw32)
|
||||
## MinGW64 does not prepend an underscore to symbols, so we must
|
||||
## pass a different -entry switch to linker. FIXME: It is better
|
||||
## to make the entry points the same by changing unexw32.c.
|
||||
case "$canonical" in
|
||||
x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;;
|
||||
*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
|
||||
|
||||
*) LD_SWITCH_SYSTEM_TEMACS= ;;
|
||||
esac
|
||||
|
||||
|
@ -1,3 +1,27 @@
|
||||
2013-05-14 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* ack.texi (Acknowledgments): Don't mention obsolete sup-mouse.el.
|
||||
|
||||
2013-05-09 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* sending.texi (Mail Sending): Fix typo.
|
||||
|
||||
* windows.texi (Change Window): Fix typo.
|
||||
|
||||
* custom.texi (Changing a Variable): Fix typo.
|
||||
|
||||
* trouble.texi (Contributing): Remove obsolete info re pretesters.
|
||||
|
||||
2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
`write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
|
||||
* cmdargs.texi (Initial Options):
|
||||
* files.texi (Customize Save): Document this.
|
||||
|
||||
2013-05-04 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* calendar.texi (Importing Diary): Mention diary-from-outlook-function.
|
||||
|
||||
2013-03-17 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
doc: convert some TeX accents to UTF-8
|
||||
|
@ -1058,8 +1058,7 @@ contributed extensively to the MS-Windows port of Emacs.
|
||||
|
||||
@item
|
||||
Wolfgang Rupprecht wrote Emacs 19's floating-point support (including
|
||||
@file{float-sup.el} and @file{floatfns.c}), and @file{sup-mouse.el},
|
||||
support for the Supdup mouse on lisp machines.
|
||||
@file{float-sup.el} and @file{floatfns.c}).
|
||||
|
||||
@item
|
||||
Kevin Ryde wrote @file{info-xref.el}, a library for checking
|
||||
|
@ -1542,7 +1542,8 @@ variety of other formats.
|
||||
messages. While viewing such a message in Rmail or Gnus, do @kbd{M-x
|
||||
diary-from-outlook} to import the entry. You can make this command
|
||||
recognize additional appointment message formats by customizing the
|
||||
variable @code{diary-outlook-formats}.
|
||||
variable @code{diary-outlook-formats}. Other mail clients can set
|
||||
@code{diary-from-outlook-function} to an appropriate value.
|
||||
|
||||
@c FIXME the name of the RFC is hardly very relevant.
|
||||
@cindex iCalendar support
|
||||
|
@ -251,7 +251,8 @@ terminal's standard input stream (@code{stdin}) instead.
|
||||
but @file{site-start.el} is loaded nonetheless. It also causes Emacs
|
||||
to exit after processing all the command options. In addition, it
|
||||
disables auto-saving except in buffers for which auto-saving is
|
||||
explicitly requested.
|
||||
explicitly requested, and when saving files it omits the @code{fsync}
|
||||
system call unless otherwise requested.
|
||||
|
||||
@item --script @var{file}
|
||||
@opindex --script
|
||||
|
@ -345,7 +345,7 @@ hidden, nor on subgroups that are hidden or not visible in the buffer.
|
||||
@kindex C-x C-c @r{(customization buffer)}
|
||||
@findex Custom-set
|
||||
@findex Custom-save
|
||||
The command @kbd{C-c C-c} (@code{Custom-set}) is equivalent using to
|
||||
The command @kbd{C-c C-c} (@code{Custom-set}) is equivalent to using
|
||||
the @samp{[Set for Current Session]} button. The command @kbd{C-x
|
||||
C-s} (@code{Custom-save}) is like using the @samp{[Save for Future
|
||||
Sessions]} button.
|
||||
|
@ -705,13 +705,27 @@ setting the latter variable, you can control how these modes handle
|
||||
final newlines.
|
||||
|
||||
@vindex write-region-inhibit-fsync
|
||||
When Emacs saves a file, it invokes the @code{fsync} system call to
|
||||
force the data immediately out to disk. This is important for safety
|
||||
if the system crashes or in case of power outage. However, it can be
|
||||
disruptive on laptops using power saving, as it may force a disk
|
||||
spin-up each time you save a file. If you accept an increased risk of
|
||||
data loss, you can set @code{write-region-inhibit-fsync} to a
|
||||
non-@code{nil} value to disable the synchronization.
|
||||
Normally, when a program writes a file, the operating system briefly
|
||||
caches the file's data in main memory before committing the data to
|
||||
disk. This can greatly improve performance; for example, when running
|
||||
on laptops, it can avoid a disk spin-up each time a file is written.
|
||||
However, it risks data loss if the operating system crashes before
|
||||
committing the cache to disk.
|
||||
|
||||
To lessen this risk, Emacs can invoke the @code{fsync} system call
|
||||
after saving a file. Using @code{fsync} does not eliminate the risk
|
||||
of data loss, partly because many systems do not implement
|
||||
@code{fsync} properly, and partly because Emacs's file-saving
|
||||
procedure typically relies also on directory updates that might not
|
||||
survive a crash even if @code{fsync} works properly.
|
||||
|
||||
The @code{write-region-inhibit-fsync} variable controls whether
|
||||
Emacs invokes @code{fsync} after saving a file. The variable's
|
||||
default value is @code{nil} when Emacs is interactive, and @code{t}
|
||||
when Emacs runs in batch mode.
|
||||
|
||||
Emacs never uses @code{fsync} when writing auto-save files, as these
|
||||
files might lose data anyway.
|
||||
|
||||
@node Interlocking
|
||||
@subsection Protection against Simultaneous Editing
|
||||
|
@ -374,7 +374,7 @@ This is the default, unless you have already set the variables for
|
||||
sending mail via @code{smtpmail-send-it} (see below).
|
||||
|
||||
@item smtpmail-send-it
|
||||
Send mail using the through an external mail host, such as your
|
||||
Send mail through an external mail host, such as your
|
||||
Internet service provider's outgoing SMTP mail server. If you have
|
||||
not told Emacs how to contact the SMTP server, it prompts for this
|
||||
information, which is saved in the @code{smtpmail-smtp-server} variable
|
||||
|
@ -1138,12 +1138,9 @@ form that is clearly safe to install.
|
||||
@section Contributing to Emacs Development
|
||||
@cindex contributing to Emacs
|
||||
|
||||
If you would like to help pretest Emacs releases to assure they work
|
||||
well, or if you would like to work on improving Emacs, please contact
|
||||
the maintainers at @email{emacs-devel@@gnu.org}. A pretester
|
||||
should be prepared to investigate bugs as well as report them. If you'd
|
||||
like to work on improving Emacs, please ask for suggested projects or
|
||||
suggest your own ideas.
|
||||
If you would like to work on improving Emacs, please contact
|
||||
the maintainers at @email{emacs-devel@@gnu.org}. You can ask for
|
||||
suggested projects or suggest your own ideas.
|
||||
|
||||
If you have already written an improvement, please tell us about it. If
|
||||
you have not yet started work, it is useful to contact
|
||||
|
@ -258,7 +258,7 @@ Make all windows the same height (@code{balance-windows}).
|
||||
the space that it occupied is given to an adjacent window (but not the
|
||||
minibuffer window, even if that is active at the time). Deleting the
|
||||
window has no effect on the buffer it used to display; the buffer
|
||||
continues to exist, and you can still switch to with @kbd{C-x b}.
|
||||
continues to exist, and you can still switch to it with @kbd{C-x b}.
|
||||
|
||||
@findex kill-buffer-and-window
|
||||
@kindex C-x 4 0
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* cl.texi (Obsolete Macros): Describe replacements for `flet'
|
||||
(bug#14293).
|
||||
|
||||
2013-04-16 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* tramp.texi (Frequently Asked Questions): Precise, how to define
|
||||
|
@ -4850,10 +4850,27 @@ generated directly inside Emacs will not be caught since they make
|
||||
direct C-language calls to the message routines rather than going
|
||||
through the Lisp @code{message} function.
|
||||
|
||||
For those cases where the dynamic scoping of @code{flet} is desired,
|
||||
@code{cl-flet} is clearly not a substitute. The most direct replacement would
|
||||
be instead to use @code{cl-letf} to temporarily rebind @code{(symbol-function
|
||||
'@var{fun})}. But in most cases, a better substitute is to use an advice, such
|
||||
as:
|
||||
|
||||
@example
|
||||
(defvar my-fun-advice-enable nil)
|
||||
(add-advice '@var{fun} :around
|
||||
(lambda (orig &rest args)
|
||||
(if my-fun-advice-enable (do-something)
|
||||
(apply orig args))))
|
||||
@end example
|
||||
|
||||
so that you can then replace the @code{flet} with a simple dynamically scoped
|
||||
binding of @code{my-fun-advice-enable}.
|
||||
|
||||
@c Bug#411.
|
||||
Note that many primitives (e.g., @code{+}) have special byte-compile
|
||||
handling. Attempts to redefine such functions using @code{flet} will
|
||||
fail if byte-compiled.
|
||||
Note that many primitives (e.g., @code{+}) have special byte-compile handling.
|
||||
Attempts to redefine such functions using @code{flet}, @code{cl-letf}, or an
|
||||
advice will fail when byte-compiled.
|
||||
@c Or cl-flet.
|
||||
@c In such cases, use @code{labels} instead.
|
||||
@end defmac
|
||||
|
@ -1,3 +1,18 @@
|
||||
2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
|
||||
* NEWS: Emacs is no longer limited to POSIX ACLs. --disable-acl,
|
||||
not --without-acl, since we're now using Gnulib's implementation.
|
||||
|
||||
2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* NEWS: Mention multi-monitor support.
|
||||
|
||||
2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
`write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
|
||||
* NEWS: Document this.
|
||||
|
||||
2013-04-24 Tassilo Horn <tsdh@gnu.org>
|
||||
|
||||
* themes/tsdh-dark-theme.el (tsdh-dark): Add ido faces and remove
|
||||
|
@ -41,6 +41,9 @@ a web search is often the best way to find results.
|
||||
The Emacs Wiki has an area for storing elisp files
|
||||
<URL:http://www.emacswiki.org/cgi-bin/wiki/ElispArea>.
|
||||
|
||||
* WikEmacs
|
||||
<URL:http://wikemacs.org> is an alternative wiki for Emacs.
|
||||
|
||||
* Emacs slides and tutorials can be found here:
|
||||
<URL:http://web.psung.name/emacs/>
|
||||
|
||||
|
24
etc/NEWS
24
etc/NEWS
@ -23,10 +23,10 @@ so we will look at it and add it to the manual.
|
||||
|
||||
* Installation Changes in Emacs 24.4
|
||||
|
||||
** Emacs can be compiled with POSIX ACL support.
|
||||
** Emacs can be compiled with ACL support.
|
||||
This happens by default if a suitable support library is found at
|
||||
build time, like libacl on GNU/Linux. To prevent this, use the
|
||||
configure option `--without-acl'.
|
||||
configure option `--disable-acl'.
|
||||
|
||||
** The configure option --with-crt-dir has been removed.
|
||||
It is no longer needed, as the crt*.o files are no longer linked specially.
|
||||
@ -61,6 +61,8 @@ simply disabling Transient Mark mode does the same thing.
|
||||
** `initial-buffer-choice' can now specify a function to set up the
|
||||
initial buffer.
|
||||
|
||||
** `write-region-inhibit-fsync' now defaults to t in batch mode.
|
||||
|
||||
** ACL support has been added.
|
||||
+++
|
||||
*** Emacs preserves the ACL entries of files when backing up.
|
||||
@ -77,6 +79,12 @@ of the buffer is visible).
|
||||
|
||||
** In compiled Lisp files, the header no longer includes a timestamp.
|
||||
|
||||
** Multi-monitor support has been added.
|
||||
|
||||
*** New functions `display-monitor-attributes-list' and
|
||||
`frame-monitor-attributes' can be used to obtain information about
|
||||
each physical monitor on multi-monitor setups.
|
||||
|
||||
|
||||
* Editing Changes in Emacs 24.4
|
||||
|
||||
@ -146,6 +154,12 @@ The default separator is changed to allow surrounding spaces around the comma.
|
||||
|
||||
*** Battery information via the BSD `apm' utility is now supported.
|
||||
|
||||
** Calendar and Diary
|
||||
|
||||
+++
|
||||
*** New variable `diary-from-outlook-function', used by the command
|
||||
`diary-from-outlook'.
|
||||
|
||||
** cl-lib
|
||||
|
||||
*** New macro cl-tagbody.
|
||||
@ -184,6 +198,9 @@ auto-saves of the desktop.
|
||||
If set to a number, this can be used to avoid accidentally paste large
|
||||
amounts of data into the ERC input.
|
||||
|
||||
---
|
||||
** New F90 mode option `f90-smart-end-names'.
|
||||
|
||||
** Icomplete is a bit more like IDO.
|
||||
*** key bindings to navigate through and select the completions.
|
||||
*** The icomplete-separator is customizable, and its default has changed.
|
||||
@ -281,6 +298,9 @@ module.
|
||||
|
||||
*** longlines.el is obsolete; use visual-line-mode instead.
|
||||
|
||||
+++
|
||||
*** sup-mouse.el.
|
||||
|
||||
*** terminal.el is obsolete; use term.el instead.
|
||||
|
||||
+++
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* make-docfile.c (search_lisp_doc_at_eol) [DEBUG]: Fix typo,
|
||||
by removing references to no-longer-existing locals.
|
||||
|
||||
2013-03-26 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
Fix incompatibilities between MinGW.org and MinGW64 headers.
|
||||
|
@ -1090,8 +1090,7 @@ search_lisp_doc_at_eol (FILE *infile)
|
||||
if (c2 != '"' || c1 != '\\')
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf (stderr, "## non-docstring in %s (%s)\n",
|
||||
buffer, filename);
|
||||
fprintf (stderr, "## non-docstring found\n");
|
||||
#endif
|
||||
if (c != EOF)
|
||||
ungetc (c, infile);
|
||||
|
@ -1,8 +1,10 @@
|
||||
BUILT_SOURCES =
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
MOSTLYCLEANDIRS =
|
||||
MOSTLYCLEANFILES =
|
||||
noinst_LIBRARIES =
|
||||
SUFFIXES =
|
||||
|
||||
AM_CFLAGS = $(PROFILING_CFLAGS) $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
DEFAULT_INCLUDES = -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/src
|
||||
|
52
lib/acl-errno-valid.c
Normal file
52
lib/acl-errno-valid.c
Normal file
@ -0,0 +1,52 @@
|
||||
/* Test whether ACLs are well supported on this system.
|
||||
|
||||
Copyright 2013 Free Software Foundation, Inc.
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Paul Eggert. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <acl.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
/* Return true if errno value ERRNUM indicates that ACLs are well
|
||||
supported on this system. ERRNUM should be an errno value obtained
|
||||
after an ACL-related system call fails. */
|
||||
bool
|
||||
acl_errno_valid (int errnum)
|
||||
{
|
||||
/* Recognize some common errors such as from an NFS mount that does
|
||||
not support ACLs, even when local drives do. */
|
||||
switch (errnum)
|
||||
{
|
||||
case EBUSY: return false;
|
||||
case EINVAL: return false;
|
||||
#if defined __APPLE__ && defined __MACH__
|
||||
case ENOENT: return false;
|
||||
#endif
|
||||
case ENOSYS: return false;
|
||||
|
||||
#if defined ENOTSUP && ENOTSUP != EOPNOTSUPP
|
||||
# if ENOTSUP != ENOSYS /* Needed for the MS-Windows port of GNU Emacs. */
|
||||
case ENOTSUP: return false;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
case EOPNOTSUPP: return false;
|
||||
default: return true;
|
||||
}
|
||||
}
|
250
lib/acl-internal.h
Normal file
250
lib/acl-internal.h
Normal file
@ -0,0 +1,250 @@
|
||||
/* Internal implementation of access control lists.
|
||||
|
||||
Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
|
||||
|
||||
#include "acl.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* All systems define the ACL related API in <sys/acl.h>. */
|
||||
#if HAVE_SYS_ACL_H
|
||||
# include <sys/acl.h>
|
||||
#endif
|
||||
#if defined HAVE_FACL && ! defined GETACLCNT && defined ACL_CNT
|
||||
# define GETACLCNT ACL_CNT
|
||||
#endif
|
||||
|
||||
/* On Linux, additional ACL related API is available in <acl/libacl.h>. */
|
||||
#ifdef HAVE_ACL_LIBACL_H
|
||||
# include <acl/libacl.h>
|
||||
#endif
|
||||
|
||||
/* On HP-UX >= 11.11, additional ACL API is available in <aclv.h>. */
|
||||
#if HAVE_ACLV_H
|
||||
# include <sys/types.h>
|
||||
# include <aclv.h>
|
||||
/* HP-UX 11.11 lacks these declarations. */
|
||||
extern int acl (char *, int, int, struct acl *);
|
||||
extern int aclsort (int, int, struct acl *);
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <limits.h>
|
||||
#ifndef MIN
|
||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t) -1)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FCHMOD
|
||||
# define HAVE_FCHMOD false
|
||||
# define fchmod(fd, mode) (-1)
|
||||
#endif
|
||||
|
||||
_GL_INLINE_HEADER_BEGIN
|
||||
#ifndef ACL_INTERNAL_INLINE
|
||||
# define ACL_INTERNAL_INLINE _GL_INLINE
|
||||
#endif
|
||||
|
||||
#if USE_ACL
|
||||
|
||||
# if HAVE_ACL_GET_FILE
|
||||
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
|
||||
/* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
|
||||
|
||||
# ifndef MIN_ACL_ENTRIES
|
||||
# define MIN_ACL_ENTRIES 4
|
||||
# endif
|
||||
|
||||
/* POSIX 1003.1e (draft 17) */
|
||||
# ifdef HAVE_ACL_GET_FD
|
||||
/* Most platforms have a 1-argument acl_get_fd, only OSF/1 has a 2-argument
|
||||
macro(!). */
|
||||
# if HAVE_ACL_FREE_TEXT /* OSF/1 */
|
||||
ACL_INTERNAL_INLINE acl_t
|
||||
rpl_acl_get_fd (int fd)
|
||||
{
|
||||
return acl_get_fd (fd, ACL_TYPE_ACCESS);
|
||||
}
|
||||
# undef acl_get_fd
|
||||
# define acl_get_fd rpl_acl_get_fd
|
||||
# endif
|
||||
# else
|
||||
# define HAVE_ACL_GET_FD false
|
||||
# undef acl_get_fd
|
||||
# define acl_get_fd(fd) (NULL)
|
||||
# endif
|
||||
|
||||
/* POSIX 1003.1e (draft 17) */
|
||||
# ifdef HAVE_ACL_SET_FD
|
||||
/* Most platforms have a 2-argument acl_set_fd, only OSF/1 has a 3-argument
|
||||
macro(!). */
|
||||
# if HAVE_ACL_FREE_TEXT /* OSF/1 */
|
||||
ACL_INTERNAL_INLINE int
|
||||
rpl_acl_set_fd (int fd, acl_t acl)
|
||||
{
|
||||
return acl_set_fd (fd, ACL_TYPE_ACCESS, acl);
|
||||
}
|
||||
# undef acl_set_fd
|
||||
# define acl_set_fd rpl_acl_set_fd
|
||||
# endif
|
||||
# else
|
||||
# define HAVE_ACL_SET_FD false
|
||||
# undef acl_set_fd
|
||||
# define acl_set_fd(fd, acl) (-1)
|
||||
# endif
|
||||
|
||||
/* POSIX 1003.1e (draft 13) */
|
||||
# if ! HAVE_ACL_FREE_TEXT
|
||||
# define acl_free_text(buf) acl_free (buf)
|
||||
# endif
|
||||
|
||||
/* Linux-specific */
|
||||
# ifndef HAVE_ACL_EXTENDED_FILE
|
||||
# define HAVE_ACL_EXTENDED_FILE false
|
||||
# define acl_extended_file(name) (-1)
|
||||
# endif
|
||||
|
||||
/* Linux-specific */
|
||||
# ifndef HAVE_ACL_FROM_MODE
|
||||
# define HAVE_ACL_FROM_MODE false
|
||||
# define acl_from_mode(mode) (NULL)
|
||||
# endif
|
||||
|
||||
/* Set to 1 if a file's mode is implicit by the ACL.
|
||||
Set to 0 if a file's mode is stored independently from the ACL. */
|
||||
# if (HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP) || defined __sgi /* Mac OS X, IRIX */
|
||||
# define MODE_INSIDE_ACL 0
|
||||
# else
|
||||
# define MODE_INSIDE_ACL 1
|
||||
# endif
|
||||
|
||||
/* Return the number of entries in ACL.
|
||||
Return -1 and set errno upon failure to determine it. */
|
||||
/* Define a replacement for acl_entries if needed. (Only Linux has it.) */
|
||||
# if !HAVE_ACL_ENTRIES
|
||||
# define acl_entries rpl_acl_entries
|
||||
extern int acl_entries (acl_t);
|
||||
# endif
|
||||
|
||||
# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
|
||||
/* ACL is an ACL, from a file, stored as type ACL_TYPE_EXTENDED.
|
||||
Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial. */
|
||||
extern int acl_extended_nontrivial (acl_t);
|
||||
# else
|
||||
/* ACL is an ACL, from a file, stored as type ACL_TYPE_ACCESS.
|
||||
Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.
|
||||
Return -1 and set errno upon failure to determine it. */
|
||||
extern int acl_access_nontrivial (acl_t);
|
||||
# endif
|
||||
|
||||
# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
|
||||
|
||||
/* Set to 1 if a file's mode is implicit by the ACL.
|
||||
Set to 0 if a file's mode is stored independently from the ACL. */
|
||||
# if defined __CYGWIN__ /* Cygwin */
|
||||
# define MODE_INSIDE_ACL 0
|
||||
# else /* Solaris */
|
||||
# define MODE_INSIDE_ACL 1
|
||||
# endif
|
||||
|
||||
/* Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
extern int acl_nontrivial (int count, aclent_t *entries);
|
||||
|
||||
# ifdef ACE_GETACL /* Solaris 10 */
|
||||
|
||||
/* Test an ACL retrieved with ACE_GETACL.
|
||||
Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
extern int acl_ace_nontrivial (int count, ace_t *entries);
|
||||
|
||||
/* Definitions for when the built executable is executed on Solaris 10
|
||||
(newer version) or Solaris 11. */
|
||||
/* For a_type. */
|
||||
# define OLD_ALLOW 0
|
||||
# define OLD_DENY 1
|
||||
# define NEW_ACE_ACCESS_ALLOWED_ACE_TYPE 0 /* replaces ALLOW */
|
||||
# define NEW_ACE_ACCESS_DENIED_ACE_TYPE 1 /* replaces DENY */
|
||||
/* For a_flags. */
|
||||
# define OLD_ACE_OWNER 0x0100
|
||||
# define OLD_ACE_GROUP 0x0200
|
||||
# define OLD_ACE_OTHER 0x0400
|
||||
# define NEW_ACE_OWNER 0x1000
|
||||
# define NEW_ACE_GROUP 0x2000
|
||||
# define NEW_ACE_IDENTIFIER_GROUP 0x0040
|
||||
# define NEW_ACE_EVERYONE 0x4000
|
||||
/* For a_access_mask. */
|
||||
# define NEW_ACE_READ_DATA 0x001 /* corresponds to 'r' */
|
||||
# define NEW_ACE_WRITE_DATA 0x002 /* corresponds to 'w' */
|
||||
# define NEW_ACE_APPEND_DATA 0x004
|
||||
# define NEW_ACE_READ_NAMED_ATTRS 0x008
|
||||
# define NEW_ACE_WRITE_NAMED_ATTRS 0x010
|
||||
# define NEW_ACE_EXECUTE 0x020
|
||||
# define NEW_ACE_DELETE_CHILD 0x040
|
||||
# define NEW_ACE_READ_ATTRIBUTES 0x080
|
||||
# define NEW_ACE_WRITE_ATTRIBUTES 0x100
|
||||
# define NEW_ACE_DELETE 0x10000
|
||||
# define NEW_ACE_READ_ACL 0x20000
|
||||
# define NEW_ACE_WRITE_ACL 0x40000
|
||||
# define NEW_ACE_WRITE_OWNER 0x80000
|
||||
# define NEW_ACE_SYNCHRONIZE 0x100000
|
||||
|
||||
# endif
|
||||
|
||||
# elif HAVE_GETACL /* HP-UX */
|
||||
|
||||
/* Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
extern int acl_nontrivial (int count, struct acl_entry *entries, struct stat *sb);
|
||||
|
||||
# if HAVE_ACLV_H /* HP-UX >= 11.11 */
|
||||
|
||||
/* Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
extern int aclv_nontrivial (int count, struct acl *entries);
|
||||
|
||||
# endif
|
||||
|
||||
# elif HAVE_ACLX_GET && 0 /* AIX */
|
||||
|
||||
/* TODO */
|
||||
|
||||
# elif HAVE_STATACL /* older AIX */
|
||||
|
||||
/* Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
extern int acl_nontrivial (struct acl *a);
|
||||
|
||||
# elif HAVE_ACLSORT /* NonStop Kernel */
|
||||
|
||||
/* Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
extern int acl_nontrivial (int count, struct acl *entries);
|
||||
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
_GL_INLINE_HEADER_END
|
30
lib/acl.h
Normal file
30
lib/acl.h
Normal file
@ -0,0 +1,30 @@
|
||||
/* acl.c - access control lists
|
||||
|
||||
Copyright (C) 2002, 2008-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Paul Eggert. */
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
bool acl_errno_valid (int) _GL_ATTRIBUTE_CONST;
|
||||
int file_has_acl (char const *, struct stat const *);
|
||||
int qset_acl (char const *, int, mode_t);
|
||||
int set_acl (char const *, int, mode_t);
|
||||
int qcopy_acl (char const *, int, char const *, int, mode_t);
|
||||
int copy_acl (char const *, int, char const *, int, mode_t);
|
||||
int chmod_or_fchmod (char const *, int, mode_t);
|
75
lib/acl_entries.c
Normal file
75
lib/acl_entries.c
Normal file
@ -0,0 +1,75 @@
|
||||
/* Return the number of entries in an ACL.
|
||||
|
||||
Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Paul Eggert and Andreas Gruenbacher. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "acl-internal.h"
|
||||
|
||||
/* This file assumes POSIX-draft like ACLs
|
||||
(Linux, FreeBSD, Mac OS X, IRIX, Tru64). */
|
||||
|
||||
/* Return the number of entries in ACL.
|
||||
Return -1 and set errno upon failure to determine it. */
|
||||
|
||||
int
|
||||
acl_entries (acl_t acl)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
if (acl != NULL)
|
||||
{
|
||||
#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, Mac OS X */
|
||||
# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
|
||||
/* acl_get_entry returns 0 when it successfully fetches an entry,
|
||||
and -1/EINVAL at the end. */
|
||||
acl_entry_t ace;
|
||||
int got_one;
|
||||
|
||||
for (got_one = acl_get_entry (acl, ACL_FIRST_ENTRY, &ace);
|
||||
got_one >= 0;
|
||||
got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
|
||||
count++;
|
||||
# else /* Linux, FreeBSD */
|
||||
/* acl_get_entry returns 1 when it successfully fetches an entry,
|
||||
and 0 at the end. */
|
||||
acl_entry_t ace;
|
||||
int got_one;
|
||||
|
||||
for (got_one = acl_get_entry (acl, ACL_FIRST_ENTRY, &ace);
|
||||
got_one > 0;
|
||||
got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
|
||||
count++;
|
||||
if (got_one < 0)
|
||||
return -1;
|
||||
# endif
|
||||
#else /* IRIX, Tru64 */
|
||||
# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */
|
||||
/* Don't use acl_get_entry: it is undocumented. */
|
||||
count = acl->acl_cnt;
|
||||
# endif
|
||||
# if HAVE_ACL_FREE_TEXT /* Tru64 */
|
||||
/* Don't use acl_get_entry: it takes only one argument and does not
|
||||
work. */
|
||||
count = acl->acl_num;
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
279
lib/errno.in.h
Normal file
279
lib/errno.in.h
Normal file
@ -0,0 +1,279 @@
|
||||
/* A POSIX-like <errno.h>.
|
||||
|
||||
Copyright (C) 2008-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program 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, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program 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 this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _@GUARD_PREFIX@_ERRNO_H
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
@PRAGMA_SYSTEM_HEADER@
|
||||
#endif
|
||||
@PRAGMA_COLUMNS@
|
||||
|
||||
/* The include_next requires a split double-inclusion guard. */
|
||||
#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
|
||||
|
||||
#ifndef _@GUARD_PREFIX@_ERRNO_H
|
||||
#define _@GUARD_PREFIX@_ERRNO_H
|
||||
|
||||
|
||||
/* On native Windows platforms, many macros are not defined. */
|
||||
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
|
||||
|
||||
/* These are the same values as defined by MSVC 10, for interoperability. */
|
||||
|
||||
# ifndef ENOMSG
|
||||
# define ENOMSG 122
|
||||
# define GNULIB_defined_ENOMSG 1
|
||||
# endif
|
||||
|
||||
# ifndef EIDRM
|
||||
# define EIDRM 111
|
||||
# define GNULIB_defined_EIDRM 1
|
||||
# endif
|
||||
|
||||
# ifndef ENOLINK
|
||||
# define ENOLINK 121
|
||||
# define GNULIB_defined_ENOLINK 1
|
||||
# endif
|
||||
|
||||
# ifndef EPROTO
|
||||
# define EPROTO 134
|
||||
# define GNULIB_defined_EPROTO 1
|
||||
# endif
|
||||
|
||||
# ifndef EBADMSG
|
||||
# define EBADMSG 104
|
||||
# define GNULIB_defined_EBADMSG 1
|
||||
# endif
|
||||
|
||||
# ifndef EOVERFLOW
|
||||
# define EOVERFLOW 132
|
||||
# define GNULIB_defined_EOVERFLOW 1
|
||||
# endif
|
||||
|
||||
# ifndef ENOTSUP
|
||||
# define ENOTSUP 129
|
||||
# define GNULIB_defined_ENOTSUP 1
|
||||
# endif
|
||||
|
||||
# ifndef ENETRESET
|
||||
# define ENETRESET 117
|
||||
# define GNULIB_defined_ENETRESET 1
|
||||
# endif
|
||||
|
||||
# ifndef ECONNABORTED
|
||||
# define ECONNABORTED 106
|
||||
# define GNULIB_defined_ECONNABORTED 1
|
||||
# endif
|
||||
|
||||
# ifndef ECANCELED
|
||||
# define ECANCELED 105
|
||||
# define GNULIB_defined_ECANCELED 1
|
||||
# endif
|
||||
|
||||
# ifndef EOWNERDEAD
|
||||
# define EOWNERDEAD 133
|
||||
# define GNULIB_defined_EOWNERDEAD 1
|
||||
# endif
|
||||
|
||||
# ifndef ENOTRECOVERABLE
|
||||
# define ENOTRECOVERABLE 127
|
||||
# define GNULIB_defined_ENOTRECOVERABLE 1
|
||||
# endif
|
||||
|
||||
# ifndef EINPROGRESS
|
||||
# define EINPROGRESS 112
|
||||
# define EALREADY 103
|
||||
# define ENOTSOCK 128
|
||||
# define EDESTADDRREQ 109
|
||||
# define EMSGSIZE 115
|
||||
# define EPROTOTYPE 136
|
||||
# define ENOPROTOOPT 123
|
||||
# define EPROTONOSUPPORT 135
|
||||
# define EOPNOTSUPP 130
|
||||
# define EAFNOSUPPORT 102
|
||||
# define EADDRINUSE 100
|
||||
# define EADDRNOTAVAIL 101
|
||||
# define ENETDOWN 116
|
||||
# define ENETUNREACH 118
|
||||
# define ECONNRESET 108
|
||||
# define ENOBUFS 119
|
||||
# define EISCONN 113
|
||||
# define ENOTCONN 126
|
||||
# define ETIMEDOUT 138
|
||||
# define ECONNREFUSED 107
|
||||
# define ELOOP 114
|
||||
# define EHOSTUNREACH 110
|
||||
# define EWOULDBLOCK 140
|
||||
# define GNULIB_defined_ESOCK 1
|
||||
# endif
|
||||
|
||||
# ifndef ETXTBSY
|
||||
# define ETXTBSY 139
|
||||
# define ENODATA 120 /* not required by POSIX */
|
||||
# define ENOSR 124 /* not required by POSIX */
|
||||
# define ENOSTR 125 /* not required by POSIX */
|
||||
# define ETIME 137 /* not required by POSIX */
|
||||
# define EOTHER 131 /* not required by POSIX */
|
||||
# define GNULIB_defined_ESTREAMS 1
|
||||
# endif
|
||||
|
||||
/* These are intentionally the same values as the WSA* error numbers, defined
|
||||
in <winsock2.h>. */
|
||||
# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */
|
||||
# define EPFNOSUPPORT 10046 /* not required by POSIX */
|
||||
# define ESHUTDOWN 10058 /* not required by POSIX */
|
||||
# define ETOOMANYREFS 10059 /* not required by POSIX */
|
||||
# define EHOSTDOWN 10064 /* not required by POSIX */
|
||||
# define EPROCLIM 10067 /* not required by POSIX */
|
||||
# define EUSERS 10068 /* not required by POSIX */
|
||||
# define EDQUOT 10069
|
||||
# define ESTALE 10070
|
||||
# define EREMOTE 10071 /* not required by POSIX */
|
||||
# define GNULIB_defined_EWINSOCK 1
|
||||
|
||||
# endif
|
||||
|
||||
|
||||
/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
|
||||
EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */
|
||||
# if @EMULTIHOP_HIDDEN@
|
||||
# define EMULTIHOP @EMULTIHOP_VALUE@
|
||||
# define GNULIB_defined_EMULTIHOP 1
|
||||
# endif
|
||||
# if @ENOLINK_HIDDEN@
|
||||
# define ENOLINK @ENOLINK_VALUE@
|
||||
# define GNULIB_defined_ENOLINK 1
|
||||
# endif
|
||||
# if @EOVERFLOW_HIDDEN@
|
||||
# define EOVERFLOW @EOVERFLOW_VALUE@
|
||||
# define GNULIB_defined_EOVERFLOW 1
|
||||
# endif
|
||||
|
||||
|
||||
/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
|
||||
EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
|
||||
Likewise, on NonStop Kernel, EDQUOT is not defined.
|
||||
Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
|
||||
HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
|
||||
|
||||
Note: When one of these systems defines some of these macros some day,
|
||||
binaries will have to be recompiled so that they recognizes the new
|
||||
errno values from the system. */
|
||||
|
||||
# ifndef ENOMSG
|
||||
# define ENOMSG 2000
|
||||
# define GNULIB_defined_ENOMSG 1
|
||||
# endif
|
||||
|
||||
# ifndef EIDRM
|
||||
# define EIDRM 2001
|
||||
# define GNULIB_defined_EIDRM 1
|
||||
# endif
|
||||
|
||||
# ifndef ENOLINK
|
||||
# define ENOLINK 2002
|
||||
# define GNULIB_defined_ENOLINK 1
|
||||
# endif
|
||||
|
||||
# ifndef EPROTO
|
||||
# define EPROTO 2003
|
||||
# define GNULIB_defined_EPROTO 1
|
||||
# endif
|
||||
|
||||
# ifndef EMULTIHOP
|
||||
# define EMULTIHOP 2004
|
||||
# define GNULIB_defined_EMULTIHOP 1
|
||||
# endif
|
||||
|
||||
# ifndef EBADMSG
|
||||
# define EBADMSG 2005
|
||||
# define GNULIB_defined_EBADMSG 1
|
||||
# endif
|
||||
|
||||
# ifndef EOVERFLOW
|
||||
# define EOVERFLOW 2006
|
||||
# define GNULIB_defined_EOVERFLOW 1
|
||||
# endif
|
||||
|
||||
# ifndef ENOTSUP
|
||||
# define ENOTSUP 2007
|
||||
# define GNULIB_defined_ENOTSUP 1
|
||||
# endif
|
||||
|
||||
# ifndef ENETRESET
|
||||
# define ENETRESET 2011
|
||||
# define GNULIB_defined_ENETRESET 1
|
||||
# endif
|
||||
|
||||
# ifndef ECONNABORTED
|
||||
# define ECONNABORTED 2012
|
||||
# define GNULIB_defined_ECONNABORTED 1
|
||||
# endif
|
||||
|
||||
# ifndef ESTALE
|
||||
# define ESTALE 2009
|
||||
# define GNULIB_defined_ESTALE 1
|
||||
# endif
|
||||
|
||||
# ifndef EDQUOT
|
||||
# define EDQUOT 2010
|
||||
# define GNULIB_defined_EDQUOT 1
|
||||
# endif
|
||||
|
||||
# ifndef ECANCELED
|
||||
# define ECANCELED 2008
|
||||
# define GNULIB_defined_ECANCELED 1
|
||||
# endif
|
||||
|
||||
/* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not
|
||||
defined. */
|
||||
|
||||
# ifndef EOWNERDEAD
|
||||
# if defined __sun
|
||||
/* Use the same values as defined for Solaris >= 8, for
|
||||
interoperability. */
|
||||
# define EOWNERDEAD 58
|
||||
# define ENOTRECOVERABLE 59
|
||||
# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
|
||||
/* We have a conflict here: pthreads-win32 defines these values
|
||||
differently than MSVC 10. It's hairy to decide which one to use. */
|
||||
# if defined __MINGW32__ && !defined USE_WINDOWS_THREADS
|
||||
/* Use the same values as defined by pthreads-win32, for
|
||||
interoperability. */
|
||||
# define EOWNERDEAD 43
|
||||
# define ENOTRECOVERABLE 44
|
||||
# else
|
||||
/* Use the same values as defined by MSVC 10, for
|
||||
interoperability. */
|
||||
# define EOWNERDEAD 133
|
||||
# define ENOTRECOVERABLE 127
|
||||
# endif
|
||||
# else
|
||||
# define EOWNERDEAD 2013
|
||||
# define ENOTRECOVERABLE 2014
|
||||
# endif
|
||||
# define GNULIB_defined_EOWNERDEAD 1
|
||||
# define GNULIB_defined_ENOTRECOVERABLE 1
|
||||
# endif
|
||||
|
||||
# ifndef EILSEQ
|
||||
# define EILSEQ 2015
|
||||
# define GNULIB_defined_EILSEQ 1
|
||||
# endif
|
||||
|
||||
#endif /* _@GUARD_PREFIX@_ERRNO_H */
|
||||
#endif /* _@GUARD_PREFIX@_ERRNO_H */
|
918
lib/file-has-acl.c
Normal file
918
lib/file-has-acl.c
Normal file
@ -0,0 +1,918 @@
|
||||
/* Test whether a file has a nontrivial access control list.
|
||||
|
||||
Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
|
||||
|
||||
/* Without this pragma, gcc 4.7.0 20120126 may suggest that the
|
||||
file_has_acl function might be candidate for attribute 'const' */
|
||||
#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "acl.h"
|
||||
|
||||
#include "acl-internal.h"
|
||||
|
||||
|
||||
#if USE_ACL && HAVE_ACL_GET_FILE
|
||||
|
||||
# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
|
||||
|
||||
/* ACL is an ACL, from a file, stored as type ACL_TYPE_EXTENDED.
|
||||
Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial. */
|
||||
int
|
||||
acl_extended_nontrivial (acl_t acl)
|
||||
{
|
||||
/* acl is non-trivial if it is non-empty. */
|
||||
return (acl_entries (acl) > 0);
|
||||
}
|
||||
|
||||
# else /* Linux, FreeBSD, IRIX, Tru64 */
|
||||
|
||||
/* ACL is an ACL, from a file, stored as type ACL_TYPE_ACCESS.
|
||||
Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.
|
||||
Return -1 and set errno upon failure to determine it. */
|
||||
int
|
||||
acl_access_nontrivial (acl_t acl)
|
||||
{
|
||||
/* acl is non-trivial if it has some entries other than for "user::",
|
||||
"group::", and "other::". Normally these three should be present
|
||||
at least, allowing us to write
|
||||
return (3 < acl_entries (acl));
|
||||
but the following code is more robust. */
|
||||
# if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD */
|
||||
|
||||
acl_entry_t ace;
|
||||
int got_one;
|
||||
|
||||
for (got_one = acl_get_entry (acl, ACL_FIRST_ENTRY, &ace);
|
||||
got_one > 0;
|
||||
got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
|
||||
{
|
||||
acl_tag_t tag;
|
||||
if (acl_get_tag_type (ace, &tag) < 0)
|
||||
return -1;
|
||||
if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ || tag == ACL_OTHER))
|
||||
return 1;
|
||||
}
|
||||
return got_one;
|
||||
|
||||
# else /* IRIX, Tru64 */
|
||||
# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */
|
||||
/* Don't use acl_get_entry: it is undocumented. */
|
||||
|
||||
int count = acl->acl_cnt;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
acl_entry_t ace = &acl->acl_entry[i];
|
||||
acl_tag_t tag = ace->ae_tag;
|
||||
|
||||
if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ
|
||||
|| tag == ACL_OTHER_OBJ))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
# endif
|
||||
# if HAVE_ACL_FREE_TEXT /* Tru64 */
|
||||
/* Don't use acl_get_entry: it takes only one argument and does not work. */
|
||||
|
||||
int count = acl->acl_num;
|
||||
acl_entry_t ace;
|
||||
|
||||
for (ace = acl->acl_first; count > 0; ace = ace->next, count--)
|
||||
{
|
||||
acl_tag_t tag;
|
||||
acl_perm_t perm;
|
||||
|
||||
tag = ace->entry->acl_type;
|
||||
if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ || tag == ACL_OTHER))
|
||||
return 1;
|
||||
|
||||
perm = ace->entry->acl_perm;
|
||||
/* On Tru64, perm can also contain non-standard bits such as
|
||||
PERM_INSERT, PERM_DELETE, PERM_MODIFY, PERM_LOOKUP, ... */
|
||||
if ((perm & ~(ACL_READ | ACL_WRITE | ACL_EXECUTE)) != 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
|
||||
#elif USE_ACL && HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
|
||||
|
||||
/* Test an ACL retrieved with GETACL.
|
||||
Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
int
|
||||
acl_nontrivial (int count, aclent_t *entries)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
aclent_t *ace = &entries[i];
|
||||
|
||||
/* Note: If ace->a_type = USER_OBJ, ace->a_id is the st_uid from stat().
|
||||
If ace->a_type = GROUP_OBJ, ace->a_id is the st_gid from stat().
|
||||
We don't need to check ace->a_id in these cases. */
|
||||
if (!(ace->a_type == USER_OBJ
|
||||
|| ace->a_type == GROUP_OBJ
|
||||
|| ace->a_type == OTHER_OBJ
|
||||
/* Note: Cygwin does not return a CLASS_OBJ ("mask:") entry
|
||||
sometimes. */
|
||||
|| ace->a_type == CLASS_OBJ))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
# ifdef ACE_GETACL
|
||||
|
||||
/* A shortcut for a bitmask. */
|
||||
# define NEW_ACE_WRITEA_DATA (NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA)
|
||||
|
||||
/* Test an ACL retrieved with ACE_GETACL.
|
||||
Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
int
|
||||
acl_ace_nontrivial (int count, ace_t *entries)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* The flags in the ace_t structure changed in a binary incompatible way
|
||||
when ACL_NO_TRIVIAL etc. were introduced in <sys/acl.h> version 1.15.
|
||||
How to distinguish the two conventions at runtime?
|
||||
In the old convention, usually three ACEs have a_flags = ACE_OWNER /
|
||||
ACE_GROUP / ACE_OTHER, in the range 0x0100..0x0400. In the new
|
||||
convention, these values are not used. */
|
||||
int old_convention = 0;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
if (entries[i].a_flags & (OLD_ACE_OWNER | OLD_ACE_GROUP | OLD_ACE_OTHER))
|
||||
{
|
||||
old_convention = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (old_convention)
|
||||
/* Running on Solaris 10. */
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
ace_t *ace = &entries[i];
|
||||
|
||||
/* Note:
|
||||
If ace->a_flags = ACE_OWNER, ace->a_who is the st_uid from stat().
|
||||
If ace->a_flags = ACE_GROUP, ace->a_who is the st_gid from stat().
|
||||
We don't need to check ace->a_who in these cases. */
|
||||
if (!(ace->a_type == OLD_ALLOW
|
||||
&& (ace->a_flags == OLD_ACE_OWNER
|
||||
|| ace->a_flags == OLD_ACE_GROUP
|
||||
|| ace->a_flags == OLD_ACE_OTHER)))
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Running on Solaris 10 (newer version) or Solaris 11. */
|
||||
unsigned int access_masks[6] =
|
||||
{
|
||||
0, /* owner@ deny */
|
||||
0, /* owner@ allow */
|
||||
0, /* group@ deny */
|
||||
0, /* group@ allow */
|
||||
0, /* everyone@ deny */
|
||||
0 /* everyone@ allow */
|
||||
};
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
ace_t *ace = &entries[i];
|
||||
unsigned int index1;
|
||||
unsigned int index2;
|
||||
|
||||
if (ace->a_type == NEW_ACE_ACCESS_ALLOWED_ACE_TYPE)
|
||||
index1 = 1;
|
||||
else if (ace->a_type == NEW_ACE_ACCESS_DENIED_ACE_TYPE)
|
||||
index1 = 0;
|
||||
else
|
||||
return 1;
|
||||
|
||||
if (ace->a_flags == NEW_ACE_OWNER)
|
||||
index2 = 0;
|
||||
else if (ace->a_flags == (NEW_ACE_GROUP | NEW_ACE_IDENTIFIER_GROUP))
|
||||
index2 = 2;
|
||||
else if (ace->a_flags == NEW_ACE_EVERYONE)
|
||||
index2 = 4;
|
||||
else
|
||||
return 1;
|
||||
|
||||
access_masks[index1 + index2] |= ace->a_access_mask;
|
||||
}
|
||||
|
||||
/* The same bit shouldn't be both allowed and denied. */
|
||||
if (access_masks[0] & access_masks[1])
|
||||
return 1;
|
||||
if (access_masks[2] & access_masks[3])
|
||||
return 1;
|
||||
if (access_masks[4] & access_masks[5])
|
||||
return 1;
|
||||
|
||||
/* Check minimum masks. */
|
||||
if ((NEW_ACE_WRITE_NAMED_ATTRS
|
||||
| NEW_ACE_WRITE_ATTRIBUTES
|
||||
| NEW_ACE_WRITE_ACL
|
||||
| NEW_ACE_WRITE_OWNER)
|
||||
& ~ access_masks[1])
|
||||
return 1;
|
||||
access_masks[1] &= ~(NEW_ACE_WRITE_NAMED_ATTRS
|
||||
| NEW_ACE_WRITE_ATTRIBUTES
|
||||
| NEW_ACE_WRITE_ACL
|
||||
| NEW_ACE_WRITE_OWNER);
|
||||
if ((NEW_ACE_READ_NAMED_ATTRS
|
||||
| NEW_ACE_READ_ATTRIBUTES
|
||||
| NEW_ACE_READ_ACL
|
||||
| NEW_ACE_SYNCHRONIZE)
|
||||
& ~ access_masks[5])
|
||||
return 1;
|
||||
access_masks[5] &= ~(NEW_ACE_READ_NAMED_ATTRS
|
||||
| NEW_ACE_READ_ATTRIBUTES
|
||||
| NEW_ACE_READ_ACL
|
||||
| NEW_ACE_SYNCHRONIZE);
|
||||
|
||||
/* Check the allowed or denied bits. */
|
||||
switch ((access_masks[0] | access_masks[1])
|
||||
& ~(NEW_ACE_READ_NAMED_ATTRS
|
||||
| NEW_ACE_READ_ATTRIBUTES
|
||||
| NEW_ACE_READ_ACL
|
||||
| NEW_ACE_SYNCHRONIZE))
|
||||
{
|
||||
case 0:
|
||||
case NEW_ACE_READ_DATA:
|
||||
case NEW_ACE_WRITEA_DATA:
|
||||
case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA:
|
||||
case NEW_ACE_EXECUTE:
|
||||
case NEW_ACE_READ_DATA | NEW_ACE_EXECUTE:
|
||||
case NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
|
||||
case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
|
||||
break;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
switch ((access_masks[2] | access_masks[3])
|
||||
& ~(NEW_ACE_READ_NAMED_ATTRS
|
||||
| NEW_ACE_READ_ATTRIBUTES
|
||||
| NEW_ACE_READ_ACL
|
||||
| NEW_ACE_SYNCHRONIZE))
|
||||
{
|
||||
case 0:
|
||||
case NEW_ACE_READ_DATA:
|
||||
case NEW_ACE_WRITEA_DATA:
|
||||
case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA:
|
||||
case NEW_ACE_EXECUTE:
|
||||
case NEW_ACE_READ_DATA | NEW_ACE_EXECUTE:
|
||||
case NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
|
||||
case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
|
||||
break;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
switch ((access_masks[4] | access_masks[5])
|
||||
& ~(NEW_ACE_WRITE_NAMED_ATTRS
|
||||
| NEW_ACE_WRITE_ATTRIBUTES
|
||||
| NEW_ACE_WRITE_ACL
|
||||
| NEW_ACE_WRITE_OWNER))
|
||||
{
|
||||
case 0:
|
||||
case NEW_ACE_READ_DATA:
|
||||
case NEW_ACE_WRITEA_DATA:
|
||||
case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA:
|
||||
case NEW_ACE_EXECUTE:
|
||||
case NEW_ACE_READ_DATA | NEW_ACE_EXECUTE:
|
||||
case NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
|
||||
case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE:
|
||||
break;
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Check that the NEW_ACE_WRITE_DATA and NEW_ACE_APPEND_DATA bits are
|
||||
either both allowed or both denied. */
|
||||
if (((access_masks[0] & NEW_ACE_WRITE_DATA) != 0)
|
||||
!= ((access_masks[0] & NEW_ACE_APPEND_DATA) != 0))
|
||||
return 1;
|
||||
if (((access_masks[2] & NEW_ACE_WRITE_DATA) != 0)
|
||||
!= ((access_masks[2] & NEW_ACE_APPEND_DATA) != 0))
|
||||
return 1;
|
||||
if (((access_masks[4] & NEW_ACE_WRITE_DATA) != 0)
|
||||
!= ((access_masks[4] & NEW_ACE_APPEND_DATA) != 0))
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
#elif USE_ACL && HAVE_GETACL /* HP-UX */
|
||||
|
||||
/* Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
int
|
||||
acl_nontrivial (int count, struct acl_entry *entries, struct stat *sb)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
struct acl_entry *ace = &entries[i];
|
||||
|
||||
if (!((ace->uid == sb->st_uid && ace->gid == ACL_NSGROUP)
|
||||
|| (ace->uid == ACL_NSUSER && ace->gid == sb->st_gid)
|
||||
|| (ace->uid == ACL_NSUSER && ace->gid == ACL_NSGROUP)))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
# if HAVE_ACLV_H /* HP-UX >= 11.11 */
|
||||
|
||||
/* Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
int
|
||||
aclv_nontrivial (int count, struct acl *entries)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
struct acl *ace = &entries[i];
|
||||
|
||||
/* Note: If ace->a_type = USER_OBJ, ace->a_id is the st_uid from stat().
|
||||
If ace->a_type = GROUP_OBJ, ace->a_id is the st_gid from stat().
|
||||
We don't need to check ace->a_id in these cases. */
|
||||
if (!(ace->a_type == USER_OBJ /* no need to check ace->a_id here */
|
||||
|| ace->a_type == GROUP_OBJ /* no need to check ace->a_id here */
|
||||
|| ace->a_type == CLASS_OBJ
|
||||
|| ace->a_type == OTHER_OBJ))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
#elif USE_ACL && (HAVE_ACLX_GET || HAVE_STATACL) /* AIX */
|
||||
|
||||
/* Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
int
|
||||
acl_nontrivial (struct acl *a)
|
||||
{
|
||||
/* The normal way to iterate through an ACL is like this:
|
||||
struct acl_entry *ace;
|
||||
for (ace = a->acl_ext; ace != acl_last (a); ace = acl_nxt (ace))
|
||||
{
|
||||
struct ace_id *aei;
|
||||
switch (ace->ace_type)
|
||||
{
|
||||
case ACC_PERMIT:
|
||||
case ACC_DENY:
|
||||
case ACC_SPECIFY:
|
||||
...;
|
||||
}
|
||||
for (aei = ace->ace_id; aei != id_last (ace); aei = id_nxt (aei))
|
||||
...
|
||||
}
|
||||
*/
|
||||
return (acl_last (a) != a->acl_ext ? 1 : 0);
|
||||
}
|
||||
|
||||
# if HAVE_ACLX_GET && defined ACL_AIX_WIP /* newer AIX */
|
||||
|
||||
/* Return 1 if the given ACL is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
int
|
||||
acl_nfs4_nontrivial (nfs4_acl_int_t *a)
|
||||
{
|
||||
# if 1 /* let's try this first */
|
||||
return (a->aclEntryN > 0 ? 1 : 0);
|
||||
# else
|
||||
int count = a->aclEntryN;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
nfs4_ace_int_t *ace = &a->aclEntry[i];
|
||||
|
||||
if (!((ace->flags & ACE4_ID_SPECIAL) != 0
|
||||
&& (ace->aceWho.special_whoid == ACE4_WHO_OWNER
|
||||
|| ace->aceWho.special_whoid == ACE4_WHO_GROUP
|
||||
|| ace->aceWho.special_whoid == ACE4_WHO_EVERYONE)
|
||||
&& ace->aceType == ACE4_ACCESS_ALLOWED_ACE_TYPE
|
||||
&& ace->aceFlags == 0
|
||||
&& (ace->aceMask & ~(ACE4_READ_DATA | ACE4_LIST_DIRECTORY
|
||||
| ACE4_WRITE_DATA | ACE4_ADD_FILE
|
||||
| ACE4_EXECUTE)) == 0))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
# endif
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
#elif USE_ACL && HAVE_ACLSORT /* NonStop Kernel */
|
||||
|
||||
/* Test an ACL retrieved with ACL_GET.
|
||||
Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
|
||||
Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
|
||||
int
|
||||
acl_nontrivial (int count, struct acl *entries)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
struct acl *ace = &entries[i];
|
||||
|
||||
/* Note: If ace->a_type = USER_OBJ, ace->a_id is the st_uid from stat().
|
||||
If ace->a_type = GROUP_OBJ, ace->a_id is the st_gid from stat().
|
||||
We don't need to check ace->a_id in these cases. */
|
||||
if (!(ace->a_type == USER_OBJ /* no need to check ace->a_id here */
|
||||
|| ace->a_type == GROUP_OBJ /* no need to check ace->a_id here */
|
||||
|| ace->a_type == CLASS_OBJ
|
||||
|| ace->a_type == OTHER_OBJ))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Return 1 if NAME has a nontrivial access control list, 0 if NAME
|
||||
only has no or a base access control list, and -1 (setting errno)
|
||||
on error. SB must be set to the stat buffer of NAME, obtained
|
||||
through stat() or lstat(). */
|
||||
|
||||
int
|
||||
file_has_acl (char const *name, struct stat const *sb)
|
||||
{
|
||||
#if USE_ACL
|
||||
if (! S_ISLNK (sb->st_mode))
|
||||
{
|
||||
# if HAVE_ACL_GET_FILE
|
||||
|
||||
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
|
||||
/* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
|
||||
int ret;
|
||||
|
||||
if (HAVE_ACL_EXTENDED_FILE) /* Linux */
|
||||
{
|
||||
/* On Linux, acl_extended_file is an optimized function: It only
|
||||
makes two calls to getxattr(), one for ACL_TYPE_ACCESS, one for
|
||||
ACL_TYPE_DEFAULT. */
|
||||
ret = acl_extended_file (name);
|
||||
}
|
||||
else /* FreeBSD, Mac OS X, IRIX, Tru64 */
|
||||
{
|
||||
# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
|
||||
/* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
|
||||
and acl_get_file (name, ACL_TYPE_DEFAULT)
|
||||
always return NULL / EINVAL. There is no point in making
|
||||
these two useless calls. The real ACL is retrieved through
|
||||
acl_get_file (name, ACL_TYPE_EXTENDED). */
|
||||
acl_t acl = acl_get_file (name, ACL_TYPE_EXTENDED);
|
||||
if (acl)
|
||||
{
|
||||
ret = acl_extended_nontrivial (acl);
|
||||
acl_free (acl);
|
||||
}
|
||||
else
|
||||
ret = -1;
|
||||
# else /* FreeBSD, IRIX, Tru64 */
|
||||
acl_t acl = acl_get_file (name, ACL_TYPE_ACCESS);
|
||||
if (acl)
|
||||
{
|
||||
int saved_errno;
|
||||
|
||||
ret = acl_access_nontrivial (acl);
|
||||
saved_errno = errno;
|
||||
acl_free (acl);
|
||||
errno = saved_errno;
|
||||
# if HAVE_ACL_FREE_TEXT /* Tru64 */
|
||||
/* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always
|
||||
returns NULL with errno not set. There is no point in
|
||||
making this call. */
|
||||
# else /* FreeBSD, IRIX */
|
||||
/* On Linux, FreeBSD, IRIX, acl_get_file (name, ACL_TYPE_ACCESS)
|
||||
and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory
|
||||
either both succeed or both fail; it depends on the
|
||||
file system. Therefore there is no point in making the second
|
||||
call if the first one already failed. */
|
||||
if (ret == 0 && S_ISDIR (sb->st_mode))
|
||||
{
|
||||
acl = acl_get_file (name, ACL_TYPE_DEFAULT);
|
||||
if (acl)
|
||||
{
|
||||
ret = (0 < acl_entries (acl));
|
||||
acl_free (acl);
|
||||
}
|
||||
else
|
||||
ret = -1;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
else
|
||||
ret = -1;
|
||||
# endif
|
||||
}
|
||||
if (ret < 0)
|
||||
return - acl_errno_valid (errno);
|
||||
return ret;
|
||||
|
||||
# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
|
||||
|
||||
# if defined ACL_NO_TRIVIAL
|
||||
|
||||
/* Solaris 10 (newer version), which has additional API declared in
|
||||
<sys/acl.h> (acl_t) and implemented in libsec (acl_set, acl_trivial,
|
||||
acl_fromtext, ...). */
|
||||
return acl_trivial (name);
|
||||
|
||||
# else /* Solaris, Cygwin, general case */
|
||||
|
||||
/* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
|
||||
of Unixware. The acl() call returns the access and default ACL both
|
||||
at once. */
|
||||
{
|
||||
/* Initially, try to read the entries into a stack-allocated buffer.
|
||||
Use malloc if it does not fit. */
|
||||
enum
|
||||
{
|
||||
alloc_init = 4000 / sizeof (aclent_t), /* >= 3 */
|
||||
alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (aclent_t))
|
||||
};
|
||||
aclent_t buf[alloc_init];
|
||||
size_t alloc = alloc_init;
|
||||
aclent_t *entries = buf;
|
||||
aclent_t *malloced = NULL;
|
||||
int count;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
count = acl (name, GETACL, alloc, entries);
|
||||
if (count < 0 && errno == ENOSPC)
|
||||
{
|
||||
/* Increase the size of the buffer. */
|
||||
free (malloced);
|
||||
if (alloc > alloc_max / 2)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
alloc = 2 * alloc; /* <= alloc_max */
|
||||
entries = malloced =
|
||||
(aclent_t *) malloc (alloc * sizeof (aclent_t));
|
||||
if (entries == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
if (errno == ENOSYS || errno == ENOTSUP)
|
||||
;
|
||||
else
|
||||
{
|
||||
int saved_errno = errno;
|
||||
free (malloced);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (count == 0)
|
||||
;
|
||||
else
|
||||
{
|
||||
/* Don't use MIN_ACL_ENTRIES: It's set to 4 on Cygwin, but Cygwin
|
||||
returns only 3 entries for files with no ACL. But this is safe:
|
||||
If there are more than 4 entries, there cannot be only the
|
||||
"user::", "group::", "other:", and "mask:" entries. */
|
||||
if (count > 4)
|
||||
{
|
||||
free (malloced);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (acl_nontrivial (count, entries))
|
||||
{
|
||||
free (malloced);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
free (malloced);
|
||||
}
|
||||
|
||||
# ifdef ACE_GETACL
|
||||
/* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
|
||||
file systems (whereas the other ones are used in UFS file systems). */
|
||||
{
|
||||
/* Initially, try to read the entries into a stack-allocated buffer.
|
||||
Use malloc if it does not fit. */
|
||||
enum
|
||||
{
|
||||
alloc_init = 4000 / sizeof (ace_t), /* >= 3 */
|
||||
alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (ace_t))
|
||||
};
|
||||
ace_t buf[alloc_init];
|
||||
size_t alloc = alloc_init;
|
||||
ace_t *entries = buf;
|
||||
ace_t *malloced = NULL;
|
||||
int count;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
count = acl (name, ACE_GETACL, alloc, entries);
|
||||
if (count < 0 && errno == ENOSPC)
|
||||
{
|
||||
/* Increase the size of the buffer. */
|
||||
free (malloced);
|
||||
if (alloc > alloc_max / 2)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
alloc = 2 * alloc; /* <= alloc_max */
|
||||
entries = malloced = (ace_t *) malloc (alloc * sizeof (ace_t));
|
||||
if (entries == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (count < 0)
|
||||
{
|
||||
if (errno == ENOSYS || errno == EINVAL)
|
||||
;
|
||||
else
|
||||
{
|
||||
int saved_errno = errno;
|
||||
free (malloced);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (count == 0)
|
||||
;
|
||||
else
|
||||
{
|
||||
/* In the old (original Solaris 10) convention:
|
||||
If there are more than 3 entries, there cannot be only the
|
||||
ACE_OWNER, ACE_GROUP, ACE_OTHER entries.
|
||||
In the newer Solaris 10 and Solaris 11 convention:
|
||||
If there are more than 6 entries, there cannot be only the
|
||||
ACE_OWNER, ACE_GROUP, ACE_EVERYONE entries, each once with
|
||||
NEW_ACE_ACCESS_ALLOWED_ACE_TYPE and once with
|
||||
NEW_ACE_ACCESS_DENIED_ACE_TYPE. */
|
||||
if (count > 6)
|
||||
{
|
||||
free (malloced);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (acl_ace_nontrivial (count, entries))
|
||||
{
|
||||
free (malloced);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
free (malloced);
|
||||
}
|
||||
# endif
|
||||
|
||||
return 0;
|
||||
# endif
|
||||
|
||||
# elif HAVE_GETACL /* HP-UX */
|
||||
|
||||
{
|
||||
struct acl_entry entries[NACLENTRIES];
|
||||
int count;
|
||||
|
||||
count = getacl (name, NACLENTRIES, entries);
|
||||
|
||||
if (count < 0)
|
||||
{
|
||||
/* ENOSYS is seen on newer HP-UX versions.
|
||||
EOPNOTSUPP is typically seen on NFS mounts.
|
||||
ENOTSUP was seen on Quantum StorNext file systems (cvfs). */
|
||||
if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
|
||||
;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
else if (count == 0)
|
||||
return 0;
|
||||
else /* count > 0 */
|
||||
{
|
||||
if (count > NACLENTRIES)
|
||||
/* If NACLENTRIES cannot be trusted, use dynamic memory
|
||||
allocation. */
|
||||
abort ();
|
||||
|
||||
/* If there are more than 3 entries, there cannot be only the
|
||||
(uid,%), (%,gid), (%,%) entries. */
|
||||
if (count > 3)
|
||||
return 1;
|
||||
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
||||
if (stat (name, &statbuf) < 0)
|
||||
return -1;
|
||||
|
||||
return acl_nontrivial (count, entries, &statbuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# if HAVE_ACLV_H /* HP-UX >= 11.11 */
|
||||
|
||||
{
|
||||
struct acl entries[NACLVENTRIES];
|
||||
int count;
|
||||
|
||||
count = acl ((char *) name, ACL_GET, NACLVENTRIES, entries);
|
||||
|
||||
if (count < 0)
|
||||
{
|
||||
/* EOPNOTSUPP is seen on NFS in HP-UX 11.11, 11.23.
|
||||
EINVAL is seen on NFS in HP-UX 11.31. */
|
||||
if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
|
||||
;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
else if (count == 0)
|
||||
return 0;
|
||||
else /* count > 0 */
|
||||
{
|
||||
if (count > NACLVENTRIES)
|
||||
/* If NACLVENTRIES cannot be trusted, use dynamic memory
|
||||
allocation. */
|
||||
abort ();
|
||||
|
||||
/* If there are more than 4 entries, there cannot be only the
|
||||
four base ACL entries. */
|
||||
if (count > 4)
|
||||
return 1;
|
||||
|
||||
return aclv_nontrivial (count, entries);
|
||||
}
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */
|
||||
|
||||
acl_type_t type;
|
||||
char aclbuf[1024];
|
||||
void *acl = aclbuf;
|
||||
size_t aclsize = sizeof (aclbuf);
|
||||
mode_t mode;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
/* The docs say that type being 0 is equivalent to ACL_ANY, but it
|
||||
is not true, in AIX 5.3. */
|
||||
type.u64 = ACL_ANY;
|
||||
if (aclx_get (name, 0, &type, aclbuf, &aclsize, &mode) >= 0)
|
||||
break;
|
||||
if (errno == ENOSYS)
|
||||
return 0;
|
||||
if (errno != ENOSPC)
|
||||
{
|
||||
if (acl != aclbuf)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
free (acl);
|
||||
errno = saved_errno;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
aclsize = 2 * aclsize;
|
||||
if (acl != aclbuf)
|
||||
free (acl);
|
||||
acl = malloc (aclsize);
|
||||
if (acl == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (type.u64 == ACL_AIXC)
|
||||
{
|
||||
int result = acl_nontrivial ((struct acl *) acl);
|
||||
if (acl != aclbuf)
|
||||
free (acl);
|
||||
return result;
|
||||
}
|
||||
else if (type.u64 == ACL_NFS4)
|
||||
{
|
||||
int result = acl_nfs4_nontrivial ((nfs4_acl_int_t *) acl);
|
||||
if (acl != aclbuf)
|
||||
free (acl);
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* A newer type of ACL has been introduced in the system.
|
||||
We should better support it. */
|
||||
if (acl != aclbuf)
|
||||
free (acl);
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
# elif HAVE_STATACL /* older AIX */
|
||||
|
||||
union { struct acl a; char room[4096]; } u;
|
||||
|
||||
if (statacl (name, STX_NORMAL, &u.a, sizeof (u)) < 0)
|
||||
return -1;
|
||||
|
||||
return acl_nontrivial (&u.a);
|
||||
|
||||
# elif HAVE_ACLSORT /* NonStop Kernel */
|
||||
|
||||
{
|
||||
struct acl entries[NACLENTRIES];
|
||||
int count;
|
||||
|
||||
count = acl ((char *) name, ACL_GET, NACLENTRIES, entries);
|
||||
|
||||
if (count < 0)
|
||||
{
|
||||
if (errno == ENOSYS || errno == ENOTSUP)
|
||||
;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
else if (count == 0)
|
||||
return 0;
|
||||
else /* count > 0 */
|
||||
{
|
||||
if (count > NACLENTRIES)
|
||||
/* If NACLENTRIES cannot be trusted, use dynamic memory
|
||||
allocation. */
|
||||
abort ();
|
||||
|
||||
/* If there are more than 4 entries, there cannot be only the
|
||||
four base ACL entries. */
|
||||
if (count > 4)
|
||||
return 1;
|
||||
|
||||
return acl_nontrivial (count, entries);
|
||||
}
|
||||
}
|
||||
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
@ -21,7 +21,7 @@
|
||||
# the same distribution terms as the rest of that program.
|
||||
#
|
||||
# Generated by gnulib-tool.
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=errno --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dup --avoid=fchdir --avoid=fcntl --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings
|
||||
|
||||
|
||||
MOSTLYCLEANFILES += core *.stackdump
|
||||
@ -217,6 +217,40 @@ EXTRA_libgnu_a_SOURCES += dup2.c
|
||||
|
||||
## end gnulib module dup2
|
||||
|
||||
## begin gnulib module errno
|
||||
|
||||
BUILT_SOURCES += $(ERRNO_H)
|
||||
|
||||
# We need the following in order to create <errno.h> when the system
|
||||
# doesn't have one that is POSIX compliant.
|
||||
if GL_GENERATE_ERRNO_H
|
||||
errno.h: errno.in.h $(top_builddir)/config.status
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
|
||||
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
||||
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
|
||||
-e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
|
||||
-e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
|
||||
-e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
|
||||
-e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
|
||||
-e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
|
||||
-e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
|
||||
-e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
|
||||
< $(srcdir)/errno.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
else
|
||||
errno.h: $(top_builddir)/config.status
|
||||
rm -f $@
|
||||
endif
|
||||
MOSTLYCLEANFILES += errno.h errno.h-t
|
||||
|
||||
EXTRA_DIST += errno.in.h
|
||||
|
||||
## end gnulib module errno
|
||||
|
||||
## begin gnulib module euidaccess
|
||||
|
||||
if gl_GNULIB_ENABLED_euidaccess
|
||||
@ -561,6 +595,16 @@ EXTRA_libgnu_a_SOURCES += putenv.c
|
||||
|
||||
## end gnulib module putenv
|
||||
|
||||
## begin gnulib module qacl
|
||||
|
||||
libgnu_a_SOURCES += acl-errno-valid.c file-has-acl.c qcopy-acl.c qset-acl.c
|
||||
|
||||
EXTRA_DIST += acl-internal.h acl.h acl_entries.c
|
||||
|
||||
EXTRA_libgnu_a_SOURCES += acl_entries.c
|
||||
|
||||
## end gnulib module qacl
|
||||
|
||||
## begin gnulib module readlink
|
||||
|
||||
|
||||
|
@ -23,7 +23,8 @@ ALL = gnulib
|
||||
LOCAL_FLAGS = -I. -I../nt/inc -I../src
|
||||
LIBS =
|
||||
|
||||
GNULIBOBJS = $(BLD)/c-ctype.$(O) \
|
||||
GNULIBOBJS = $(BLD)/acl-errno-valid.$(O) \
|
||||
$(BLD)/c-ctype.$(O) \
|
||||
$(BLD)/c-strcasecmp.$(O) \
|
||||
$(BLD)/c-strncasecmp.$(O) \
|
||||
$(BLD)/close-stream.$(O) \
|
||||
@ -77,6 +78,9 @@ GNU_LIB = .
|
||||
SRC = $(EMACS_ROOT)/src
|
||||
NT_INC = $(EMACS_ROOT)/nt/inc
|
||||
|
||||
ACL_H = $(GNU_LIB)/acl.h \
|
||||
$(NT_INC)/sys/stat.h \
|
||||
$(NT_INC)/stdbool.h
|
||||
C_CTYPE_H = $(GNU_LIB)/c-ctype.h \
|
||||
$(NT_INC)/stdbool.h
|
||||
MS_W32_H = $(NT_INC)/ms-w32.h \
|
||||
@ -109,6 +113,11 @@ SIG2STR_H = $(GNU_LIB)/sig2str.h \
|
||||
STAT_TIME_H = $(GNU_LIB)/stat-time.h \
|
||||
$(NT_INC)/sys/stat.h
|
||||
|
||||
$(BLD)/acl-errno-valid.$(O) : \
|
||||
$(GNU_LIB)/acl-errno-valid.c \
|
||||
$(ACL_H) \
|
||||
$(CONFIG_H)
|
||||
|
||||
$(BLD)/c-ctype.$(O) : \
|
||||
$(GNU_LIB)/c-ctype.c \
|
||||
$(CONFIG_H) \
|
||||
|
583
lib/qcopy-acl.c
Normal file
583
lib/qcopy-acl.c
Normal file
@ -0,0 +1,583 @@
|
||||
/* copy-acl.c - copy access control list from one file to another file
|
||||
|
||||
Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "acl.h"
|
||||
|
||||
#include "acl-internal.h"
|
||||
|
||||
|
||||
/* Copy access control lists from one file to another. If SOURCE_DESC is
|
||||
a valid file descriptor, use file descriptor operations, else use
|
||||
filename based operations on SRC_NAME. Likewise for DEST_DESC and
|
||||
DST_NAME.
|
||||
If access control lists are not available, fchmod the target file to
|
||||
MODE. Also sets the non-permission bits of the destination file
|
||||
(S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
|
||||
Return 0 if successful.
|
||||
Return -2 and set errno for an error relating to the source file.
|
||||
Return -1 and set errno for an error relating to the destination file. */
|
||||
|
||||
int
|
||||
qcopy_acl (const char *src_name, int source_desc, const char *dst_name,
|
||||
int dest_desc, mode_t mode)
|
||||
{
|
||||
#if USE_ACL && HAVE_ACL_GET_FILE
|
||||
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
|
||||
/* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
|
||||
# if !HAVE_ACL_TYPE_EXTENDED
|
||||
/* Linux, FreeBSD, IRIX, Tru64 */
|
||||
|
||||
acl_t acl;
|
||||
int ret;
|
||||
|
||||
if (HAVE_ACL_GET_FD && source_desc != -1)
|
||||
acl = acl_get_fd (source_desc);
|
||||
else
|
||||
acl = acl_get_file (src_name, ACL_TYPE_ACCESS);
|
||||
if (acl == NULL)
|
||||
{
|
||||
if (! acl_errno_valid (errno))
|
||||
return qset_acl (dst_name, dest_desc, mode);
|
||||
else
|
||||
return -2;
|
||||
}
|
||||
|
||||
if (HAVE_ACL_SET_FD && dest_desc != -1)
|
||||
ret = acl_set_fd (dest_desc, acl);
|
||||
else
|
||||
ret = acl_set_file (dst_name, ACL_TYPE_ACCESS, acl);
|
||||
if (ret != 0)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
|
||||
if (! acl_errno_valid (errno) && !acl_access_nontrivial (acl))
|
||||
{
|
||||
acl_free (acl);
|
||||
return chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
acl_free (acl);
|
||||
chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
acl_free (acl);
|
||||
|
||||
if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
|
||||
{
|
||||
/* We did not call chmod so far, and either the mode and the ACL are
|
||||
separate or special bits are to be set which don't fit into ACLs. */
|
||||
|
||||
if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (S_ISDIR (mode))
|
||||
{
|
||||
acl = acl_get_file (src_name, ACL_TYPE_DEFAULT);
|
||||
if (acl == NULL)
|
||||
return -2;
|
||||
|
||||
if (acl_set_file (dst_name, ACL_TYPE_DEFAULT, acl))
|
||||
{
|
||||
int saved_errno = errno;
|
||||
|
||||
acl_free (acl);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
acl_free (acl);
|
||||
}
|
||||
return 0;
|
||||
|
||||
# else /* HAVE_ACL_TYPE_EXTENDED */
|
||||
/* Mac OS X */
|
||||
|
||||
/* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
|
||||
and acl_get_file (name, ACL_TYPE_DEFAULT)
|
||||
always return NULL / EINVAL. You have to use
|
||||
acl_get_file (name, ACL_TYPE_EXTENDED)
|
||||
or acl_get_fd (open (name, ...))
|
||||
to retrieve an ACL.
|
||||
On the other hand,
|
||||
acl_set_file (name, ACL_TYPE_ACCESS, acl)
|
||||
and acl_set_file (name, ACL_TYPE_DEFAULT, acl)
|
||||
have the same effect as
|
||||
acl_set_file (name, ACL_TYPE_EXTENDED, acl):
|
||||
Each of these calls sets the file's ACL. */
|
||||
|
||||
acl_t acl;
|
||||
int ret;
|
||||
|
||||
if (HAVE_ACL_GET_FD && source_desc != -1)
|
||||
acl = acl_get_fd (source_desc);
|
||||
else
|
||||
acl = acl_get_file (src_name, ACL_TYPE_EXTENDED);
|
||||
if (acl == NULL)
|
||||
{
|
||||
if (!acl_errno_valid (errno))
|
||||
return qset_acl (dst_name, dest_desc, mode);
|
||||
else
|
||||
return -2;
|
||||
}
|
||||
|
||||
if (HAVE_ACL_SET_FD && dest_desc != -1)
|
||||
ret = acl_set_fd (dest_desc, acl);
|
||||
else
|
||||
ret = acl_set_file (dst_name, ACL_TYPE_EXTENDED, acl);
|
||||
if (ret != 0)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
|
||||
if (!acl_errno_valid (saved_errno) && !acl_extended_nontrivial (acl))
|
||||
{
|
||||
acl_free (acl);
|
||||
return chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
acl_free (acl);
|
||||
chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
acl_free (acl);
|
||||
|
||||
/* Since !MODE_INSIDE_ACL, we have to call chmod explicitly. */
|
||||
return chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||
|
||||
# endif
|
||||
|
||||
#elif USE_ACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
|
||||
|
||||
/* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
|
||||
of Unixware. The acl() call returns the access and default ACL both
|
||||
at once. */
|
||||
# ifdef ACE_GETACL
|
||||
int ace_count;
|
||||
ace_t *ace_entries;
|
||||
# endif
|
||||
int count;
|
||||
aclent_t *entries;
|
||||
int did_chmod;
|
||||
int saved_errno;
|
||||
int ret;
|
||||
|
||||
# ifdef ACE_GETACL
|
||||
/* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
|
||||
file systems (whereas the other ones are used in UFS file systems).
|
||||
There is an API
|
||||
pathconf (name, _PC_ACL_ENABLED)
|
||||
fpathconf (desc, _PC_ACL_ENABLED)
|
||||
that allows to determine which of the two kinds of ACLs is supported
|
||||
for the given file. But some file systems may implement this call
|
||||
incorrectly, so better not use it.
|
||||
When fetching the source ACL, we simply fetch both ACL types.
|
||||
When setting the destination ACL, we try either ACL types, assuming
|
||||
that the kernel will translate the ACL from one form to the other.
|
||||
(See in <http://docs.sun.com/app/docs/doc/819-2241/6n4huc7ia?l=en&a=view>
|
||||
the description of ENOTSUP.) */
|
||||
for (;;)
|
||||
{
|
||||
ace_count = (source_desc != -1
|
||||
? facl (source_desc, ACE_GETACLCNT, 0, NULL)
|
||||
: acl (src_name, ACE_GETACLCNT, 0, NULL));
|
||||
|
||||
if (ace_count < 0)
|
||||
{
|
||||
if (errno == ENOSYS || errno == EINVAL)
|
||||
{
|
||||
ace_count = 0;
|
||||
ace_entries = NULL;
|
||||
break;
|
||||
}
|
||||
else
|
||||
return -2;
|
||||
}
|
||||
|
||||
if (ace_count == 0)
|
||||
{
|
||||
ace_entries = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
ace_entries = (ace_t *) malloc (ace_count * sizeof (ace_t));
|
||||
if (ace_entries == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -2;
|
||||
}
|
||||
|
||||
ret = (source_desc != -1
|
||||
? facl (source_desc, ACE_GETACL, ace_count, ace_entries)
|
||||
: acl (src_name, ACE_GETACL, ace_count, ace_entries));
|
||||
if (ret < 0)
|
||||
{
|
||||
free (ace_entries);
|
||||
if (errno == ENOSYS || errno == EINVAL)
|
||||
{
|
||||
ace_count = 0;
|
||||
ace_entries = NULL;
|
||||
break;
|
||||
}
|
||||
else
|
||||
return -2;
|
||||
}
|
||||
if (ret == ace_count)
|
||||
break;
|
||||
/* Huh? The number of ACL entries changed since the last call.
|
||||
Repeat. */
|
||||
}
|
||||
# endif
|
||||
|
||||
for (;;)
|
||||
{
|
||||
count = (source_desc != -1
|
||||
? facl (source_desc, GETACLCNT, 0, NULL)
|
||||
: acl (src_name, GETACLCNT, 0, NULL));
|
||||
|
||||
if (count < 0)
|
||||
{
|
||||
if (errno == ENOSYS || errno == ENOTSUP || errno == EOPNOTSUPP)
|
||||
{
|
||||
count = 0;
|
||||
entries = NULL;
|
||||
break;
|
||||
}
|
||||
else
|
||||
return -2;
|
||||
}
|
||||
|
||||
if (count == 0)
|
||||
{
|
||||
entries = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
entries = (aclent_t *) malloc (count * sizeof (aclent_t));
|
||||
if (entries == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -2;
|
||||
}
|
||||
|
||||
if ((source_desc != -1
|
||||
? facl (source_desc, GETACL, count, entries)
|
||||
: acl (src_name, GETACL, count, entries))
|
||||
== count)
|
||||
break;
|
||||
/* Huh? The number of ACL entries changed since the last call.
|
||||
Repeat. */
|
||||
}
|
||||
|
||||
/* Is there an ACL of either kind? */
|
||||
# ifdef ACE_GETACL
|
||||
if (ace_count == 0)
|
||||
# endif
|
||||
if (count == 0)
|
||||
return qset_acl (dst_name, dest_desc, mode);
|
||||
|
||||
did_chmod = 0; /* set to 1 once the mode bits in 0777 have been set */
|
||||
saved_errno = 0; /* the first non-ignorable error code */
|
||||
|
||||
if (!MODE_INSIDE_ACL)
|
||||
{
|
||||
/* On Cygwin, it is necessary to call chmod before acl, because
|
||||
chmod can change the contents of the ACL (in ways that don't
|
||||
change the allowed accesses, but still visible). */
|
||||
if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
|
||||
saved_errno = errno;
|
||||
did_chmod = 1;
|
||||
}
|
||||
|
||||
/* If both ace_entries and entries are available, try SETACL before
|
||||
ACE_SETACL, because SETACL cannot fail with ENOTSUP whereas ACE_SETACL
|
||||
can. */
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
ret = (dest_desc != -1
|
||||
? facl (dest_desc, SETACL, count, entries)
|
||||
: acl (dst_name, SETACL, count, entries));
|
||||
if (ret < 0 && saved_errno == 0)
|
||||
{
|
||||
saved_errno = errno;
|
||||
if ((errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
|
||||
&& !acl_nontrivial (count, entries))
|
||||
saved_errno = 0;
|
||||
}
|
||||
else
|
||||
did_chmod = 1;
|
||||
}
|
||||
free (entries);
|
||||
|
||||
# ifdef ACE_GETACL
|
||||
if (ace_count > 0)
|
||||
{
|
||||
ret = (dest_desc != -1
|
||||
? facl (dest_desc, ACE_SETACL, ace_count, ace_entries)
|
||||
: acl (dst_name, ACE_SETACL, ace_count, ace_entries));
|
||||
if (ret < 0 && saved_errno == 0)
|
||||
{
|
||||
saved_errno = errno;
|
||||
if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP)
|
||||
&& !acl_ace_nontrivial (ace_count, ace_entries))
|
||||
saved_errno = 0;
|
||||
}
|
||||
}
|
||||
free (ace_entries);
|
||||
# endif
|
||||
|
||||
if (MODE_INSIDE_ACL
|
||||
&& did_chmod <= ((mode & (S_ISUID | S_ISGID | S_ISVTX)) ? 1 : 0))
|
||||
{
|
||||
/* We did not call chmod so far, and either the mode and the ACL are
|
||||
separate or special bits are to be set which don't fit into ACLs. */
|
||||
|
||||
if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
|
||||
{
|
||||
if (saved_errno == 0)
|
||||
saved_errno = errno;
|
||||
}
|
||||
}
|
||||
|
||||
if (saved_errno)
|
||||
{
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
#elif USE_ACL && HAVE_GETACL /* HP-UX */
|
||||
|
||||
struct acl_entry entries[NACLENTRIES];
|
||||
int count;
|
||||
# if HAVE_ACLV_H
|
||||
struct acl aclv_entries[NACLVENTRIES];
|
||||
int aclv_count;
|
||||
# endif
|
||||
int did_chmod;
|
||||
int saved_errno;
|
||||
int ret;
|
||||
|
||||
count = (source_desc != -1
|
||||
? fgetacl (source_desc, NACLENTRIES, entries)
|
||||
: getacl (src_name, NACLENTRIES, entries));
|
||||
|
||||
if (count < 0)
|
||||
{
|
||||
if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
|
||||
count = 0;
|
||||
else
|
||||
return -2;
|
||||
}
|
||||
else if (count > 0)
|
||||
{
|
||||
if (count > NACLENTRIES)
|
||||
/* If NACLENTRIES cannot be trusted, use dynamic memory allocation. */
|
||||
abort ();
|
||||
}
|
||||
|
||||
# if HAVE_ACLV_H
|
||||
aclv_count = acl ((char *) src_name, ACL_GET, NACLVENTRIES, aclv_entries);
|
||||
|
||||
if (aclv_count < 0)
|
||||
{
|
||||
if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
|
||||
count = 0;
|
||||
else
|
||||
return -2;
|
||||
}
|
||||
else if (aclv_count > 0)
|
||||
{
|
||||
if (aclv_count > NACLVENTRIES)
|
||||
/* If NACLVENTRIES cannot be trusted, use dynamic memory allocation. */
|
||||
abort ();
|
||||
}
|
||||
# endif
|
||||
|
||||
if (count == 0)
|
||||
# if HAVE_ACLV_H
|
||||
if (aclv_count == 0)
|
||||
# endif
|
||||
return qset_acl (dst_name, dest_desc, mode);
|
||||
|
||||
did_chmod = 0; /* set to 1 once the mode bits in 0777 have been set */
|
||||
saved_errno = 0; /* the first non-ignorable error code */
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
ret = (dest_desc != -1
|
||||
? fsetacl (dest_desc, count, entries)
|
||||
: setacl (dst_name, count, entries));
|
||||
if (ret < 0 && saved_errno == 0)
|
||||
{
|
||||
saved_errno = errno;
|
||||
if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
|
||||
{
|
||||
struct stat source_statbuf;
|
||||
|
||||
if ((source_desc != -1
|
||||
? fstat (source_desc, &source_statbuf)
|
||||
: stat (src_name, &source_statbuf)) == 0)
|
||||
{
|
||||
if (!acl_nontrivial (count, entries, &source_statbuf))
|
||||
saved_errno = 0;
|
||||
}
|
||||
else
|
||||
saved_errno = errno;
|
||||
}
|
||||
}
|
||||
else
|
||||
did_chmod = 1;
|
||||
}
|
||||
|
||||
# if HAVE_ACLV_H
|
||||
if (aclv_count > 0)
|
||||
{
|
||||
ret = acl ((char *) dst_name, ACL_SET, aclv_count, aclv_entries);
|
||||
if (ret < 0 && saved_errno == 0)
|
||||
{
|
||||
saved_errno = errno;
|
||||
if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
|
||||
{
|
||||
if (!aclv_nontrivial (aclv_count, aclv_entries))
|
||||
saved_errno = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
did_chmod = 1;
|
||||
}
|
||||
# endif
|
||||
|
||||
if (did_chmod <= ((mode & (S_ISUID | S_ISGID | S_ISVTX)) ? 1 : 0))
|
||||
{
|
||||
/* We did not call chmod so far, and special bits are to be set which
|
||||
don't fit into ACLs. */
|
||||
|
||||
if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
|
||||
{
|
||||
if (saved_errno == 0)
|
||||
saved_errno = errno;
|
||||
}
|
||||
}
|
||||
|
||||
if (saved_errno)
|
||||
{
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
#elif USE_ACL && HAVE_ACLX_GET && 0 /* AIX */
|
||||
|
||||
/* TODO */
|
||||
|
||||
#elif USE_ACL && HAVE_STATACL /* older AIX */
|
||||
|
||||
union { struct acl a; char room[4096]; } u;
|
||||
int ret;
|
||||
|
||||
if ((source_desc != -1
|
||||
? fstatacl (source_desc, STX_NORMAL, &u.a, sizeof (u))
|
||||
: statacl (src_name, STX_NORMAL, &u.a, sizeof (u)))
|
||||
< 0)
|
||||
return -2;
|
||||
|
||||
ret = (dest_desc != -1
|
||||
? fchacl (dest_desc, &u.a, u.a.acl_len)
|
||||
: chacl (dst_name, &u.a, u.a.acl_len));
|
||||
if (ret < 0)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
|
||||
chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* No need to call chmod_or_fchmod at this point, since the mode bits
|
||||
S_ISUID, S_ISGID, S_ISVTX are also stored in the ACL. */
|
||||
|
||||
return 0;
|
||||
|
||||
#elif USE_ACL && HAVE_ACLSORT /* NonStop Kernel */
|
||||
|
||||
struct acl entries[NACLENTRIES];
|
||||
int count;
|
||||
int ret;
|
||||
|
||||
count = acl ((char *) src_name, ACL_GET, NACLENTRIES, entries);
|
||||
|
||||
if (count < 0)
|
||||
{
|
||||
if (0)
|
||||
count = 0;
|
||||
else
|
||||
return -2;
|
||||
}
|
||||
else if (count > 0)
|
||||
{
|
||||
if (count > NACLENTRIES)
|
||||
/* If NACLENTRIES cannot be trusted, use dynamic memory allocation. */
|
||||
abort ();
|
||||
}
|
||||
|
||||
if (count == 0)
|
||||
return qset_acl (dst_name, dest_desc, mode);
|
||||
|
||||
ret = acl ((char *) dst_name, ACL_SET, count, entries);
|
||||
if (ret < 0)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
|
||||
if (0)
|
||||
{
|
||||
if (!acl_nontrivial (count, entries))
|
||||
return chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||
}
|
||||
|
||||
chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (mode & (S_ISUID | S_ISGID | S_ISVTX))
|
||||
{
|
||||
/* We did not call chmod so far, and either the mode and the ACL are
|
||||
separate or special bits are to be set which don't fit into ACLs. */
|
||||
|
||||
return chmod_or_fchmod (dst_name, dest_desc, mode);
|
||||
}
|
||||
return 0;
|
||||
|
||||
#else
|
||||
|
||||
return qset_acl (dst_name, dest_desc, mode);
|
||||
|
||||
#endif
|
||||
}
|
676
lib/qset-acl.c
Normal file
676
lib/qset-acl.c
Normal file
@ -0,0 +1,676 @@
|
||||
/* qset-acl.c - set access control list equivalent to a mode
|
||||
|
||||
Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc.
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Written by Paul Eggert and Andreas Gruenbacher, and Bruno Haible. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#define ACL_INTERNAL_INLINE _GL_EXTERN_INLINE
|
||||
|
||||
#include "acl.h"
|
||||
|
||||
#include "acl-internal.h"
|
||||
|
||||
|
||||
/* If DESC is a valid file descriptor use fchmod to change the
|
||||
file's mode to MODE on systems that have fchmod. On systems
|
||||
that don't have fchmod and if DESC is invalid, use chmod on
|
||||
NAME instead.
|
||||
Return 0 if successful. Return -1 and set errno upon failure. */
|
||||
|
||||
int
|
||||
chmod_or_fchmod (const char *name, int desc, mode_t mode)
|
||||
{
|
||||
if (HAVE_FCHMOD && desc != -1)
|
||||
return fchmod (desc, mode);
|
||||
else
|
||||
return chmod (name, mode);
|
||||
}
|
||||
|
||||
/* Set the access control lists of a file. If DESC is a valid file
|
||||
descriptor, use file descriptor operations where available, else use
|
||||
filename based operations on NAME. If access control lists are not
|
||||
available, fchmod the target file to MODE. Also sets the
|
||||
non-permission bits of the destination file (S_ISUID, S_ISGID, S_ISVTX)
|
||||
to those from MODE if any are set.
|
||||
Return 0 if successful. Return -1 and set errno upon failure. */
|
||||
|
||||
int
|
||||
qset_acl (char const *name, int desc, mode_t mode)
|
||||
{
|
||||
#if USE_ACL
|
||||
# if HAVE_ACL_GET_FILE
|
||||
/* POSIX 1003.1e draft 17 (abandoned) specific version. */
|
||||
/* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */
|
||||
# if !HAVE_ACL_TYPE_EXTENDED
|
||||
/* Linux, FreeBSD, IRIX, Tru64 */
|
||||
|
||||
/* We must also have acl_from_text and acl_delete_def_file.
|
||||
(acl_delete_def_file could be emulated with acl_init followed
|
||||
by acl_set_file, but acl_set_file with an empty acl is
|
||||
unspecified.) */
|
||||
|
||||
# ifndef HAVE_ACL_FROM_TEXT
|
||||
# error Must have acl_from_text (see POSIX 1003.1e draft 17).
|
||||
# endif
|
||||
# ifndef HAVE_ACL_DELETE_DEF_FILE
|
||||
# error Must have acl_delete_def_file (see POSIX 1003.1e draft 17).
|
||||
# endif
|
||||
|
||||
acl_t acl;
|
||||
int ret;
|
||||
|
||||
if (HAVE_ACL_FROM_MODE) /* Linux */
|
||||
{
|
||||
acl = acl_from_mode (mode);
|
||||
if (!acl)
|
||||
return -1;
|
||||
}
|
||||
else /* FreeBSD, IRIX, Tru64 */
|
||||
{
|
||||
/* If we were to create the ACL using the functions acl_init(),
|
||||
acl_create_entry(), acl_set_tag_type(), acl_set_qualifier(),
|
||||
acl_get_permset(), acl_clear_perm[s](), acl_add_perm(), we
|
||||
would need to create a qualifier. I don't know how to do this.
|
||||
So create it using acl_from_text(). */
|
||||
|
||||
# if HAVE_ACL_FREE_TEXT /* Tru64 */
|
||||
char acl_text[] = "u::---,g::---,o::---,";
|
||||
# else /* FreeBSD, IRIX */
|
||||
char acl_text[] = "u::---,g::---,o::---";
|
||||
# endif
|
||||
|
||||
if (mode & S_IRUSR) acl_text[ 3] = 'r';
|
||||
if (mode & S_IWUSR) acl_text[ 4] = 'w';
|
||||
if (mode & S_IXUSR) acl_text[ 5] = 'x';
|
||||
if (mode & S_IRGRP) acl_text[10] = 'r';
|
||||
if (mode & S_IWGRP) acl_text[11] = 'w';
|
||||
if (mode & S_IXGRP) acl_text[12] = 'x';
|
||||
if (mode & S_IROTH) acl_text[17] = 'r';
|
||||
if (mode & S_IWOTH) acl_text[18] = 'w';
|
||||
if (mode & S_IXOTH) acl_text[19] = 'x';
|
||||
|
||||
acl = acl_from_text (acl_text);
|
||||
if (!acl)
|
||||
return -1;
|
||||
}
|
||||
if (HAVE_ACL_SET_FD && desc != -1)
|
||||
ret = acl_set_fd (desc, acl);
|
||||
else
|
||||
ret = acl_set_file (name, ACL_TYPE_ACCESS, acl);
|
||||
if (ret != 0)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
acl_free (acl);
|
||||
if (! acl_errno_valid (errno))
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
acl_free (acl);
|
||||
|
||||
if (S_ISDIR (mode) && acl_delete_def_file (name))
|
||||
return -1;
|
||||
|
||||
if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
|
||||
{
|
||||
/* We did not call chmod so far, and either the mode and the ACL are
|
||||
separate or special bits are to be set which don't fit into ACLs. */
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
}
|
||||
return 0;
|
||||
|
||||
# else /* HAVE_ACL_TYPE_EXTENDED */
|
||||
/* Mac OS X */
|
||||
|
||||
/* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
|
||||
and acl_get_file (name, ACL_TYPE_DEFAULT)
|
||||
always return NULL / EINVAL. You have to use
|
||||
acl_get_file (name, ACL_TYPE_EXTENDED)
|
||||
or acl_get_fd (open (name, ...))
|
||||
to retrieve an ACL.
|
||||
On the other hand,
|
||||
acl_set_file (name, ACL_TYPE_ACCESS, acl)
|
||||
and acl_set_file (name, ACL_TYPE_DEFAULT, acl)
|
||||
have the same effect as
|
||||
acl_set_file (name, ACL_TYPE_EXTENDED, acl):
|
||||
Each of these calls sets the file's ACL. */
|
||||
|
||||
acl_t acl;
|
||||
int ret;
|
||||
|
||||
/* Remove the ACL if the file has ACLs. */
|
||||
if (HAVE_ACL_GET_FD && desc != -1)
|
||||
acl = acl_get_fd (desc);
|
||||
else
|
||||
acl = acl_get_file (name, ACL_TYPE_EXTENDED);
|
||||
if (acl)
|
||||
{
|
||||
acl_free (acl);
|
||||
|
||||
acl = acl_init (0);
|
||||
if (acl)
|
||||
{
|
||||
if (HAVE_ACL_SET_FD && desc != -1)
|
||||
ret = acl_set_fd (desc, acl);
|
||||
else
|
||||
ret = acl_set_file (name, ACL_TYPE_EXTENDED, acl);
|
||||
if (ret != 0)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
acl_free (acl);
|
||||
if (! acl_errno_valid (saved_errno))
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
acl_free (acl);
|
||||
}
|
||||
}
|
||||
|
||||
/* Since !MODE_INSIDE_ACL, we have to call chmod explicitly. */
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
# endif
|
||||
|
||||
# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
|
||||
|
||||
int done_setacl = 0;
|
||||
|
||||
# ifdef ACE_GETACL
|
||||
/* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
|
||||
file systems (whereas the other ones are used in UFS file systems). */
|
||||
|
||||
/* The flags in the ace_t structure changed in a binary incompatible way
|
||||
when ACL_NO_TRIVIAL etc. were introduced in <sys/acl.h> version 1.15.
|
||||
How to distinguish the two conventions at runtime?
|
||||
We fetch the existing ACL. In the old convention, usually three ACEs have
|
||||
a_flags = ACE_OWNER / ACE_GROUP / ACE_OTHER, in the range 0x0100..0x0400.
|
||||
In the new convention, these values are not used. */
|
||||
int convention;
|
||||
|
||||
{
|
||||
/* Initially, try to read the entries into a stack-allocated buffer.
|
||||
Use malloc if it does not fit. */
|
||||
enum
|
||||
{
|
||||
alloc_init = 4000 / sizeof (ace_t), /* >= 3 */
|
||||
alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (ace_t))
|
||||
};
|
||||
ace_t buf[alloc_init];
|
||||
size_t alloc = alloc_init;
|
||||
ace_t *entries = buf;
|
||||
ace_t *malloced = NULL;
|
||||
int count;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
count = (desc != -1
|
||||
? facl (desc, ACE_GETACL, alloc, entries)
|
||||
: acl (name, ACE_GETACL, alloc, entries));
|
||||
if (count < 0 && errno == ENOSPC)
|
||||
{
|
||||
/* Increase the size of the buffer. */
|
||||
free (malloced);
|
||||
if (alloc > alloc_max / 2)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
alloc = 2 * alloc; /* <= alloc_max */
|
||||
entries = malloced = (ace_t *) malloc (alloc * sizeof (ace_t));
|
||||
if (entries == NULL)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (count <= 0)
|
||||
convention = -1;
|
||||
else
|
||||
{
|
||||
int i;
|
||||
|
||||
convention = 0;
|
||||
for (i = 0; i < count; i++)
|
||||
if (entries[i].a_flags & (OLD_ACE_OWNER | OLD_ACE_GROUP | OLD_ACE_OTHER))
|
||||
{
|
||||
convention = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
free (malloced);
|
||||
}
|
||||
|
||||
if (convention >= 0)
|
||||
{
|
||||
ace_t entries[6];
|
||||
int count;
|
||||
int ret;
|
||||
|
||||
if (convention)
|
||||
{
|
||||
/* Running on Solaris 10. */
|
||||
entries[0].a_type = OLD_ALLOW;
|
||||
entries[0].a_flags = OLD_ACE_OWNER;
|
||||
entries[0].a_who = 0; /* irrelevant */
|
||||
entries[0].a_access_mask = (mode >> 6) & 7;
|
||||
entries[1].a_type = OLD_ALLOW;
|
||||
entries[1].a_flags = OLD_ACE_GROUP;
|
||||
entries[1].a_who = 0; /* irrelevant */
|
||||
entries[1].a_access_mask = (mode >> 3) & 7;
|
||||
entries[2].a_type = OLD_ALLOW;
|
||||
entries[2].a_flags = OLD_ACE_OTHER;
|
||||
entries[2].a_who = 0;
|
||||
entries[2].a_access_mask = mode & 7;
|
||||
count = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Running on Solaris 10 (newer version) or Solaris 11.
|
||||
The details here were found through "/bin/ls -lvd somefiles". */
|
||||
entries[0].a_type = NEW_ACE_ACCESS_DENIED_ACE_TYPE;
|
||||
entries[0].a_flags = NEW_ACE_OWNER;
|
||||
entries[0].a_who = 0; /* irrelevant */
|
||||
entries[0].a_access_mask = 0;
|
||||
entries[1].a_type = NEW_ACE_ACCESS_ALLOWED_ACE_TYPE;
|
||||
entries[1].a_flags = NEW_ACE_OWNER;
|
||||
entries[1].a_who = 0; /* irrelevant */
|
||||
entries[1].a_access_mask = NEW_ACE_WRITE_NAMED_ATTRS
|
||||
| NEW_ACE_WRITE_ATTRIBUTES
|
||||
| NEW_ACE_WRITE_ACL
|
||||
| NEW_ACE_WRITE_OWNER;
|
||||
if (mode & 0400)
|
||||
entries[1].a_access_mask |= NEW_ACE_READ_DATA;
|
||||
else
|
||||
entries[0].a_access_mask |= NEW_ACE_READ_DATA;
|
||||
if (mode & 0200)
|
||||
entries[1].a_access_mask |= NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA;
|
||||
else
|
||||
entries[0].a_access_mask |= NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA;
|
||||
if (mode & 0100)
|
||||
entries[1].a_access_mask |= NEW_ACE_EXECUTE;
|
||||
else
|
||||
entries[0].a_access_mask |= NEW_ACE_EXECUTE;
|
||||
entries[2].a_type = NEW_ACE_ACCESS_DENIED_ACE_TYPE;
|
||||
entries[2].a_flags = NEW_ACE_GROUP | NEW_ACE_IDENTIFIER_GROUP;
|
||||
entries[2].a_who = 0; /* irrelevant */
|
||||
entries[2].a_access_mask = 0;
|
||||
entries[3].a_type = NEW_ACE_ACCESS_ALLOWED_ACE_TYPE;
|
||||
entries[3].a_flags = NEW_ACE_GROUP | NEW_ACE_IDENTIFIER_GROUP;
|
||||
entries[3].a_who = 0; /* irrelevant */
|
||||
entries[3].a_access_mask = 0;
|
||||
if (mode & 0040)
|
||||
entries[3].a_access_mask |= NEW_ACE_READ_DATA;
|
||||
else
|
||||
entries[2].a_access_mask |= NEW_ACE_READ_DATA;
|
||||
if (mode & 0020)
|
||||
entries[3].a_access_mask |= NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA;
|
||||
else
|
||||
entries[2].a_access_mask |= NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA;
|
||||
if (mode & 0010)
|
||||
entries[3].a_access_mask |= NEW_ACE_EXECUTE;
|
||||
else
|
||||
entries[2].a_access_mask |= NEW_ACE_EXECUTE;
|
||||
entries[4].a_type = NEW_ACE_ACCESS_DENIED_ACE_TYPE;
|
||||
entries[4].a_flags = NEW_ACE_EVERYONE;
|
||||
entries[4].a_who = 0;
|
||||
entries[4].a_access_mask = NEW_ACE_WRITE_NAMED_ATTRS
|
||||
| NEW_ACE_WRITE_ATTRIBUTES
|
||||
| NEW_ACE_WRITE_ACL
|
||||
| NEW_ACE_WRITE_OWNER;
|
||||
entries[5].a_type = NEW_ACE_ACCESS_ALLOWED_ACE_TYPE;
|
||||
entries[5].a_flags = NEW_ACE_EVERYONE;
|
||||
entries[5].a_who = 0;
|
||||
entries[5].a_access_mask = NEW_ACE_READ_NAMED_ATTRS
|
||||
| NEW_ACE_READ_ATTRIBUTES
|
||||
| NEW_ACE_READ_ACL
|
||||
| NEW_ACE_SYNCHRONIZE;
|
||||
if (mode & 0004)
|
||||
entries[5].a_access_mask |= NEW_ACE_READ_DATA;
|
||||
else
|
||||
entries[4].a_access_mask |= NEW_ACE_READ_DATA;
|
||||
if (mode & 0002)
|
||||
entries[5].a_access_mask |= NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA;
|
||||
else
|
||||
entries[4].a_access_mask |= NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA;
|
||||
if (mode & 0001)
|
||||
entries[5].a_access_mask |= NEW_ACE_EXECUTE;
|
||||
else
|
||||
entries[4].a_access_mask |= NEW_ACE_EXECUTE;
|
||||
count = 6;
|
||||
}
|
||||
if (desc != -1)
|
||||
ret = facl (desc, ACE_SETACL, count, entries);
|
||||
else
|
||||
ret = acl (name, ACE_SETACL, count, entries);
|
||||
if (ret < 0 && errno != EINVAL && errno != ENOTSUP)
|
||||
{
|
||||
if (errno == ENOSYS)
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
return -1;
|
||||
}
|
||||
if (ret == 0)
|
||||
done_setacl = 1;
|
||||
}
|
||||
# endif
|
||||
|
||||
if (!done_setacl)
|
||||
{
|
||||
aclent_t entries[3];
|
||||
int ret;
|
||||
|
||||
entries[0].a_type = USER_OBJ;
|
||||
entries[0].a_id = 0; /* irrelevant */
|
||||
entries[0].a_perm = (mode >> 6) & 7;
|
||||
entries[1].a_type = GROUP_OBJ;
|
||||
entries[1].a_id = 0; /* irrelevant */
|
||||
entries[1].a_perm = (mode >> 3) & 7;
|
||||
entries[2].a_type = OTHER_OBJ;
|
||||
entries[2].a_id = 0;
|
||||
entries[2].a_perm = mode & 7;
|
||||
|
||||
if (desc != -1)
|
||||
ret = facl (desc, SETACL,
|
||||
sizeof (entries) / sizeof (aclent_t), entries);
|
||||
else
|
||||
ret = acl (name, SETACL,
|
||||
sizeof (entries) / sizeof (aclent_t), entries);
|
||||
if (ret < 0)
|
||||
{
|
||||
if (errno == ENOSYS || errno == EOPNOTSUPP)
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
|
||||
{
|
||||
/* We did not call chmod so far, so the special bits have not yet
|
||||
been set. */
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
}
|
||||
return 0;
|
||||
|
||||
# elif HAVE_GETACL /* HP-UX */
|
||||
|
||||
struct stat statbuf;
|
||||
int ret;
|
||||
|
||||
if (desc != -1)
|
||||
ret = fstat (desc, &statbuf);
|
||||
else
|
||||
ret = stat (name, &statbuf);
|
||||
if (ret < 0)
|
||||
return -1;
|
||||
|
||||
{
|
||||
struct acl_entry entries[3];
|
||||
|
||||
entries[0].uid = statbuf.st_uid;
|
||||
entries[0].gid = ACL_NSGROUP;
|
||||
entries[0].mode = (mode >> 6) & 7;
|
||||
entries[1].uid = ACL_NSUSER;
|
||||
entries[1].gid = statbuf.st_gid;
|
||||
entries[1].mode = (mode >> 3) & 7;
|
||||
entries[2].uid = ACL_NSUSER;
|
||||
entries[2].gid = ACL_NSGROUP;
|
||||
entries[2].mode = mode & 7;
|
||||
|
||||
if (desc != -1)
|
||||
ret = fsetacl (desc, sizeof (entries) / sizeof (struct acl_entry), entries);
|
||||
else
|
||||
ret = setacl (name, sizeof (entries) / sizeof (struct acl_entry), entries);
|
||||
}
|
||||
if (ret < 0)
|
||||
{
|
||||
if (!(errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP))
|
||||
return -1;
|
||||
|
||||
# if HAVE_ACLV_H /* HP-UX >= 11.11 */
|
||||
{
|
||||
struct acl entries[4];
|
||||
|
||||
entries[0].a_type = USER_OBJ;
|
||||
entries[0].a_id = 0; /* irrelevant */
|
||||
entries[0].a_perm = (mode >> 6) & 7;
|
||||
entries[1].a_type = GROUP_OBJ;
|
||||
entries[1].a_id = 0; /* irrelevant */
|
||||
entries[1].a_perm = (mode >> 3) & 7;
|
||||
entries[2].a_type = CLASS_OBJ;
|
||||
entries[2].a_id = 0;
|
||||
entries[2].a_perm = (mode >> 3) & 7;
|
||||
entries[3].a_type = OTHER_OBJ;
|
||||
entries[3].a_id = 0;
|
||||
entries[3].a_perm = mode & 7;
|
||||
|
||||
ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries);
|
||||
if (ret > 0)
|
||||
abort ();
|
||||
if (ret < 0)
|
||||
{
|
||||
if (0)
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = acl ((char *) name, ACL_SET,
|
||||
sizeof (entries) / sizeof (struct acl), entries);
|
||||
if (ret < 0)
|
||||
{
|
||||
if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL)
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
# else
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
# endif
|
||||
}
|
||||
|
||||
if (mode & (S_ISUID | S_ISGID | S_ISVTX))
|
||||
{
|
||||
/* We did not call chmod so far, so the special bits have not yet
|
||||
been set. */
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
}
|
||||
return 0;
|
||||
|
||||
# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */
|
||||
|
||||
acl_type_list_t types;
|
||||
size_t types_size = sizeof (types);
|
||||
acl_type_t type;
|
||||
|
||||
if (aclx_gettypes (name, &types, &types_size) < 0
|
||||
|| types.num_entries == 0)
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
|
||||
/* XXX Do we need to clear all types of ACLs for the given file, or is it
|
||||
sufficient to clear the first one? */
|
||||
type = types.entries[0];
|
||||
if (type.u64 == ACL_AIXC)
|
||||
{
|
||||
union { struct acl a; char room[128]; } u;
|
||||
int ret;
|
||||
|
||||
u.a.acl_len = (char *) &u.a.acl_ext[0] - (char *) &u.a; /* no entries */
|
||||
u.a.acl_mode = mode & ~(S_IXACL | 0777);
|
||||
u.a.u_access = (mode >> 6) & 7;
|
||||
u.a.g_access = (mode >> 3) & 7;
|
||||
u.a.o_access = mode & 7;
|
||||
|
||||
if (desc != -1)
|
||||
ret = aclx_fput (desc, SET_ACL | SET_MODE_S_BITS,
|
||||
type, &u.a, u.a.acl_len, mode);
|
||||
else
|
||||
ret = aclx_put (name, SET_ACL | SET_MODE_S_BITS,
|
||||
type, &u.a, u.a.acl_len, mode);
|
||||
if (!(ret < 0 && errno == ENOSYS))
|
||||
return ret;
|
||||
}
|
||||
else if (type.u64 == ACL_NFS4)
|
||||
{
|
||||
union { nfs4_acl_int_t a; char room[128]; } u;
|
||||
nfs4_ace_int_t *ace;
|
||||
int ret;
|
||||
|
||||
u.a.aclVersion = NFS4_ACL_INT_STRUCT_VERSION;
|
||||
u.a.aclEntryN = 0;
|
||||
ace = &u.a.aclEntry[0];
|
||||
{
|
||||
ace->flags = ACE4_ID_SPECIAL;
|
||||
ace->aceWho.special_whoid = ACE4_WHO_OWNER;
|
||||
ace->aceType = ACE4_ACCESS_ALLOWED_ACE_TYPE;
|
||||
ace->aceFlags = 0;
|
||||
ace->aceMask =
|
||||
(mode & 0400 ? ACE4_READ_DATA | ACE4_LIST_DIRECTORY : 0)
|
||||
| (mode & 0200
|
||||
? ACE4_WRITE_DATA | ACE4_ADD_FILE | ACE4_APPEND_DATA
|
||||
| ACE4_ADD_SUBDIRECTORY
|
||||
: 0)
|
||||
| (mode & 0100 ? ACE4_EXECUTE : 0);
|
||||
ace->aceWhoString[0] = '\0';
|
||||
ace->entryLen = (char *) &ace->aceWhoString[4] - (char *) ace;
|
||||
ace = (nfs4_ace_int_t *) (char *) &ace->aceWhoString[4];
|
||||
u.a.aclEntryN++;
|
||||
}
|
||||
{
|
||||
ace->flags = ACE4_ID_SPECIAL;
|
||||
ace->aceWho.special_whoid = ACE4_WHO_GROUP;
|
||||
ace->aceType = ACE4_ACCESS_ALLOWED_ACE_TYPE;
|
||||
ace->aceFlags = 0;
|
||||
ace->aceMask =
|
||||
(mode & 0040 ? ACE4_READ_DATA | ACE4_LIST_DIRECTORY : 0)
|
||||
| (mode & 0020
|
||||
? ACE4_WRITE_DATA | ACE4_ADD_FILE | ACE4_APPEND_DATA
|
||||
| ACE4_ADD_SUBDIRECTORY
|
||||
: 0)
|
||||
| (mode & 0010 ? ACE4_EXECUTE : 0);
|
||||
ace->aceWhoString[0] = '\0';
|
||||
ace->entryLen = (char *) &ace->aceWhoString[4] - (char *) ace;
|
||||
ace = (nfs4_ace_int_t *) (char *) &ace->aceWhoString[4];
|
||||
u.a.aclEntryN++;
|
||||
}
|
||||
{
|
||||
ace->flags = ACE4_ID_SPECIAL;
|
||||
ace->aceWho.special_whoid = ACE4_WHO_EVERYONE;
|
||||
ace->aceType = ACE4_ACCESS_ALLOWED_ACE_TYPE;
|
||||
ace->aceFlags = 0;
|
||||
ace->aceMask =
|
||||
(mode & 0004 ? ACE4_READ_DATA | ACE4_LIST_DIRECTORY : 0)
|
||||
| (mode & 0002
|
||||
? ACE4_WRITE_DATA | ACE4_ADD_FILE | ACE4_APPEND_DATA
|
||||
| ACE4_ADD_SUBDIRECTORY
|
||||
: 0)
|
||||
| (mode & 0001 ? ACE4_EXECUTE : 0);
|
||||
ace->aceWhoString[0] = '\0';
|
||||
ace->entryLen = (char *) &ace->aceWhoString[4] - (char *) ace;
|
||||
ace = (nfs4_ace_int_t *) (char *) &ace->aceWhoString[4];
|
||||
u.a.aclEntryN++;
|
||||
}
|
||||
u.a.aclLength = (char *) ace - (char *) &u.a;
|
||||
|
||||
if (desc != -1)
|
||||
ret = aclx_fput (desc, SET_ACL | SET_MODE_S_BITS,
|
||||
type, &u.a, u.a.aclLength, mode);
|
||||
else
|
||||
ret = aclx_put (name, SET_ACL | SET_MODE_S_BITS,
|
||||
type, &u.a, u.a.aclLength, mode);
|
||||
if (!(ret < 0 && errno == ENOSYS))
|
||||
return ret;
|
||||
}
|
||||
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
|
||||
# elif HAVE_STATACL /* older AIX */
|
||||
|
||||
union { struct acl a; char room[128]; } u;
|
||||
int ret;
|
||||
|
||||
u.a.acl_len = (char *) &u.a.acl_ext[0] - (char *) &u.a; /* no entries */
|
||||
u.a.acl_mode = mode & ~(S_IXACL | 0777);
|
||||
u.a.u_access = (mode >> 6) & 7;
|
||||
u.a.g_access = (mode >> 3) & 7;
|
||||
u.a.o_access = mode & 7;
|
||||
|
||||
if (desc != -1)
|
||||
ret = fchacl (desc, &u.a, u.a.acl_len);
|
||||
else
|
||||
ret = chacl (name, &u.a, u.a.acl_len);
|
||||
|
||||
if (ret < 0 && errno == ENOSYS)
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
|
||||
return ret;
|
||||
|
||||
# elif HAVE_ACLSORT /* NonStop Kernel */
|
||||
|
||||
struct acl entries[4];
|
||||
int ret;
|
||||
|
||||
entries[0].a_type = USER_OBJ;
|
||||
entries[0].a_id = 0; /* irrelevant */
|
||||
entries[0].a_perm = (mode >> 6) & 7;
|
||||
entries[1].a_type = GROUP_OBJ;
|
||||
entries[1].a_id = 0; /* irrelevant */
|
||||
entries[1].a_perm = (mode >> 3) & 7;
|
||||
entries[2].a_type = CLASS_OBJ;
|
||||
entries[2].a_id = 0;
|
||||
entries[2].a_perm = (mode >> 3) & 7;
|
||||
entries[3].a_type = OTHER_OBJ;
|
||||
entries[3].a_id = 0;
|
||||
entries[3].a_perm = mode & 7;
|
||||
|
||||
ret = aclsort (sizeof (entries) / sizeof (struct acl), 1, entries);
|
||||
if (ret > 0)
|
||||
abort ();
|
||||
if (ret < 0)
|
||||
{
|
||||
if (0)
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = acl ((char *) name, ACL_SET,
|
||||
sizeof (entries) / sizeof (struct acl), entries);
|
||||
if (ret < 0)
|
||||
{
|
||||
if (0)
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (mode & (S_ISUID | S_ISGID | S_ISVTX))
|
||||
{
|
||||
/* We did not call chmod so far, so the special bits have not yet
|
||||
been set. */
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
}
|
||||
return 0;
|
||||
|
||||
# else /* Unknown flavor of ACLs */
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
# endif
|
||||
#else /* !USE_ACL */
|
||||
return chmod_or_fchmod (name, desc, mode);
|
||||
#endif
|
||||
}
|
@ -216,15 +216,19 @@ fdutimens (int fd, char const *file, struct timespec const timespec[2])
|
||||
if (0 <= utimensat_works_really)
|
||||
{
|
||||
int result;
|
||||
# if __linux__
|
||||
# if __linux__ || __sun
|
||||
/* As recently as Linux kernel 2.6.32 (Dec 2009), several file
|
||||
systems (xfs, ntfs-3g) have bugs with a single UTIME_OMIT,
|
||||
but work if both times are either explicitly specified or
|
||||
UTIME_NOW. Work around it with a preparatory [f]stat prior
|
||||
to calling futimens/utimensat; fortunately, there is not much
|
||||
timing impact due to the extra syscall even on file systems
|
||||
where UTIME_OMIT would have worked. FIXME: Simplify this in
|
||||
2012, when file system bugs are no longer common. */
|
||||
where UTIME_OMIT would have worked.
|
||||
|
||||
The same bug occurs in Solaris 11.1 (Apr 2013).
|
||||
|
||||
FIXME: Simplify this for Linux in 2016 and for Solaris in
|
||||
2024, when file system bugs are no longer common. */
|
||||
if (adjustment_needed == 2)
|
||||
{
|
||||
if (fd < 0 ? stat (file, &st) : fstat (fd, &st))
|
||||
@ -236,7 +240,7 @@ fdutimens (int fd, char const *file, struct timespec const timespec[2])
|
||||
/* Note that st is good, in case utimensat gives ENOSYS. */
|
||||
adjustment_needed++;
|
||||
}
|
||||
# endif /* __linux__ */
|
||||
# endif
|
||||
# if HAVE_UTIMENSAT
|
||||
if (fd < 0)
|
||||
{
|
||||
@ -445,15 +449,19 @@ lutimens (char const *file, struct timespec const timespec[2])
|
||||
if (0 <= lutimensat_works_really)
|
||||
{
|
||||
int result;
|
||||
# if __linux__
|
||||
# if __linux__ || __sun
|
||||
/* As recently as Linux kernel 2.6.32 (Dec 2009), several file
|
||||
systems (xfs, ntfs-3g) have bugs with a single UTIME_OMIT,
|
||||
but work if both times are either explicitly specified or
|
||||
UTIME_NOW. Work around it with a preparatory lstat prior to
|
||||
calling utimensat; fortunately, there is not much timing
|
||||
impact due to the extra syscall even on file systems where
|
||||
UTIME_OMIT would have worked. FIXME: Simplify this in 2012,
|
||||
when file system bugs are no longer common. */
|
||||
UTIME_OMIT would have worked.
|
||||
|
||||
The same bug occurs in Solaris 11.1 (Apr 2013).
|
||||
|
||||
FIXME: Simplify this for Linux in 2016 and for Solaris in
|
||||
2024, when file system bugs are no longer common. */
|
||||
if (adjustment_needed == 2)
|
||||
{
|
||||
if (lstat (file, &st))
|
||||
@ -465,7 +473,7 @@ lutimens (char const *file, struct timespec const timespec[2])
|
||||
/* Note that st is good, in case utimensat gives ENOSYS. */
|
||||
adjustment_needed++;
|
||||
}
|
||||
# endif /* __linux__ */
|
||||
# endif
|
||||
result = utimensat (AT_FDCWD, file, ts, AT_SYMLINK_NOFOLLOW);
|
||||
# ifdef __linux__
|
||||
/* Work around a kernel bug:
|
||||
|
545
lisp/ChangeLog
545
lisp/ChangeLog
@ -1,7 +1,542 @@
|
||||
2013-05-15 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (octave-goto-function-definition): Improve
|
||||
and fix callers.
|
||||
|
||||
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/cl-extra.el (cl-getf): Return the proper value in
|
||||
the setter (bug#14387).
|
||||
|
||||
* progmodes/f90.el (f90-blocks-re): Include the terminating \> in the
|
||||
surrounding group (bug#14402).
|
||||
|
||||
2013-05-14 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* subr.el (find-tag-default-as-regexp): Return nil if `tag' is nil.
|
||||
(Bug#14390)
|
||||
|
||||
2013-05-14 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* progmodes/f90.el (f90-imenu-generic-expression):
|
||||
Fix typo in 2013-05-08 change. (Bug#14402)
|
||||
|
||||
2013-05-14 Jean-Philippe Gravel <jpgravel@gmail.com>
|
||||
|
||||
* progmodes/gdb-mi.el (gdb-running, gdb-starting):
|
||||
Remove signals for which replies are never received.
|
||||
|
||||
2013-05-14 Jean-Philippe Gravel <jpgravel@gmail.com>
|
||||
|
||||
* progmodes/gdb-mi.el: Fix non-responsive gud commands (bug#13845)
|
||||
(gdb-handler-alist, gdb-handler-number): Remove variables.
|
||||
(gdb-handler-list): New variable.
|
||||
(gdb-add-handler, gdb-delete-handler, gdb-get-handler-function)
|
||||
(gdb-pending-handler-p, gdb-handle-reply)
|
||||
(gdb-remove-all-pending-triggers): New functions.
|
||||
(gdb-discard-unordered-replies): New defcustom.
|
||||
(gdb-handler): New defstruct.
|
||||
(gdb-wait-for-pending): Fix invalid backquote. Use gdb-handler-list.
|
||||
instead of gdb-pending-triggers. Update docstring.
|
||||
(gdb-init-1): Remove dead variables. Initialize gdb-handler-list.
|
||||
(gdb-speedbar-update, gdb-speedbar-timer-fn, gdb-var-update)
|
||||
(gdb-var-update-handler, def-gdb-auto-update-trigger)
|
||||
(def-gdb-auto-update-handler, gdb-get-changed-registers)
|
||||
(gdb-changed-registers-handler, gdb-get-main-selected-frame)
|
||||
(gdb-frame-handler): Pending triggers are now automatically managed.
|
||||
(def-gdb-trigger-and-handler, def-gdb-auto-update-handler):
|
||||
Remove argument.
|
||||
(gdb-input): Automatically handles pending triggers. Update docstring.
|
||||
(gdb-resync): Replace gdb-pending-triggers by gdb-handler-list.
|
||||
(gdb-thread-exited, gdb-thread-selected, gdb-register-names-handler):
|
||||
Update comments.
|
||||
(gdb-done-or-error): Now use gdb-handle-reply.
|
||||
|
||||
2013-05-14 Jean-Philippe Gravel <jpgravel@gmail.com>
|
||||
|
||||
* progmodes/gdb-mi.el (gdb-input): Include token numbers in
|
||||
gdb-debug-log.
|
||||
|
||||
2013-05-14 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* subr.el (user-emacs-directory-warning): New option.
|
||||
(locate-user-emacs-file): Handle non-accessible .emacs.d. (Bug#13930)
|
||||
|
||||
2013-05-14 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (octave-font-lock-keywords): Fix error
|
||||
during redisplay.
|
||||
(octave-goto-function-definition, octave-find-definition): Minor tweaks.
|
||||
(octave-font-lock-texinfo-comment): Fix invalid search bound
|
||||
error: wrong side of point.
|
||||
|
||||
2013-05-14 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* progmodes/flymake.el (flymake-xml-program): New option.
|
||||
(flymake-xml-init): Use it.
|
||||
|
||||
* term/xterm.el: Provide a feature.
|
||||
|
||||
* term/sup-mouse.el: Move to obsolete/. Provide a feature.
|
||||
|
||||
2013-05-13 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* cus-dep.el (defcustom-mh, defgroup-mh, defface-mh):
|
||||
Add compat aliases as a hack workaround. (Bug#14384)
|
||||
|
||||
2013-05-13 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (octave-indent-comment): Fix indentation for
|
||||
###, and %!.
|
||||
(octave-mode-map): Bind octave-indent-defun to C-c C-q instead of
|
||||
C-M-q.
|
||||
(octave-comment-start-skip): Include %!.
|
||||
(octave-mode): Set comment-start-skip to octave-comment-start-skip.
|
||||
|
||||
2013-05-12 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (inferior-octave-startup): Store the value
|
||||
of __octave_srcdir__ for octave-source-directories.
|
||||
(inferior-octave-check-process): New function refactored out of
|
||||
inferior-octave-send-list-and-digest.
|
||||
(octave-source-directories)
|
||||
(octave-find-definition-filename-function): New variables.
|
||||
(octave-source-directories)
|
||||
(octave-find-definition-default-filename): New functions.
|
||||
(octave-find-definition): Improve to find functions implemented in C++.
|
||||
|
||||
2013-05-12 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* calendar/diary-lib.el (diary-outlook-format-1):
|
||||
Don't include dayname in the output. (Bug#14349)
|
||||
|
||||
2013-05-11 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs-lisp/autoload.el (generated-autoload-load-name): Doc fix.
|
||||
|
||||
* cus-dep.el (custom-make-dependencies): Only use safe local variables.
|
||||
Treat cc-provide like provide.
|
||||
|
||||
2013-05-11 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* cus-dep.el (custom-make-dependencies):
|
||||
Use generated-autoload-load-name for the sake of files such
|
||||
such cedet/semantic/bovine/c.el, where the base file name
|
||||
is not in load-path. (Bug#5277)
|
||||
|
||||
2013-05-11 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* dos-vars.el, emacs-lisp/cl-indent.el, emulation/tpu-extras.el:
|
||||
Provide features.
|
||||
|
||||
2013-05-11 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (octave-indent-comment): Improve.
|
||||
(octave-eldoc-message-style, octave-eldoc-cache): New variables.
|
||||
(octave-eldoc-function-signatures, octave-eldoc-function):
|
||||
New functions.
|
||||
(octave-mode, inferior-octave-mode): Add eldoc support.
|
||||
|
||||
2013-05-11 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* epa.el (epa-decrypt-file): Take output file name as argument
|
||||
and read it using `interactive'.
|
||||
|
||||
2013-05-11 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (octave-beginning-of-line)
|
||||
(octave-end-of-line): Check before using up-list because it jumps
|
||||
out of more syntactic contructs since moving to smie.
|
||||
(octave-indent-comment): New function.
|
||||
(octave-mode): Use it in smie-indent-functions. (Bug#14350)
|
||||
(octave-begin-keywords, octave-end-keywords)
|
||||
(octave-reserved-words, octave-smie-bnf-table)
|
||||
(octave-smie-rules): Add new keywords from Octave 3.6.4.
|
||||
|
||||
2013-05-11 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* faces.el (internal-face-x-get-resource):
|
||||
* frame.el (ns-display-monitor-attributes-list):
|
||||
* calc/calc-aent.el (math-to-radians-2): Fix declarations.
|
||||
|
||||
* emacs-lisp/package.el (tar-header-name, tar-header-link-type):
|
||||
|
||||
* calc/calc-menu.el: Make it loadable in isolation.
|
||||
|
||||
* net/eudcb-bbdb.el: Make it loadable without bbdb.
|
||||
(eudc-bbdb-filter-non-matching-record, eudc-bbdb-extract-phones)
|
||||
(eudc-bbdb-extract-addresses, eudc-bbdb-format-record-as-result)
|
||||
(eudc-bbdb-query-internal): Require 'bbdb.
|
||||
|
||||
* lpr.el (lpr-headers-switches):
|
||||
* emacs-lisp/testcover.el (testcover-compose-functions): Fix :type.
|
||||
|
||||
* progmodes/sql.el (sql-login-params): Fix and improve :type.
|
||||
|
||||
* emulation/edt-mapper.el: In batch mode, error rather than hang.
|
||||
|
||||
* term.el (term-set-escape-char): Make it idempotent.
|
||||
|
||||
2013-05-10 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (inferior-octave-completion-table):
|
||||
No longer a function and all uses changed. Use cache to speed up
|
||||
completion due to bug#11906.
|
||||
(octave-beginning-of-defun): Re-write to be more general.
|
||||
|
||||
2013-05-10 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs-lisp/cl-macs.el (cl-loop): Doc fix.
|
||||
|
||||
2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* comint.el (comint-redirect-send-command-to-process): Use :around
|
||||
rather than :override for comint-redirect-filter.
|
||||
(comint-redirect-filter): Add the corresponding `orig-filter' argument.
|
||||
Call it instead of comint-redirect-original-filter-function (which
|
||||
is gone). Reported by Juanma Barranquero <lekktu@gmail.com>.
|
||||
|
||||
2013-05-09 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* frame.el (display-monitor-attributes-list): Add NS case.
|
||||
(ns-display-monitor-attributes-list): Declare.
|
||||
|
||||
2013-05-09 Ulrich Mueller <ulm@gentoo.org>
|
||||
|
||||
* descr-text.el (describe-char): Fix %d/%x typo. (Bug#14360)
|
||||
|
||||
2013-05-09 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* international/fontset.el (vertical-centering-font-regexp):
|
||||
Set standard-value.
|
||||
|
||||
* tar-mode.el (tar-superior-buffer, tar-superior-descriptor): Add doc.
|
||||
|
||||
* bookmark.el (bookmark-search-delay):
|
||||
* cus-start.el (vertical-centering-font-regexp):
|
||||
* ps-mule.el (ps-mule-font-info-database-default):
|
||||
* ps-print.el (ps-default-fg, ps-default-bg):
|
||||
* type-break.el (type-break-good-break-interval):
|
||||
* whitespace.el (whitespace-indentation-regexp)
|
||||
(whitespace-space-after-tab-regexp):
|
||||
* emacs-lisp/testcover.el (testcover-1value-functions)
|
||||
(testcover-noreturn-functions, testcover-progn-functions)
|
||||
(testcover-prog1-functions):
|
||||
* emulation/viper-init.el (viper-emacs-state-cursor-color):
|
||||
* eshell/em-glob.el (eshell-glob-translate-alist):
|
||||
* play/tetris.el (tetris-tty-colors):
|
||||
* progmodes/cpp.el (cpp-face-default-list):
|
||||
* progmodes/flymake.el (flymake-allowed-file-name-masks):
|
||||
* progmodes/idlw-help.el (idlwave-help-browser-generic-program)
|
||||
(idlwave-help-browser-generic-args):
|
||||
* progmodes/make-mode.el (makefile-special-targets-list):
|
||||
* progmodes/python.el (python-shell-virtualenv-path):
|
||||
* progmodes/verilog-mode.el (verilog-active-low-regexp)
|
||||
(verilog-auto-input-ignore-regexp, verilog-auto-inout-ignore-regexp)
|
||||
(verilog-auto-output-ignore-regexp, verilog-auto-tieoff-ignore-regexp)
|
||||
(verilog-auto-unused-ignore-regexp, verilog-typedef-regexp):
|
||||
* textmodes/reftex-vars.el (reftex-format-label-function):
|
||||
* textmodes/remember.el (remember-diary-file): Fix custom types.
|
||||
|
||||
* jka-cmpr-hook.el (jka-compr-mode-alist-additions): Fix typo.
|
||||
Add :version.
|
||||
|
||||
2013-05-09 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (inferior-octave-completion-at-point):
|
||||
Restore file completion. (Bug#14300)
|
||||
(inferior-octave-startup): Fix incorrect highlighting for the
|
||||
first prompt.
|
||||
|
||||
2013-05-08 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/ruby-mode.el: First cut at SMIE support.
|
||||
(ruby-use-smie): New var.
|
||||
(ruby-smie-grammar): New constant.
|
||||
(ruby-smie--bosp, ruby-smie--implicit-semi-p)
|
||||
(ruby-smie--forward-token, ruby-smie--backward-token)
|
||||
(ruby-smie-rules): New functions.
|
||||
(ruby-mode-variables): Setup SMIE if applicable.
|
||||
|
||||
2013-05-08 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* simple.el (line-move-visual): Signal beginning/end of buffer
|
||||
only if vertical-motion moved less than it was requested. Avoids
|
||||
silly incorrect error messages when there are display strings with
|
||||
multiple newlines at EOL.
|
||||
|
||||
2013-05-08 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/vera-mode.el (vera-underscore-is-part-of-word):
|
||||
* progmodes/prolog.el (prolog-underscore-wordchar-flag)
|
||||
(prolog-char-quote-workaround):
|
||||
* progmodes/cperl-mode.el (cperl-under-as-char):
|
||||
* progmodes/vhdl-mode.el (vhdl-underscore-is-part-of-word):
|
||||
Mark as obsolete.
|
||||
(vhdl-mode-syntax-table, vhdl-mode-ext-syntax-table): Initialize in
|
||||
their declaration.
|
||||
(vhdl-mode-syntax-table-init): Remove.
|
||||
|
||||
* progmodes/m4-mode.el (m4-mode-syntax-table): Add comment on last change.
|
||||
|
||||
* progmodes/ld-script.el (ld-script-mode-syntax-table): Use symbol
|
||||
syntax for "_".
|
||||
(ld-script-font-lock-keywords):
|
||||
Change regexps to use things like \_< and \_>.
|
||||
|
||||
* progmodes/f90.el (f90-mode-syntax-table): Use symbol syntax for "_".
|
||||
Change all regexps to use things like \_< and \_>.
|
||||
|
||||
* progmodes/autoconf.el (autoconf-definition-regexp)
|
||||
(autoconf-font-lock-keywords, autoconf-current-defun-function):
|
||||
Handle a _ with symbol syntax.
|
||||
(autoconf-mode): Don't change the syntax-table for imenu and font-lock.
|
||||
|
||||
* progmodes/ada-mode.el (ada-mode-abbrev-table): Consolidate declaration.
|
||||
(ada-mode-syntax-table, ada-mode-symbol-syntax-table): Initialize in
|
||||
the declaration.
|
||||
(ada-create-syntax-table): Remove.
|
||||
(ada-capitalize-word): Don't mess with the syntax of "_" since it
|
||||
already has the right syntax nowadays.
|
||||
(ada-goto-next-word): Don't change the syntax of "_".
|
||||
|
||||
* font-lock.el (lisp-font-lock-keywords-2): Don't highlight obsolete
|
||||
with-wrapper-hook.
|
||||
|
||||
2013-05-08 Sam Steingold <sds@gnu.org>
|
||||
|
||||
* thingatpt.el (thing-at-point): Accept optional second argument
|
||||
NO-PROPERTIES to strip the text properties from the return value.
|
||||
* net/browse-url.el (browse-url-url-at-point): Pass NO-PROPERTIES
|
||||
to `thing-at-point' instead of stripping the properties ourselves.
|
||||
Also, when `thing-at-point' fails to find a url, prepend "http://"
|
||||
to the filename at point on the assumption that the user is
|
||||
pointing at something like gnu.org/gnu.
|
||||
|
||||
2013-05-08 Juanma Barranquero <lekktu@gmail.com>
|
||||
|
||||
* emacs-lisp/bytecomp.el (byte-compile-insert-header):
|
||||
* faces.el (crm-separator):
|
||||
Silence byte-compiler.
|
||||
|
||||
* progmodes/gud.el (gdb-speedbar-auto-raise, gud-tooltip-mode)
|
||||
(tool-bar-map): Remove unneeded defvars.
|
||||
|
||||
2013-05-08 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
Re-work a fix for bug#10994 based on Le Wang's patch.
|
||||
* ido.el (ido-remove-consecutive-dups): New helper.
|
||||
(ido-completing-read): Use it.
|
||||
(ido-chop): Revert fix for bug#10994.
|
||||
|
||||
2013-05-08 Adam Spiers <emacs@adamspiers.org>
|
||||
|
||||
* cus-edit.el (custom-save-variables):
|
||||
Pretty-print long values. (Bug#14187)
|
||||
|
||||
2013-05-08 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* progmodes/m4-mode.el (m4-program): Assume it is in PATH.
|
||||
(m4-mode-syntax-table): Init in the defvar.
|
||||
(m4-mode-abbrev-table): Let define-derived-mode define it.
|
||||
|
||||
2013-05-08 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* progmodes/m4-mode.el (m4-mode-syntax-table):
|
||||
Do not treat "_" as word constituent. (Bug#14167)
|
||||
|
||||
2013-05-07 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* eshell/em-hist.el (eshell-isearch-map): Initialize in the defvar.
|
||||
Remove explicit eshell-isearch-cancel-map.
|
||||
|
||||
* progmodes/f90.el (f90-smart-end-names): New option.
|
||||
(f90-smart-end): Doc fix.
|
||||
(f90-end-block-optional-name): New constant.
|
||||
(f90-block-match): Respect f90-smart-end-names.
|
||||
|
||||
2013-05-07 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/octave.el (octave-smie-forward-token): Be more careful
|
||||
about implicit semi-colons (bug#14218).
|
||||
|
||||
2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
|
||||
|
||||
* frame.el (display-monitor-attributes-list)
|
||||
(frame-monitor-attributes): New functions.
|
||||
|
||||
2013-05-06 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (octave-syntax-propertize-function): Change
|
||||
\'s syntax to escape when inside double-quoted strings. (Bug#14332)
|
||||
(octave-font-lock-keywords): Use octave-operator-regexp.
|
||||
(octave-completion-at-point): Rename from
|
||||
octave-completion-at-point-function.
|
||||
(inferior-octave-directory-tracker): Robustify.
|
||||
(octave-text-functions): Remove and fix its uses. No such things
|
||||
any more.
|
||||
|
||||
2013-05-06 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* emacs-lisp/trace.el (trace--display-buffer): New function.
|
||||
(trace-make-advice): Use it.
|
||||
|
||||
2013-05-06 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* emacs-lisp/lisp-mode.el (eval-defun-2): Doc fix. (Bug#14344)
|
||||
(eval-defun-2, eval-defun, eval-last-sexp, eval-last-sexp-1):
|
||||
Doc fix.
|
||||
(emacs-lisp-mode-map): Replace "minibuffer" with "echo area"
|
||||
in the help string. (Bug#12985)
|
||||
|
||||
2013-05-06 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
|
||||
|
||||
* simple.el (shell-command-on-region): Doc fix. (Bug#14279)
|
||||
|
||||
2013-05-06 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/perl-mode.el: Add support for here documents.
|
||||
(perl-syntax-propertize-function): Match here-doc markers.
|
||||
(perl-syntax-propertize-special-constructs): Find their end.
|
||||
(perl-imenu-generic-expression): Use [:alnum:].
|
||||
|
||||
* emacs-lisp/nadvice.el (advice--member-p): Return the advice if found.
|
||||
(advice--add-function): Refresh the advice if already present
|
||||
(bug#14317).
|
||||
|
||||
2013-05-06 Ivan Andrus <darthandrus@gmail.com>
|
||||
|
||||
* find-file.el (cc-other-file-alist): Add ".m" for ObjC. (Bug#14339)
|
||||
|
||||
2013-05-06 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* w32-fns.el (w32-charset-info-alist): Declare.
|
||||
|
||||
* eshell/em-cmpl.el: Simply require pcomplete; eg we use a bunch
|
||||
of its defcustom properties.
|
||||
(eshell-cmpl-initialize): No need to load pcomplete.
|
||||
|
||||
* generic-x.el: No need to require comint when compiling.
|
||||
|
||||
* net/eudc-export.el: Make it loadable without bbdb.
|
||||
(top-level): Use require rather than load-library.
|
||||
(eudc-create-bbdb-record, eudc-bbdbify-phone)
|
||||
(eudc-batch-export-records-to-bbdb)
|
||||
(eudc-insert-record-at-point-into-bbdb, eudc-try-bbdb-insert):
|
||||
Require bbdb.
|
||||
|
||||
2013-05-06 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/octave.el (octave-texinfo-font-lock-keywords): Remove.
|
||||
(octave-font-lock-texinfo-comment): Use texinfo-font-lock-keywords with
|
||||
some tweaks, instead.
|
||||
|
||||
2013-05-05 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (octave-font-lock-keywords)
|
||||
(octave-font-lock-texinfo-comment): Adjust for the byte-compiler.
|
||||
(inferior-octave-send-list-and-digest): Improve error message.
|
||||
(octave-mode, inferior-octave-mode): Use setq-local.
|
||||
(octave-help): Set info-lookup-mode.
|
||||
|
||||
2013-05-05 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* vc/compare-w.el (compare-windows-whitespace):
|
||||
Treat no-break space as whitespace.
|
||||
|
||||
* mail/rmailsum.el (rmail-summary-rmail-update):
|
||||
Detect empty summary and don't change selected message.
|
||||
(rmail-summary-goto-msg): Likewise.
|
||||
|
||||
* mail/rmailsum.el (rmail-new-summary, rmail-new-summary-1):
|
||||
Doc fixes, rename args.
|
||||
|
||||
2013-05-05 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
* progmodes/cc-defs.el (c-version): Increment to 5.32.5.
|
||||
|
||||
2013-05-05 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* info.el (Info-read-subfile): Use (point-min) instead of (point)
|
||||
to not add the length of the summary segment to the return value.
|
||||
(Bug#14125)
|
||||
|
||||
2013-05-05 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (inferior-octave-strip-ctrl-g)
|
||||
(inferior-octave-output-filter): Remove.
|
||||
(octave-send-region, inferior-octave-startup): Fix callers.
|
||||
(inferior-octave-mode-map): Don't use comint-dynamic-complete.
|
||||
(octave-binary-file-extensions): New user variable.
|
||||
(octave-find-definition): Confirm if opening binary files.
|
||||
(octave-help-file): Use octave-find-definition to get the binary
|
||||
confirmation.
|
||||
(octave-help): Adjust for octave-help-file change.
|
||||
|
||||
2013-05-05 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/pascal.el (pascal-font-lock-keywords): Use backquotes.
|
||||
Merge the two entries that handle function definitions.
|
||||
(pascal--syntax-propertize): New const.
|
||||
(pascal-mode): Use it. Use setq-local.
|
||||
|
||||
2013-05-04 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* calendar/diary-lib.el (diary-from-outlook-function): New variable.
|
||||
(diary-from-outlook): Respect diary-from-outlook-function.
|
||||
|
||||
2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* simple.el (read-expression-map): Use completion-at-point (bug#14255).
|
||||
Move the declaration from C.
|
||||
(read-minibuffer, eval-minibuffer): Move from C.
|
||||
(completion-setup-function): Avoid minibuffer-completion-contents.
|
||||
|
||||
2013-05-03 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (octave-font-lock-keywords): Do not
|
||||
dehighlight 'end' in comments or strings.
|
||||
(octave-completing-read, octave-goto-function-definition):
|
||||
New helpers.
|
||||
(octave-help-buffer): New user variable.
|
||||
(octave-help-file, octave-help-function): New button types.
|
||||
(octave-help): New command and bind it to C-h ;.
|
||||
(octave-find-definition): New command and bind it to M-.
|
||||
(user-error): Alias to error if not defined.
|
||||
|
||||
2013-05-02 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (octave-mode-syntax-table): Correct syntax
|
||||
for \. (bug#14332)
|
||||
(octave-font-lock-keywords): Include [ and {.
|
||||
|
||||
2013-05-02 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (inferior-octave-startup-file): Change default.
|
||||
(inferior-octave): Remove calling comint-mode and return the buffer.
|
||||
(inferior-octave-startup): Cosmetic changes.
|
||||
|
||||
2013-05-02 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el (octave-syntax-propertize-function):
|
||||
Include the case when ' is at line beginning. (Bug#14336)
|
||||
|
||||
2013-05-02 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* vc/vc-dir.el (vc-dir-mode): Don't autoload it for everyone.
|
||||
* desktop.el (vc-dir-mode): Just autoload it here.
|
||||
|
||||
2013-05-02 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
Eliminate variable c-standard-font-lock-fontify-region-function.
|
||||
* progmodes/cc-mode.el
|
||||
(c-standard-font-lock-fontify-region-function): Remove.
|
||||
(c-font-lock-fontify-region, c-after-font-lock-init): Adapt.
|
||||
|
||||
2013-05-01 Leo Liu <sdl.web@gmail.com>
|
||||
|
||||
* progmodes/octave.el: Compatible with older emacs-24 releases.
|
||||
(inferior-octave-has-built-in-variables): Remove. Buil-in
|
||||
(inferior-octave-has-built-in-variables): Remove. Built-in
|
||||
variables were removed from Octave in 2007.
|
||||
(inferior-octave-startup): Fix uses.
|
||||
(comint-line-beginning-position): Remove compatibility code for
|
||||
@ -34,8 +569,8 @@
|
||||
2013-04-30 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
Handle arbitrarily long C++ member initialisation lists.
|
||||
* progmodes/cc-engine.el (c-back-over-member-initializers): new
|
||||
function.
|
||||
* progmodes/cc-engine.el (c-back-over-member-initializers):
|
||||
new function.
|
||||
(c-guess-basic-syntax): New CASE 5R (extracted from 5B) to handle
|
||||
(most) member init lists.
|
||||
|
||||
@ -131,8 +666,8 @@
|
||||
2013-04-27 Ingo Lohmar <i.lohmar@gmail.com> (tiny change)
|
||||
|
||||
* ls-lisp.el (ls-lisp-insert-directory): If no files are
|
||||
displayed, move point to after the totals line. See
|
||||
http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00677.html
|
||||
displayed, move point to after the totals line.
|
||||
See http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00677.html
|
||||
for the details.
|
||||
|
||||
2013-04-27 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
@ -170,7 +170,7 @@ A non-nil value may result in truncated bookmark names."
|
||||
(defcustom bookmark-search-delay 0.2
|
||||
"Time before `bookmark-bmenu-search' updates the display."
|
||||
:group 'bookmark
|
||||
:type 'integer)
|
||||
:type 'number)
|
||||
|
||||
(defface bookmark-menu-heading
|
||||
'((t (:inherit font-lock-type-face)))
|
||||
|
@ -42,7 +42,7 @@
|
||||
(declare-function math-simplify "calc-alg" (top-expr))
|
||||
(declare-function math-known-matrixp "calc-arith" (a))
|
||||
(declare-function math-parse-fortran-subscr "calc-lang" (sym args))
|
||||
(declare-function math-to-radians-2 "calc-math" (a))
|
||||
(declare-function math-to-radians-2 "calc-math" (a &optional force-symbolic))
|
||||
(declare-function math-read-string "calc-ext" ())
|
||||
(declare-function math-read-brackets "calc-vec" (space-sep math-rb-close))
|
||||
(declare-function math-read-angle-brackets "calc-forms" ())
|
||||
|
@ -1634,7 +1634,9 @@
|
||||
(Info-goto-node "Help Commands"))])
|
||||
"Menu for Calc's help functions.")
|
||||
|
||||
(defvar calc-mode-map)
|
||||
;; Needed to make this file loadable in isolation.
|
||||
;; Another option would be to use calc-load-hook.
|
||||
(require 'calc)
|
||||
|
||||
(easy-menu-define
|
||||
calc-menu
|
||||
|
@ -366,7 +366,7 @@ Returns a string using match elements 1-5, where:
|
||||
;; use the standard function calendar-date-string.
|
||||
(concat (if month
|
||||
(calendar-date-string (list month (string-to-number day)
|
||||
(string-to-number year)))
|
||||
(string-to-number year)) nil t)
|
||||
(cond ((eq calendar-date-style 'iso) "\\3 \\1 \\2") ; YMD
|
||||
((eq calendar-date-style 'european) "\\2 \\1 \\3") ; DMY
|
||||
(t "\\1 \\2 \\3"))) ; MDY
|
||||
@ -2611,14 +2611,23 @@ user is asked to confirm its addition."
|
||||
(diary-from-outlook-internal subject body)
|
||||
(message "Diary entry added"))))))
|
||||
|
||||
(defvar diary-from-outlook-function nil
|
||||
"If non-nil, a function of one argument for `diary-from-outlook' to call.
|
||||
If the current buffer contains an Outlook-style appointment message,
|
||||
this function should extract it into a diary entry. If the argument is
|
||||
nil, it should ask for confirmation before adding this entry to the diary.
|
||||
For examples, see `diary-from-outlook-rmail' and `diary-from-outlook-gnus'.")
|
||||
|
||||
(defun diary-from-outlook (&optional noconfirm)
|
||||
"Maybe snarf diary entry from current Outlook-generated message.
|
||||
Currently knows about Gnus and Rmail modes. Unless the optional
|
||||
argument NOCONFIRM is non-nil (which is the case when this
|
||||
function is called interactively), then if an entry is found the
|
||||
user is asked to confirm its addition."
|
||||
Uses `diary-from-outlook-function' if that is non-nil, else
|
||||
`diary-from-outlook-rmail' for Rmail or `diary-from-outlook-gnus' for Gnus.
|
||||
Unless the optional argument NOCONFIRM is non-nil (which is the
|
||||
case when this function is called interactively), then if an
|
||||
entry is found the user is asked to confirm its addition."
|
||||
(interactive "p")
|
||||
(let ((func (cond
|
||||
(diary-from-outlook-function)
|
||||
((eq major-mode 'rmail-mode)
|
||||
#'diary-from-outlook-rmail)
|
||||
((memq major-mode '(gnus-summary-mode gnus-article-mode))
|
||||
|
@ -1,3 +1,26 @@
|
||||
2013-05-14 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* ede/simple.el, semantic/java.el: Set generated-autoload-load-name.
|
||||
|
||||
2013-05-11 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* ede/project-am.el, semantic/db-ebrowse.el, semantic/grammar.el:
|
||||
* semantic/sb.el, semantic/bovine/grammar.el, semantic/wisent/comp.el:
|
||||
* semantic/wisent/grammar.el, semantic/wisent/wisent.el:
|
||||
* srecode/fields.el: Set generated-autoload-load-name (for cus-load).
|
||||
|
||||
* ede/locate.el (cedet-cscope-version-check)
|
||||
(cedet-cscope-support-for-directory):
|
||||
* semantic/grammar.el (semantic-grammar-wy--install-parser):
|
||||
Fix declarations.
|
||||
|
||||
* ede/project-am.el (project-am-compile-project-command): Fix :type.
|
||||
|
||||
2013-05-09 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* semantic/db-find.el (semanticdb-find-throttle-custom-list):
|
||||
Fix value.
|
||||
|
||||
2013-04-27 David Engster <deng@randomsample.de>
|
||||
|
||||
* semantic/complete.el
|
||||
|
@ -310,8 +310,8 @@ that created this EDE locate object."
|
||||
;;; CSCOPE
|
||||
;;
|
||||
|
||||
(declare-function cedet-cscope-version-check "cedet-scope")
|
||||
(declare-function cedet-cscope-support-for-directory "cedet-scope")
|
||||
(declare-function cedet-cscope-version-check "cedet-cscope")
|
||||
(declare-function cedet-cscope-support-for-directory "cedet-cscope")
|
||||
(declare-function cedet-cscope-expand-filename "cedet-cscope")
|
||||
(declare-function cedet-cscope-create/update-database "cedet-cscope")
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
(defcustom project-am-compile-project-command nil
|
||||
"*Default command used to compile a project."
|
||||
:group 'project-am
|
||||
:type 'string)
|
||||
:type '(choice (const nil) string))
|
||||
|
||||
(defcustom project-am-compile-target-command (concat ede-make-command " -k %s")
|
||||
"*Default command used to compile a project."
|
||||
@ -1014,4 +1014,8 @@ per file or in .dir-locals.el or similar."
|
||||
|
||||
(provide 'ede/project-am)
|
||||
|
||||
;; Local variables:
|
||||
;; generated-autoload-load-name: "ede/project-am"
|
||||
;; End:
|
||||
|
||||
;;; ede/project-am.el ends here
|
||||
|
@ -118,4 +118,8 @@ Each directory needs a project file to control it.")
|
||||
|
||||
(provide 'ede/simple)
|
||||
|
||||
;; Local variables:
|
||||
;; generated-autoload-load-name: "ede/simple"
|
||||
;; End:
|
||||
|
||||
;;; ede/simple.el ends here
|
||||
|
@ -503,4 +503,8 @@ Menu items are appended to the common grammar menu.")
|
||||
|
||||
(provide 'semantic/bovine/grammar)
|
||||
|
||||
;; Local variables:
|
||||
;; generated-autoload-load-name: "semantic/bovine/grammar"
|
||||
;; End:
|
||||
|
||||
;;; semantic/bovine/grammar.el ends here
|
||||
|
@ -660,4 +660,8 @@ Return a list of tags."
|
||||
|
||||
(provide 'semantic/db-ebrowse)
|
||||
|
||||
;; Local variables:
|
||||
;; generated-autoload-load-name: "semantic/db-ebrowse"
|
||||
;; End:
|
||||
|
||||
;;; semantic/db-ebrowse.el ends here
|
||||
|
@ -130,12 +130,12 @@
|
||||
(declare-function ede-current-project "ede")
|
||||
|
||||
(defvar semanticdb-find-throttle-custom-list
|
||||
'(repeat (radio (const 'local)
|
||||
(const 'project)
|
||||
(const 'unloaded)
|
||||
(const 'system)
|
||||
(const 'recursive)
|
||||
(const 'omniscience)))
|
||||
'(set (const local)
|
||||
(const project)
|
||||
(const unloaded)
|
||||
(const system)
|
||||
(const recursive)
|
||||
(const omniscience))
|
||||
"Customization values for semanticdb find throttle.
|
||||
See `semanticdb-find-throttle' for details.")
|
||||
|
||||
|
@ -48,11 +48,7 @@
|
||||
(require 'semantic/find)
|
||||
(require 'semantic/db))
|
||||
|
||||
(declare-function semantic-grammar-wy--install-parser
|
||||
"semantic/gram-wy-fallback")
|
||||
|
||||
(declare-function semantic-grammar-wy--install-parser
|
||||
"semantic/gram-wy-fallback")
|
||||
(declare-function semantic-grammar-wy--install-parser "semantic/grammar-wy")
|
||||
|
||||
|
||||
;;;;
|
||||
@ -1913,4 +1909,8 @@ Optional argument COLOR determines if color is added to the text."
|
||||
|
||||
(provide 'semantic/grammar)
|
||||
|
||||
;; Local variables:
|
||||
;; generated-autoload-load-name: "semantic/grammar"
|
||||
;; End:
|
||||
|
||||
;;; semantic/grammar.el ends here
|
||||
|
@ -480,4 +480,8 @@ removed from the result list."
|
||||
|
||||
(provide 'semantic/java)
|
||||
|
||||
;; Local variables:
|
||||
;; generated-autoload-load-name: "semantic/java"
|
||||
;; End:
|
||||
|
||||
;;; semantic/java.el ends here
|
||||
|
@ -425,4 +425,8 @@ Returns the tag list, or t for an error."
|
||||
|
||||
(provide 'semantic/sb)
|
||||
|
||||
;; Local variables:
|
||||
;; generated-autoload-load-name: "semantic/sb"
|
||||
;; End:
|
||||
|
||||
;;; semantic/sb.el ends here
|
||||
|
@ -3548,6 +3548,7 @@ See also `wisent-compile-grammar' for more details on AUTOMATON."
|
||||
|
||||
;; Local variables:
|
||||
;; byte-compile-warnings: (not lexical)
|
||||
;; generated-autoload-load-name: "semantic/wisent/comp"
|
||||
;; End:
|
||||
|
||||
;;; semantic/wisent/comp.el ends here
|
||||
|
@ -523,4 +523,8 @@ Menu items are appended to the common grammar menu.")
|
||||
|
||||
(provide 'semantic/wisent/grammar)
|
||||
|
||||
;; Local variables:
|
||||
;; generated-autoload-load-name: "semantic/wisent/grammar"
|
||||
;; End:
|
||||
|
||||
;;; semantic/wisent/grammar.el ends here
|
||||
|
@ -475,4 +475,8 @@ automaton has only one entry point."
|
||||
|
||||
(provide 'semantic/wisent/wisent)
|
||||
|
||||
;; Local variables:
|
||||
;; generated-autoload-load-name: "semantic/wisent/wisent"
|
||||
;; End:
|
||||
|
||||
;;; semantic/wisent/wisent.el ends here
|
||||
|
@ -447,4 +447,8 @@ PRE-LEN is used in the after mode for the length of the changed text."
|
||||
|
||||
(provide 'srecode/fields)
|
||||
|
||||
;; Local variables:
|
||||
;; generated-autoload-load-name: "srecode/fields"
|
||||
;; End:
|
||||
|
||||
;;; srecode/fields.el ends here
|
||||
|
@ -631,10 +631,10 @@ to continue it.
|
||||
|
||||
Entry to this mode runs the hooks on `comint-mode-hook'."
|
||||
(setq mode-line-process '(":%s"))
|
||||
(set (make-local-variable 'window-point-insertion-type) t)
|
||||
(set (make-local-variable 'comint-last-input-start) (point-min-marker))
|
||||
(set (make-local-variable 'comint-last-input-end) (point-min-marker))
|
||||
(set (make-local-variable 'comint-last-output-start) (make-marker))
|
||||
(setq-local window-point-insertion-type t)
|
||||
(setq-local comint-last-input-start (point-min-marker))
|
||||
(setq-local comint-last-input-end (point-min-marker))
|
||||
(setq-local comint-last-output-start (make-marker))
|
||||
(make-local-variable 'comint-last-prompt-overlay)
|
||||
(make-local-variable 'comint-prompt-regexp) ; Don't set; default
|
||||
(make-local-variable 'comint-input-ring-size) ; ...to global val.
|
||||
@ -676,17 +676,15 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
|
||||
(make-local-variable 'comint-file-name-chars)
|
||||
(make-local-variable 'comint-file-name-quote-list)
|
||||
;; dir tracking on remote files
|
||||
(set (make-local-variable 'comint-file-name-prefix)
|
||||
(or (file-remote-p default-directory) ""))
|
||||
(make-local-variable 'comint-accum-marker)
|
||||
(setq comint-accum-marker (make-marker))
|
||||
(make-local-variable 'font-lock-defaults)
|
||||
(setq font-lock-defaults '(nil t))
|
||||
(setq-local comint-file-name-prefix
|
||||
(or (file-remote-p default-directory) ""))
|
||||
(setq-local comint-accum-marker (make-marker))
|
||||
(setq-local font-lock-defaults '(nil t))
|
||||
(add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
|
||||
(add-hook 'isearch-mode-hook 'comint-history-isearch-setup nil t)
|
||||
(add-hook 'completion-at-point-functions 'comint-completion-at-point nil t)
|
||||
;; This behavior is not useful in comint buffers, and is annoying
|
||||
(set (make-local-variable 'next-line-add-newlines) nil))
|
||||
(setq-local next-line-add-newlines nil))
|
||||
|
||||
(defun comint-check-proc (buffer)
|
||||
"Return non-nil if there is a living process associated w/buffer BUFFER.
|
||||
@ -778,8 +776,7 @@ series of processes in the same Comint buffer. The hook
|
||||
(open-network-stream name buffer (car command) (cdr command))
|
||||
(comint-exec-1 name buffer command switches))))
|
||||
(set-process-filter proc 'comint-output-filter)
|
||||
(make-local-variable 'comint-ptyp)
|
||||
(setq comint-ptyp process-connection-type) ; t if pty, nil if pipe.
|
||||
(setq-local comint-ptyp process-connection-type) ; t if pty, nil if pipe.
|
||||
;; Jump to the end, and set the process mark.
|
||||
(goto-char (point-max))
|
||||
(set-marker (process-mark proc) (point))
|
||||
@ -1415,8 +1412,7 @@ If nil, Isearch operates on the whole comint buffer."
|
||||
(let ((comint-history-isearch t))
|
||||
(isearch-backward-regexp)))
|
||||
|
||||
(defvar comint-history-isearch-message-overlay nil)
|
||||
(make-variable-buffer-local 'comint-history-isearch-message-overlay)
|
||||
(defvar-local comint-history-isearch-message-overlay nil)
|
||||
|
||||
(defun comint-history-isearch-setup ()
|
||||
"Set up a comint for using Isearch to search the input history.
|
||||
@ -1426,14 +1422,14 @@ Intended to be added to `isearch-mode-hook' in `comint-mode'."
|
||||
;; Point is at command line.
|
||||
(comint-after-pmark-p)))
|
||||
(setq isearch-message-prefix-add "history ")
|
||||
(set (make-local-variable 'isearch-search-fun-function)
|
||||
'comint-history-isearch-search)
|
||||
(set (make-local-variable 'isearch-message-function)
|
||||
'comint-history-isearch-message)
|
||||
(set (make-local-variable 'isearch-wrap-function)
|
||||
'comint-history-isearch-wrap)
|
||||
(set (make-local-variable 'isearch-push-state-function)
|
||||
'comint-history-isearch-push-state)
|
||||
(setq-local isearch-search-fun-function
|
||||
#'comint-history-isearch-search)
|
||||
(setq-local isearch-message-function
|
||||
#'comint-history-isearch-message)
|
||||
(setq-local isearch-wrap-function
|
||||
#'comint-history-isearch-wrap)
|
||||
(setq-local isearch-push-state-function
|
||||
#'comint-history-isearch-push-state)
|
||||
(add-hook 'isearch-mode-end-hook 'comint-history-isearch-end nil t)))
|
||||
|
||||
(defun comint-history-isearch-end ()
|
||||
@ -2589,10 +2585,8 @@ text matching `comint-prompt-regexp'."
|
||||
(comint-next-prompt (- n)))
|
||||
|
||||
;; State used by `comint-insert-previous-argument' when cycling.
|
||||
(defvar comint-insert-previous-argument-last-start-pos nil)
|
||||
(make-variable-buffer-local 'comint-insert-previous-argument-last-start-pos)
|
||||
(defvar comint-insert-previous-argument-last-index nil)
|
||||
(make-variable-buffer-local 'comint-insert-previous-argument-last-index)
|
||||
(defvar-local comint-insert-previous-argument-last-start-pos nil)
|
||||
(defvar-local comint-insert-previous-argument-last-index nil)
|
||||
|
||||
;; Needs fixing:
|
||||
;; make comint-arguments understand negative indices as bash does
|
||||
@ -3319,8 +3313,8 @@ Typing SPC flushes the completions buffer."
|
||||
;; Read the next key, to process SPC.
|
||||
(let (key first)
|
||||
(if (with-current-buffer (get-buffer "*Completions*")
|
||||
(set (make-local-variable 'comint-displayed-dynamic-completions)
|
||||
completions)
|
||||
(setq-local comint-displayed-dynamic-completions
|
||||
completions)
|
||||
(setq key (read-key-sequence nil)
|
||||
first (aref key 0))
|
||||
(and (consp first) (consp (event-start first))
|
||||
@ -3528,23 +3522,17 @@ This function is called by `comint-redirect-send-command-to-process',
|
||||
and does not normally need to be invoked by the end user or programmer."
|
||||
(with-current-buffer comint-buffer
|
||||
|
||||
(make-local-variable 'comint-redirect-original-mode-line-process)
|
||||
(setq comint-redirect-original-mode-line-process mode-line-process)
|
||||
(setq-local comint-redirect-original-mode-line-process mode-line-process)
|
||||
|
||||
(make-local-variable 'comint-redirect-output-buffer)
|
||||
(setq comint-redirect-output-buffer output-buffer)
|
||||
(setq-local comint-redirect-output-buffer output-buffer)
|
||||
|
||||
(make-local-variable 'comint-redirect-finished-regexp)
|
||||
(setq comint-redirect-finished-regexp finished-regexp)
|
||||
(setq-local comint-redirect-finished-regexp finished-regexp)
|
||||
|
||||
(make-local-variable 'comint-redirect-echo-input)
|
||||
(setq comint-redirect-echo-input echo-input)
|
||||
(setq-local comint-redirect-echo-input echo-input)
|
||||
|
||||
(make-local-variable 'comint-redirect-completed)
|
||||
(setq comint-redirect-completed nil)
|
||||
(setq-local comint-redirect-completed nil)
|
||||
|
||||
(make-local-variable 'comint-redirect-previous-input-string)
|
||||
(setq comint-redirect-previous-input-string "")
|
||||
(setq-local comint-redirect-previous-input-string "")
|
||||
|
||||
(setq mode-line-process
|
||||
(if mode-line-process
|
||||
@ -3568,7 +3556,7 @@ and does not normally need to be invoked by the end user or programmer."
|
||||
;; that it really occurs.
|
||||
(defalias 'comint-redirect-remove-redirection 'comint-redirect-cleanup)
|
||||
|
||||
(defun comint-redirect-filter (process input-string)
|
||||
(defun comint-redirect-filter (orig-filter process input-string)
|
||||
"Filter function which redirects output from PROCESS to a buffer or buffers.
|
||||
The variable `comint-redirect-output-buffer' says which buffer(s) to
|
||||
place output in.
|
||||
@ -3582,9 +3570,8 @@ end user."
|
||||
(comint-redirect-preoutput-filter input-string)
|
||||
;; If we have to echo output, give it to the original filter function
|
||||
(and comint-redirect-echo-input
|
||||
comint-redirect-original-filter-function
|
||||
(funcall comint-redirect-original-filter-function
|
||||
process input-string)))))
|
||||
orig-filter
|
||||
(funcall orig-filter process input-string)))))
|
||||
|
||||
|
||||
(defun comint-redirect-preoutput-filter (input-string)
|
||||
@ -3701,7 +3688,7 @@ If NO-DISPLAY is non-nil, do not show the output buffer."
|
||||
echo) ; Echo input
|
||||
|
||||
;; Set the filter.
|
||||
(add-function :override (process-filter proc) #'comint-redirect-filter)
|
||||
(add-function :around (process-filter proc) #'comint-redirect-filter)
|
||||
|
||||
;; Send the command
|
||||
(process-send-string (current-buffer) (concat command "\n"))
|
||||
@ -3820,8 +3807,7 @@ REGEXP-GROUP is the regular expression group in REGEXP to use."
|
||||
;; (setq major-mode 'shell-mode)
|
||||
;; (setq mode-name "Shell")
|
||||
;; (use-local-map shell-mode-map)
|
||||
;; (make-local-variable 'shell-directory-stack)
|
||||
;; (setq shell-directory-stack nil)
|
||||
;; (setq-local shell-directory-stack nil)
|
||||
;; (add-hook 'comint-input-filter-functions 'shell-directory-tracker)
|
||||
;; (run-mode-hooks 'shell-mode-hook))
|
||||
;;
|
||||
|
@ -36,12 +36,25 @@
|
||||
ldefs-boot\\|cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)"
|
||||
"Regexp matching file names not to scan for `custom-make-dependencies'.")
|
||||
|
||||
(autoload 'autoload-rubric "autoload")
|
||||
(require 'autoload)
|
||||
|
||||
;; Hack workaround for bug#14384.
|
||||
;; Define defcustom-mh as an alias for defcustom, etc.
|
||||
;; Only do this in batch mode to avoid messing up a normal Emacs session.
|
||||
;; Alternative would be to load mh-e when making cus-load.
|
||||
;; (Would be better to split just the necessary parts of mh-e into a
|
||||
;; separate file and only load that.)
|
||||
(when (and noninteractive)
|
||||
(mapc (lambda (e) (let ((sym (intern (format "%s-mh" e))))
|
||||
(or (fboundp sym)
|
||||
(defalias sym e))))
|
||||
'(defcustom defface defgroup)))
|
||||
|
||||
(defun custom-make-dependencies ()
|
||||
"Batch function to extract custom dependencies from .el files.
|
||||
Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
|
||||
(let ((enable-local-eval nil)
|
||||
(enable-local-variables :safe)
|
||||
subdir)
|
||||
(with-temp-buffer
|
||||
;; Use up command-line-args-left else Emacs can try to open
|
||||
@ -60,14 +73,17 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
|
||||
(string-match preloaded file)
|
||||
(not (file-exists-p file)))
|
||||
(erase-buffer)
|
||||
(kill-all-local-variables)
|
||||
(insert-file-contents file)
|
||||
(hack-local-variables)
|
||||
(goto-char (point-min))
|
||||
(string-match "\\`\\(.*\\)\\.el\\'" file)
|
||||
(let ((name (file-name-nondirectory (match-string 1 file)))
|
||||
(let ((name (or generated-autoload-load-name ; see bug#5277
|
||||
(file-name-nondirectory (match-string 1 file))))
|
||||
(load-file-name file))
|
||||
(if (save-excursion
|
||||
(re-search-forward
|
||||
(concat "(provide[ \t\n]+\\('\\|(quote[ \t\n]\\)[ \t\n]*"
|
||||
(concat "(\\(cc-\\)?provide[ \t\n]+\\('\\|(quote[ \t\n]\\)[ \t\n]*"
|
||||
(regexp-quote name) "[ \t\n)]")
|
||||
nil t))
|
||||
(setq name (intern name)))
|
||||
@ -78,6 +94,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
|
||||
(let ((expr (read (current-buffer))))
|
||||
(condition-case nil
|
||||
(let ((custom-dont-initialize t))
|
||||
;; Why do we need to eval just for the name?
|
||||
(eval expr)
|
||||
(put (nth 1 expr) 'custom-where name))
|
||||
(error nil))))
|
||||
|
@ -4531,7 +4531,15 @@ This function does not save the buffer."
|
||||
(princ " '(")
|
||||
(prin1 symbol)
|
||||
(princ " ")
|
||||
(prin1 (car value))
|
||||
(let ((val (prin1-to-string (car value))))
|
||||
(if (< (length val) 60)
|
||||
(insert val)
|
||||
(newline-and-indent)
|
||||
(let ((beginning-of-val (point)))
|
||||
(insert val)
|
||||
(save-excursion
|
||||
(goto-char beginning-of-val)
|
||||
(indent-pp-sexp 1)))))
|
||||
(when (or now requests comment)
|
||||
(princ " ")
|
||||
(prin1 now)
|
||||
|
@ -252,7 +252,9 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
|
||||
(use-file-dialog menu boolean "22.1")
|
||||
(focus-follows-mouse frames boolean "20.3")
|
||||
;; fontset.c
|
||||
(vertical-centering-font-regexp display regexp)
|
||||
;; FIXME nil is the initial value, fontset.el setqs it.
|
||||
(vertical-centering-font-regexp display
|
||||
(choice (const nil) regexp))
|
||||
;; frame.c
|
||||
(default-frame-alist frames
|
||||
(repeat (cons :format "%v"
|
||||
|
@ -753,7 +753,7 @@ relevant to POS."
|
||||
(insert " by these characters:\n")
|
||||
(while (and (<= from to)
|
||||
(setq glyph (lgstring-glyph gstring from)))
|
||||
(insert (format " %c (#x%d)\n"
|
||||
(insert (format " %c (#x%x)\n"
|
||||
(lglyph-char glyph) (lglyph-char glyph)))
|
||||
(setq from (1+ from)))))
|
||||
(insert " by the rule:\n\t(")
|
||||
|
@ -1374,6 +1374,9 @@ If there are no buffers left to create, kill the timer."
|
||||
(desktop-auto-save-set-timer)
|
||||
(setq inhibit-startup-screen t))))
|
||||
|
||||
;; So we can restore vc-dir buffers.
|
||||
(autoload 'vc-dir-mode "vc-dir" nil t)
|
||||
|
||||
(provide 'desktop)
|
||||
|
||||
;;; desktop.el ends here
|
||||
|
@ -43,4 +43,6 @@ in `standard-display-table' as appropriate for your codepage, if
|
||||
:type '(hook)
|
||||
:version "20.3.3")
|
||||
|
||||
(provide 'dos-vars)
|
||||
|
||||
;;; dos-vars.el ends here
|
||||
|
@ -52,7 +52,10 @@ FormFeed character.")
|
||||
|
||||
(defvar generated-autoload-load-name nil
|
||||
"Load name for `autoload' statements generated from autoload cookies.
|
||||
If nil, this defaults to the file name, sans extension.")
|
||||
If nil, this defaults to the file name, sans extension.
|
||||
Typically, you need to set this when the directory containing the file
|
||||
is not in `load-path'.
|
||||
This also affects the generated cus-load.el file.")
|
||||
;;;###autoload
|
||||
(put 'generated-autoload-load-name 'safe-local-variable 'stringp)
|
||||
|
||||
|
@ -1978,7 +1978,7 @@ and will be removed soon. See (elisp)Backquote in the manual."))
|
||||
(widen)
|
||||
(delete-char delta))))
|
||||
|
||||
(defun byte-compile-insert-header (filename outbuffer)
|
||||
(defun byte-compile-insert-header (_filename outbuffer)
|
||||
"Insert a header at the start of OUTBUFFER.
|
||||
Call from the source buffer."
|
||||
(let ((dynamic-docstrings byte-compile-dynamic-docstrings)
|
||||
|
@ -597,8 +597,11 @@ PROPLIST is a list of the sort returned by `symbol-plist'.
|
||||
(macroexp-let2 nil d def
|
||||
(funcall do `(cl-getf ,getter ,k ,d)
|
||||
(lambda (v)
|
||||
(funcall setter
|
||||
`(cl--set-getf ,getter ,k ,v))))))))))
|
||||
(macroexp-let2 nil val v
|
||||
`(progn
|
||||
,(funcall setter
|
||||
`(cl--set-getf ,getter ,k ,val))
|
||||
,val))))))))))
|
||||
(setplist '--cl-getf-symbol-- plist)
|
||||
(or (get '--cl-getf-symbol-- tag)
|
||||
;; Originally we called cl-get here,
|
||||
|
@ -809,4 +809,6 @@ optional\\|rest\\|key\\|allow-other-keys\\|aux\\|whole\\|body\\|environment\
|
||||
;(put 'defclass 'common-lisp-indent-function '((&whole 2 &rest (&whole 2 &rest 1) &rest (&whole 2 &rest 1)))
|
||||
;(put 'defgeneric 'common-lisp-indent-function 'defun)
|
||||
|
||||
(provide 'cl-indent)
|
||||
|
||||
;;; cl-indent.el ends here
|
||||
|
@ -11,7 +11,7 @@
|
||||
;;;;;; cl--map-overlays cl--map-intervals cl--map-keymap-recursively
|
||||
;;;;;; cl-notevery cl-notany cl-every cl-some cl-mapcon cl-mapcan
|
||||
;;;;;; cl-mapl cl-mapc cl-maplist cl-map cl--mapcar-many cl-equalp
|
||||
;;;;;; cl-coerce) "cl-extra" "cl-extra.el" "c5730f2a706cb1efc5fec0a790d3ca72")
|
||||
;;;;;; cl-coerce) "cl-extra" "cl-extra.el" "011111887a1f353218e59e14d0b09c68")
|
||||
;;; Generated autoloads from cl-extra.el
|
||||
|
||||
(autoload 'cl-coerce "cl-extra" "\
|
||||
@ -267,7 +267,7 @@ including `cl-block' and `cl-eval-when'.
|
||||
;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when
|
||||
;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp
|
||||
;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*)
|
||||
;;;;;; "cl-macs" "cl-macs.el" "8a90c81a400a2846e7b4c3da07626d94")
|
||||
;;;;;; "cl-macs" "cl-macs.el" "b839ad3781c4f2f849df0639b4eba166")
|
||||
;;; Generated autoloads from cl-macs.el
|
||||
|
||||
(autoload 'cl--compiler-macro-list* "cl-macs" "\
|
||||
@ -417,17 +417,35 @@ This is compatible with Common Lisp, but note that `defun' and
|
||||
|
||||
(autoload 'cl-loop "cl-macs" "\
|
||||
The Common Lisp `loop' macro.
|
||||
Valid clauses are:
|
||||
for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM,
|
||||
for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR,
|
||||
for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND,
|
||||
always COND, never COND, thereis COND, collect EXPR into VAR,
|
||||
append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR,
|
||||
count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR,
|
||||
if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
|
||||
unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
|
||||
do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR,
|
||||
finally return EXPR, named NAME.
|
||||
Valid clauses include:
|
||||
For clauses:
|
||||
for VAR from/upfrom/downfrom EXPR1 to/upto/downto/above/below EXPR2 by EXPR3
|
||||
for VAR = EXPR1 then EXPR2
|
||||
for VAR in/on/in-ref LIST by FUNC
|
||||
for VAR across/across-ref ARRAY
|
||||
for VAR being:
|
||||
the elements of/of-ref SEQUENCE [using (index VAR2)]
|
||||
the symbols [of OBARRAY]
|
||||
the hash-keys/hash-values of HASH-TABLE [using (hash-values/hash-keys V2)]
|
||||
the key-codes/key-bindings/key-seqs of KEYMAP [using (key-bindings VAR2)]
|
||||
the overlays/intervals [of BUFFER] [from POS1] [to POS2]
|
||||
the frames/buffers
|
||||
the windows [of FRAME]
|
||||
Iteration clauses:
|
||||
repeat INTEGER
|
||||
while/until/always/never/thereis CONDITION
|
||||
Accumulation clauses:
|
||||
collect/append/nconc/concat/vconcat/count/sum/maximize/minimize FORM
|
||||
[into VAR]
|
||||
Miscellaneous clauses:
|
||||
with VAR = INIT
|
||||
if/when/unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...]
|
||||
named NAME
|
||||
initially/finally [do] EXPRS...
|
||||
do EXPRS...
|
||||
[finally] return EXPR
|
||||
|
||||
For more details, see Info node `(cl)Loop Facility'.
|
||||
|
||||
\(fn CLAUSE...)" nil t)
|
||||
|
||||
|
@ -765,17 +765,35 @@ This is compatible with Common Lisp, but note that `defun' and
|
||||
;;;###autoload
|
||||
(defmacro cl-loop (&rest loop-args)
|
||||
"The Common Lisp `loop' macro.
|
||||
Valid clauses are:
|
||||
for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM,
|
||||
for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR,
|
||||
for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND,
|
||||
always COND, never COND, thereis COND, collect EXPR into VAR,
|
||||
append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR,
|
||||
count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR,
|
||||
if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
|
||||
unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
|
||||
do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR,
|
||||
finally return EXPR, named NAME.
|
||||
Valid clauses include:
|
||||
For clauses:
|
||||
for VAR from/upfrom/downfrom EXPR1 to/upto/downto/above/below EXPR2 by EXPR3
|
||||
for VAR = EXPR1 then EXPR2
|
||||
for VAR in/on/in-ref LIST by FUNC
|
||||
for VAR across/across-ref ARRAY
|
||||
for VAR being:
|
||||
the elements of/of-ref SEQUENCE [using (index VAR2)]
|
||||
the symbols [of OBARRAY]
|
||||
the hash-keys/hash-values of HASH-TABLE [using (hash-values/hash-keys V2)]
|
||||
the key-codes/key-bindings/key-seqs of KEYMAP [using (key-bindings VAR2)]
|
||||
the overlays/intervals [of BUFFER] [from POS1] [to POS2]
|
||||
the frames/buffers
|
||||
the windows [of FRAME]
|
||||
Iteration clauses:
|
||||
repeat INTEGER
|
||||
while/until/always/never/thereis CONDITION
|
||||
Accumulation clauses:
|
||||
collect/append/nconc/concat/vconcat/count/sum/maximize/minimize FORM
|
||||
[into VAR]
|
||||
Miscellaneous clauses:
|
||||
with VAR = INIT
|
||||
if/when/unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...]
|
||||
named NAME
|
||||
initially/finally [do] EXPRS...
|
||||
do EXPRS...
|
||||
[finally] return EXPR
|
||||
|
||||
For more details, see Info node `(cl)Loop Facility'.
|
||||
|
||||
\(fn CLAUSE...)"
|
||||
(declare (debug (&rest &or
|
||||
|
@ -394,7 +394,7 @@ font-lock keywords will not be case sensitive."
|
||||
:enable mark-active))
|
||||
(bindings--define-key menu-map [eval-sexp]
|
||||
'(menu-item "Evaluate Last S-expression" eval-last-sexp
|
||||
:help "Evaluate sexp before point; print value in minibuffer"))
|
||||
:help "Evaluate sexp before point; print value in echo area"))
|
||||
(bindings--define-key menu-map [separator-format] menu-bar-separator)
|
||||
(bindings--define-key menu-map [comment-region]
|
||||
'(menu-item "Comment Out Region" comment-region
|
||||
@ -772,7 +772,7 @@ If CHAR is not a character, return nil."
|
||||
|
||||
|
||||
(defun eval-last-sexp-1 (eval-last-sexp-arg-internal)
|
||||
"Evaluate sexp before point; print value in minibuffer.
|
||||
"Evaluate sexp before point; print value in the echo area.
|
||||
With argument, print output into current buffer."
|
||||
(let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t)))
|
||||
;; Setup the lexical environment if lexical-binding is enabled.
|
||||
@ -825,7 +825,7 @@ POS specifies the starting position where EXP was found and defaults to point."
|
||||
`(progn ,@(mapcar (lambda (v) `(defvar ,v)) vars) ,exp)))))
|
||||
|
||||
(defun eval-last-sexp (eval-last-sexp-arg-internal)
|
||||
"Evaluate sexp before point; print value in minibuffer.
|
||||
"Evaluate sexp before point; print value in the echo area.
|
||||
Interactively, with prefix argument, print output into current buffer.
|
||||
Truncates long output according to the value of the variables
|
||||
`eval-expression-print-length' and `eval-expression-print-level'.
|
||||
@ -891,14 +891,13 @@ Reinitialize the face according to the `defface' specification."
|
||||
|
||||
(defun eval-defun-2 ()
|
||||
"Evaluate defun that point is in or before.
|
||||
The value is displayed in the minibuffer.
|
||||
The value is displayed in the echo area.
|
||||
If the current defun is actually a call to `defvar',
|
||||
then reset the variable using the initial value expression
|
||||
even if the variable already has some other value.
|
||||
\(Normally `defvar' does not change the variable's value
|
||||
if it already has a value.\)
|
||||
|
||||
With argument, insert value in current buffer after the defun.
|
||||
Return the result of evaluation."
|
||||
;; FIXME: the print-length/level bindings should only be applied while
|
||||
;; printing, not while evaluating.
|
||||
@ -950,11 +949,11 @@ this command arranges for all errors to enter the debugger.
|
||||
With a prefix argument, instrument the code for Edebug.
|
||||
|
||||
If acting on a `defun' for FUNCTION, and the function was
|
||||
instrumented, `Edebug: FUNCTION' is printed in the minibuffer. If not
|
||||
instrumented, `Edebug: FUNCTION' is printed in the echo area. If not
|
||||
instrumented, just FUNCTION is printed.
|
||||
|
||||
If not acting on a `defun', the result of evaluation is displayed in
|
||||
the minibuffer. This display is controlled by the variables
|
||||
the echo area. This display is controlled by the variables
|
||||
`eval-expression-print-length' and `eval-expression-print-level',
|
||||
which see."
|
||||
(interactive "P")
|
||||
|
@ -167,7 +167,7 @@ WHERE is a symbol to select an entry in `advice--where-alist'."
|
||||
(if (or (equal function (advice--car definition))
|
||||
(when name
|
||||
(equal name (cdr (assq 'name (advice--props definition))))))
|
||||
(setq found t)
|
||||
(setq found definition)
|
||||
(setq definition (advice--cdr definition))))
|
||||
found))
|
||||
|
||||
@ -260,8 +260,12 @@ is also interactive. There are 3 cases:
|
||||
|
||||
;;;###autoload
|
||||
(defun advice--add-function (where ref function props)
|
||||
(unless (advice--member-p function (cdr (assq 'name props))
|
||||
(gv-deref ref))
|
||||
(let ((a (advice--member-p function (cdr (assq 'name props))
|
||||
(gv-deref ref))))
|
||||
(when a
|
||||
;; The advice is already present. Remove the old one, first.
|
||||
(setf (gv-deref ref)
|
||||
(advice--remove-function (gv-deref ref) (advice--car a))))
|
||||
(setf (gv-deref ref)
|
||||
(advice--make where function (gv-deref ref) props))))
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
;; Created: 10 Mar 2007
|
||||
;; Version: 1.0.1
|
||||
;; Keywords: tools
|
||||
;; Package-Requires: ((tabulated-list "1.0"))
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
@ -613,8 +614,8 @@ EXTRA-PROPERTIES is currently unused."
|
||||
|
||||
(defvar tar-parse-info)
|
||||
(declare-function tar-untar-buffer "tar-mode" ())
|
||||
(declare-function tar-header-name "tar-mode" (tar-header))
|
||||
(declare-function tar-header-link-type "tar-mode" (tar-header))
|
||||
(declare-function tar-header-name "tar-mode" (tar-header) t)
|
||||
(declare-function tar-header-link-type "tar-mode" (tar-header) t)
|
||||
|
||||
(defun package-untar-buffer (dir)
|
||||
"Untar the current buffer.
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
;; Author: Chong Yidong <cyd@stupidchicken.com>
|
||||
;; Keywords: extensions, lisp
|
||||
;; Version: 1.0
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
|
@ -100,14 +100,14 @@ current global map. The macro `lambda' is self-evaluating, hence always
|
||||
returns the same value (the function it defines may return varying values
|
||||
when called)."
|
||||
:group 'testcover
|
||||
:type 'hook)
|
||||
:type '(repeat symbol))
|
||||
|
||||
(defcustom testcover-noreturn-functions
|
||||
'(error noreturn throw signal)
|
||||
"Subset of `testcover-1value-functions' -- these never return. We mark
|
||||
them as having returned nil just before calling them."
|
||||
:group 'testcover
|
||||
:type 'hook)
|
||||
:type '(repeat symbol))
|
||||
|
||||
(defcustom testcover-compose-functions
|
||||
'(+ - * / = append length list make-keymap make-sparse-keymap
|
||||
@ -118,7 +118,7 @@ calls to one of the `testcover-1value-functions', so if that's true then no
|
||||
brown splotch is shown for these. This list is quite incomplete! Most
|
||||
side-effect-free functions should be here."
|
||||
:group 'testcover
|
||||
:type 'hook)
|
||||
:type '(repeat symbol))
|
||||
|
||||
(defcustom testcover-progn-functions
|
||||
'(define-key fset function goto-char mapc overlay-put progn
|
||||
@ -132,7 +132,7 @@ brown splotch is shown for these if the last argument is a constant or a
|
||||
call to one of the `testcover-1value-functions'. This list is probably
|
||||
incomplete!"
|
||||
:group 'testcover
|
||||
:type 'hook)
|
||||
:type '(repeat symbol))
|
||||
|
||||
(defcustom testcover-prog1-functions
|
||||
'(prog1 unwind-protect)
|
||||
@ -140,7 +140,7 @@ incomplete!"
|
||||
brown splotch is shown for these if the first argument is a constant or a
|
||||
call to one of the `testcover-1value-functions'."
|
||||
:group 'testcover
|
||||
:type 'hook)
|
||||
:type '(repeat symbol))
|
||||
|
||||
(defcustom testcover-potentially-1value-functions
|
||||
'(add-hook and beep or remove-hook unless when)
|
||||
|
@ -200,6 +200,18 @@ some global variables)."
|
||||
|
||||
(defvar trace--timer nil)
|
||||
|
||||
(defun trace--display-buffer (buf)
|
||||
(unless (or trace--timer
|
||||
(get-buffer-window buf 'visible))
|
||||
(setq trace--timer
|
||||
;; Postpone the display to some later time, in case we
|
||||
;; can't actually do it now.
|
||||
(run-with-timer 0 nil
|
||||
(lambda ()
|
||||
(setq trace--timer nil)
|
||||
(display-buffer buf nil 0))))))
|
||||
|
||||
|
||||
(defun trace-make-advice (function buffer background context)
|
||||
"Build the piece of advice to be added to trace FUNCTION.
|
||||
FUNCTION is the name of the traced function.
|
||||
@ -214,15 +226,7 @@ be printed along with the arguments in the trace."
|
||||
(unless inhibit-trace
|
||||
(with-current-buffer trace-buffer
|
||||
(set (make-local-variable 'window-point-insertion-type) t)
|
||||
(unless (or background trace--timer
|
||||
(get-buffer-window trace-buffer 'visible))
|
||||
(setq trace--timer
|
||||
;; Postpone the display to some later time, in case we
|
||||
;; can't actually do it now.
|
||||
(run-with-timer 0 nil
|
||||
(lambda ()
|
||||
(setq trace--timer nil)
|
||||
(display-buffer trace-buffer)))))
|
||||
(unless background (trace--display-buffer trace-buffer))
|
||||
(goto-char (point-max))
|
||||
;; Insert a separator from previous trace output:
|
||||
(if (= trace-level 1) (insert trace-separator))
|
||||
@ -235,7 +239,7 @@ be printed along with the arguments in the trace."
|
||||
(unless inhibit-trace
|
||||
(let ((ctx (funcall context)))
|
||||
(with-current-buffer trace-buffer
|
||||
(unless background (display-buffer trace-buffer))
|
||||
(unless background (trace--display-buffer trace-buffer))
|
||||
(goto-char (point-max))
|
||||
(insert
|
||||
(trace-exit-message
|
||||
|
@ -96,6 +96,10 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Otherwise it just hangs. This seems preferable.
|
||||
(if noninteractive
|
||||
(error "edt-mapper cannot be loaded in batch mode"))
|
||||
|
||||
;;;
|
||||
;;; Decide Emacs Variant, GNU Emacs or XEmacs (aka Lucid Emacs).
|
||||
;;; Determine Window System, and X Server Vendor (if appropriate).
|
||||
|
@ -2440,7 +2440,7 @@ If FILE is nil, try to load a default file. The default file names are
|
||||
|
||||
|
||||
;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins
|
||||
;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "fcc961b0b1e88f7fc9018b02742c27a8")
|
||||
;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "ae3bca6f21640b5713a7c58c40f30847")
|
||||
;;; Generated autoloads from tpu-extras.el
|
||||
|
||||
(autoload 'tpu-cursor-free-mode "tpu-extras" "\
|
||||
|
@ -436,6 +436,8 @@ A repeat count means scroll that many sections."
|
||||
(interactive)
|
||||
(tpu-cursor-free-mode -1))
|
||||
|
||||
(provide 'tpu-extras)
|
||||
|
||||
;; Local Variables:
|
||||
;; generated-autoload-file: "tpu-edt.el"
|
||||
;; End:
|
||||
|
@ -424,7 +424,7 @@ delete the text being replaced, as in standard Vi."
|
||||
;; (defcustom viper-emacs-state-cursor-color "Magenta"
|
||||
(defcustom viper-emacs-state-cursor-color nil
|
||||
"Cursor color when Viper is in Emacs state."
|
||||
:type 'string
|
||||
:type '(choice (const nil) string)
|
||||
:group 'viper)
|
||||
|
||||
;; internal var, used to remember the default cursor color of emacs frames
|
||||
|
39
lisp/epa.el
39
lisp/epa.el
@ -621,30 +621,33 @@ If SECRET is non-nil, list secret keys instead of public keys."
|
||||
(message "%s..." prompt))))
|
||||
|
||||
;;;###autoload
|
||||
(defun epa-decrypt-file (file)
|
||||
"Decrypt FILE."
|
||||
(interactive "fFile: ")
|
||||
(setq file (expand-file-name file))
|
||||
(let* ((default-name (file-name-sans-extension file))
|
||||
(plain (expand-file-name
|
||||
(read-file-name
|
||||
(concat "To file (default "
|
||||
(file-name-nondirectory default-name)
|
||||
") ")
|
||||
(file-name-directory default-name)
|
||||
default-name)))
|
||||
(context (epg-make-context epa-protocol)))
|
||||
(defun epa-decrypt-file (decrypt-file plain-file)
|
||||
"Decrypt DECRYPT-FILE into PLAIN-FILE."
|
||||
(interactive
|
||||
(let (file default-name plain)
|
||||
(setq file (read-file-name "File to decrypt: "))
|
||||
(setq default-name (file-name-sans-extension (expand-file-name file)))
|
||||
(setq plain (expand-file-name
|
||||
(read-file-name
|
||||
(concat "To file (default "
|
||||
(file-name-nondirectory default-name)
|
||||
") ")
|
||||
(file-name-directory default-name)
|
||||
default-name)))
|
||||
(list file plain)))
|
||||
(setq decrypt-file (expand-file-name decrypt-file))
|
||||
(let ((context (epg-make-context epa-protocol)))
|
||||
(epg-context-set-passphrase-callback context
|
||||
#'epa-passphrase-callback-function)
|
||||
(epg-context-set-progress-callback context
|
||||
(cons
|
||||
#'epa-progress-callback-function
|
||||
(format "Decrypting %s..."
|
||||
(file-name-nondirectory file))))
|
||||
(message "Decrypting %s..." (file-name-nondirectory file))
|
||||
(epg-decrypt-file context file plain)
|
||||
(message "Decrypting %s...wrote %s" (file-name-nondirectory file)
|
||||
(file-name-nondirectory plain))
|
||||
(file-name-nondirectory decrypt-file))))
|
||||
(message "Decrypting %s..." (file-name-nondirectory decrypt-file))
|
||||
(epg-decrypt-file context decrypt-file plain-file)
|
||||
(message "Decrypting %s...wrote %s" (file-name-nondirectory decrypt-file)
|
||||
(file-name-nondirectory plain-file))
|
||||
(if (epg-context-result-for context 'verify)
|
||||
(epa-display-info (epg-verify-result-to-string
|
||||
(epg-context-result-for context 'verify))))))
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-05-09 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* erc-desktop-notifications.el (erc-notifications-icon):
|
||||
Fix custom type.
|
||||
|
||||
2013-02-13 Aidan Gauland <aidalgol@no8wireless.co.nz>
|
||||
|
||||
* erc-match.el (erc-match-message): Fix last commit.
|
||||
|
@ -44,7 +44,7 @@
|
||||
(defcustom erc-notifications-icon nil
|
||||
"Icon to use for notification."
|
||||
:group 'erc-notifications
|
||||
:type 'file)
|
||||
:type '(choice (const :tag "No icon" nil) file))
|
||||
|
||||
(defun erc-notifications-notify (nick msg)
|
||||
"Notify that NICK send some MSG.
|
||||
|
@ -68,6 +68,7 @@
|
||||
;; with sufficient pointers to locate the relevant help text.
|
||||
|
||||
;;; Code:
|
||||
(require 'pcomplete)
|
||||
|
||||
(eval-when-compile
|
||||
(require 'cl-lib)
|
||||
@ -242,8 +243,6 @@ to writing a completion function."
|
||||
|
||||
(defun eshell-cmpl-initialize ()
|
||||
"Initialize the completions module."
|
||||
(unless (fboundp 'pcomplete)
|
||||
(load "pcmpl-auto" t t))
|
||||
(set (make-local-variable 'pcomplete-command-completion-function)
|
||||
eshell-command-completion-function)
|
||||
(set (make-local-variable 'pcomplete-command-name-function)
|
||||
|
@ -119,7 +119,8 @@ This option slows down recursive glob processing by quite a bit."
|
||||
"*" "+")) (+ pos 2))
|
||||
(cons "*" (1+ pos))))))
|
||||
"An alist for translation of extended globbing characters."
|
||||
:type '(repeat (cons character (choice regexp function)))
|
||||
:type '(alist :key-type character
|
||||
:value-type (choice string function))
|
||||
:group 'eshell-glob)
|
||||
|
||||
;;; Functions:
|
||||
|
@ -189,21 +189,18 @@ element, regardless of any text on the command line. In that case,
|
||||
(defvar eshell-matching-input-from-input-string "")
|
||||
(defvar eshell-save-history-index nil)
|
||||
|
||||
(defvar eshell-isearch-map nil)
|
||||
|
||||
(unless eshell-isearch-map
|
||||
(setq eshell-isearch-map (copy-keymap isearch-mode-map))
|
||||
(define-key eshell-isearch-map [(control ?m)] 'eshell-isearch-return)
|
||||
(define-key eshell-isearch-map [return] 'eshell-isearch-return)
|
||||
(define-key eshell-isearch-map [(control ?r)] 'eshell-isearch-repeat-backward)
|
||||
(define-key eshell-isearch-map [(control ?s)] 'eshell-isearch-repeat-forward)
|
||||
(define-key eshell-isearch-map [(control ?g)] 'eshell-isearch-abort)
|
||||
(define-key eshell-isearch-map [backspace] 'eshell-isearch-delete-char)
|
||||
(define-key eshell-isearch-map [delete] 'eshell-isearch-delete-char)
|
||||
(defvar eshell-isearch-cancel-map)
|
||||
(define-prefix-command 'eshell-isearch-cancel-map)
|
||||
(define-key eshell-isearch-map [(control ?c)] 'eshell-isearch-cancel-map)
|
||||
(define-key eshell-isearch-cancel-map [(control ?c)] 'eshell-isearch-cancel))
|
||||
(defvar eshell-isearch-map
|
||||
(let ((map (copy-keymap isearch-mode-map)))
|
||||
(define-key map [(control ?m)] 'eshell-isearch-return)
|
||||
(define-key map [return] 'eshell-isearch-return)
|
||||
(define-key map [(control ?r)] 'eshell-isearch-repeat-backward)
|
||||
(define-key map [(control ?s)] 'eshell-isearch-repeat-forward)
|
||||
(define-key map [(control ?g)] 'eshell-isearch-abort)
|
||||
(define-key map [backspace] 'eshell-isearch-delete-char)
|
||||
(define-key map [delete] 'eshell-isearch-delete-char)
|
||||
(define-key map "\C-c\C-c" 'eshell-isearch-cancel)
|
||||
map)
|
||||
"Keymap used in isearch in Eshell.")
|
||||
|
||||
(defvar eshell-rebind-keys-alist)
|
||||
|
||||
|
@ -297,7 +297,7 @@ X resource class for the attribute."
|
||||
|
||||
|
||||
(declare-function internal-face-x-get-resource "xfaces.c"
|
||||
(resource class frame))
|
||||
(resource class &optional frame))
|
||||
|
||||
(declare-function internal-set-lisp-face-attribute-from-resource "xfaces.c"
|
||||
(face attr value &optional frame))
|
||||
@ -933,6 +933,8 @@ of the default face. Value is FACE."
|
||||
;;; Interactively modifying faces.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defvar crm-separator) ; from crm.el
|
||||
|
||||
(defun read-face-name (prompt &optional default multiple)
|
||||
"Read one or more face names, prompting with PROMPT.
|
||||
PROMPT should not end in a space or a colon.
|
||||
|
@ -245,7 +245,8 @@ the preceding slash. The star represents all the subdirectories except
|
||||
("\\.hh\\'" (".cc" ".C"))
|
||||
|
||||
("\\.c\\'" (".h"))
|
||||
("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp"))
|
||||
("\\.m\\'" (".h"))
|
||||
("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp" ".m"))
|
||||
|
||||
("\\.C\\'" (".H" ".hh" ".h"))
|
||||
("\\.H\\'" (".C" ".CC"))
|
||||
@ -267,6 +268,7 @@ This list should contain the most used extensions before the others,
|
||||
since the search algorithm searches sequentially through each directory
|
||||
specified in `ff-search-directories'. If a file is not found, a new one
|
||||
is created with the first matching extension (`.cc' yields `.hh')."
|
||||
:version "24.4" ; add .m
|
||||
:type '(repeat (list regexp (choice (repeat string) function)))
|
||||
:group 'ff)
|
||||
|
||||
|
@ -2298,7 +2298,7 @@ in which C preprocessor directives are used. e.g. `asm-mode' and
|
||||
"with-selected-window" "with-selected-frame"
|
||||
"with-silent-modifications" "with-syntax-table"
|
||||
"with-temp-buffer" "with-temp-file" "with-temp-message"
|
||||
"with-timeout" "with-timeout-handler" "with-wrapper-hook") t)
|
||||
"with-timeout" "with-timeout-handler") t)
|
||||
"\\_>")
|
||||
. 1)
|
||||
;; Control structures. Common Lisp forms.
|
||||
|
@ -1256,6 +1256,23 @@ bars (top, bottom, or nil)."
|
||||
(unless (memq vert '(left right nil))
|
||||
(setq vert default-frame-scroll-bars))
|
||||
(cons vert hor)))
|
||||
|
||||
(defun frame-monitor-attributes (&optional frame)
|
||||
"Return the attributes of the physical monitor dominating FRAME.
|
||||
If FRAME is omitted, describe the currently selected frame.
|
||||
|
||||
A frame is dominated by a physical monitor when either the
|
||||
largest area of the frame resides in the monitor, or the monitor
|
||||
is the closest to the frame if the frame does not intersect any
|
||||
physical monitors.
|
||||
|
||||
See `display-monitor-attributes-list' for the list of attribute
|
||||
keys and their meanings."
|
||||
(or frame (setq frame (selected-frame)))
|
||||
(cl-loop for attributes in (display-monitor-attributes-list frame)
|
||||
for frames = (cdr (assq 'frames attributes))
|
||||
if (memq frame frames) return attributes))
|
||||
|
||||
|
||||
;;;; Frame/display capabilities.
|
||||
(defun selected-terminal ()
|
||||
@ -1476,6 +1493,54 @@ The value is one of the symbols `static-gray', `gray-scale',
|
||||
(t
|
||||
'static-gray))))
|
||||
|
||||
(declare-function x-display-monitor-attributes-list "xfns.c"
|
||||
(&optional terminal))
|
||||
(declare-function ns-display-monitor-attributes-list "nsfns.m"
|
||||
(&optional terminal))
|
||||
|
||||
(defun display-monitor-attributes-list (&optional display)
|
||||
"Return a list of physical monitor attributes on DISPLAY.
|
||||
Each element of the list represents the attributes of each
|
||||
physical monitor. The first element corresponds to the primary
|
||||
monitor.
|
||||
|
||||
Attributes for a physical monitor is represented as an alist of
|
||||
attribute keys and values as follows:
|
||||
|
||||
geometry -- Position and size in pixels in the form of
|
||||
(X Y WIDTH HEIGHT)
|
||||
workarea -- Position and size of the workarea in pixels in the
|
||||
form of (X Y WIDTH HEIGHT)
|
||||
mm-size -- Width and height in millimeters in the form of
|
||||
(WIDTH HEIGHT)
|
||||
frames -- List of frames dominated by the physical monitor
|
||||
name (*) -- Name of the physical monitor as a string
|
||||
|
||||
where X, Y, WIDTH, and HEIGHT are integers. Keys labeled
|
||||
with (*) are optional.
|
||||
|
||||
A frame is dominated by a physical monitor when either the
|
||||
largest area of the frame resides in the monitor, or the monitor
|
||||
is the closest to the frame if the frame does not intersect any
|
||||
physical monitors. Every non-tip frame (including invisible one)
|
||||
in a graphical display is dominated by exactly one physical
|
||||
monitor at a time, though it can span multiple (or no) physical
|
||||
monitors."
|
||||
(let ((frame-type (framep-on-display display)))
|
||||
(cond
|
||||
((eq frame-type 'x)
|
||||
(x-display-monitor-attributes-list display))
|
||||
((eq frame-type 'ns)
|
||||
(ns-display-monitor-attributes-list display))
|
||||
(t
|
||||
(let ((geometry (list 0 0 (display-pixel-width display)
|
||||
(display-pixel-height display))))
|
||||
`(((geometry . ,geometry)
|
||||
(workarea . ,geometry)
|
||||
(mm-size . (,(display-mm-width display)
|
||||
,(display-mm-height display)))
|
||||
(frames . ,(frames-on-display-list display)))))))))
|
||||
|
||||
|
||||
;;;; Frame geometry values
|
||||
|
||||
|
@ -548,7 +548,6 @@ like an INI file. You can add this hook to `find-file-hook'."
|
||||
(compile
|
||||
(concat (w32-shell-name) " -c " (buffer-file-name)))))
|
||||
|
||||
(eval-when-compile (require 'comint))
|
||||
(declare-function comint-mode "comint" ())
|
||||
(declare-function comint-exec "comint" (buffer name command startfile switches))
|
||||
|
||||
|
@ -1,3 +1,57 @@
|
||||
2013-05-11 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* gnus-vm.el: Make it loadable without VM.
|
||||
(gnus-vm-make-folder, gnus-summary-save-in-vm): Require 'vm.
|
||||
(vm-forward-message, vm-reply, vm-mail): Remove unused autoloads.
|
||||
|
||||
2013-05-09 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* mml1991.el: Make it loadable. (Bug#13456)
|
||||
|
||||
* gnus-art.el (gnus-article-date-headers, gnus-blocked-images):
|
||||
* gnus-async.el (gnus-async-post-fetch-function):
|
||||
* gnus-gravatar.el (gnus-gravatar-size, gnus-gravatar-properties):
|
||||
* gnus-html.el (gnus-html-image-cache-ttl):
|
||||
* gnus-notifications.el (gnus-notifications-timeout):
|
||||
* gnus-picon.el (gnus-picon-properties):
|
||||
* gnus-util.el (gnus-completion-styles):
|
||||
* gnus.el (gnus-other-frame-resume-function):
|
||||
* message.el (message-user-organization-file)
|
||||
(message-cite-reply-position):
|
||||
* nnir.el (nnir-summary-line-format)
|
||||
(nnir-retrieve-headers-override-function):
|
||||
* shr-color.el (shr-color-visible-luminance-min):
|
||||
* shr.el (shr-blocked-images):
|
||||
* spam-report.el (spam-report-resend-to):
|
||||
* spam.el (spam-summary-exit-behavior): Fix custom types.
|
||||
|
||||
* gnus-salt.el (gnus-selected-tree-face): Fix default.
|
||||
|
||||
2013-05-07 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-art.el (gnus-article-describe-bindings): Require help-mode
|
||||
because of let-binding help-xref-following. (Bug#14356)
|
||||
|
||||
2013-05-06 Tassilo Horn <tassilo@member.fsf.org>
|
||||
|
||||
* message.el (message-bury, message-send-and-exit):
|
||||
Revert 2013-05-04 change.
|
||||
|
||||
2013-05-06 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* mml2015.el (mml2015-epg-sign): Add name="signature.asc". (Bug#13465)
|
||||
|
||||
2013-05-04 Thierry Volpiatto <thierry.volpiatto@gmail.com>
|
||||
|
||||
* message.el (message-bury): Make `buffer' optional.
|
||||
(message-send-and-exit): Don't pass `buf' so as to hide the buffer
|
||||
(bug#14085).
|
||||
|
||||
2013-05-04 Andrew Cohen <cohen@bu.edu>
|
||||
|
||||
* gnus-sum.el (gnus-read-header): Ensure groups are prefixed when
|
||||
entering into the registry.
|
||||
|
||||
2013-05-01 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||
|
||||
* gnus-util.el (gnus-emacs-completing-read): Fix a filter for XEmacs.
|
||||
|
@ -1032,15 +1032,15 @@ Some of these headers are updated automatically. See
|
||||
`gnus-article-update-date-headers' for details."
|
||||
:version "24.1"
|
||||
:group 'gnus-article-headers
|
||||
:type '(repeat
|
||||
(item :tag "Universal time (UT)" :value 'ut)
|
||||
(item :tag "Local time zone" :value 'local)
|
||||
(item :tag "Readable English" :value 'english)
|
||||
(item :tag "Elapsed time" :value 'lapsed)
|
||||
(item :tag "Original and elapsed time" :value 'combined-lapsed)
|
||||
(item :tag "Original date header" :value 'original)
|
||||
(item :tag "ISO8601 format" :value 'iso8601)
|
||||
(item :tag "User-defined" :value 'user-defined)))
|
||||
:type '(set
|
||||
(const :tag "Universal time (UT)" ut)
|
||||
(const :tag "Local time zone" local)
|
||||
(const :tag "Readable English" english)
|
||||
(const :tag "Elapsed time" lapsed)
|
||||
(const :tag "Original and elapsed time" combined-lapsed)
|
||||
(const :tag "Original date header" original)
|
||||
(const :tag "ISO8601 format" iso8601)
|
||||
(const :tag "User-defined" user-defined)))
|
||||
|
||||
(defcustom gnus-article-update-date-headers nil
|
||||
"A number that says how often to update the date header (in seconds).
|
||||
@ -1651,7 +1651,7 @@ called with the group name as the parameter, and should return a
|
||||
regexp."
|
||||
:version "24.1"
|
||||
:group 'gnus-art
|
||||
:type 'regexp)
|
||||
:type '(choice regexp function))
|
||||
|
||||
;;; Internal variables
|
||||
|
||||
@ -6629,11 +6629,7 @@ KEY is a string or a vector."
|
||||
;;`gnus-agent-mode' in gnus-agent.el will define it.
|
||||
(defvar gnus-agent-summary-mode)
|
||||
(defvar gnus-draft-mode)
|
||||
;; Calling help-buffer will autoload help-mode.
|
||||
(defvar help-xref-stack-item)
|
||||
;; Emacs 22 doesn't load it in the batch mode.
|
||||
(eval-when-compile
|
||||
(autoload 'help-buffer "help-mode"))
|
||||
|
||||
(defun gnus-article-describe-bindings (&optional prefix)
|
||||
"Show a list of all defined keys, and their definitions.
|
||||
@ -6684,6 +6680,9 @@ then we display only bindings that start with that prefix."
|
||||
(with-current-buffer ,(current-buffer)
|
||||
(gnus-article-describe-bindings prefix)))
|
||||
,prefix)))
|
||||
;; Loading `help-mode' here is necessary if `describe-bindings'
|
||||
;; is replaced with something, e.g. `helm-descbinds'.
|
||||
(require 'help-mode)
|
||||
(with-current-buffer (let (help-xref-following) (help-buffer))
|
||||
(setq help-xref-stack-item item)))))
|
||||
|
||||
|
@ -76,7 +76,7 @@ The function will be called narrowed to the region of the article
|
||||
that was fetched."
|
||||
:version "24.1"
|
||||
:group 'gnus-asynchronous
|
||||
:type 'function)
|
||||
:type '(choice (const nil) function))
|
||||
|
||||
;;; Internal variables.
|
||||
|
||||
|
@ -35,13 +35,13 @@
|
||||
(defcustom gnus-gravatar-size nil
|
||||
"How big should gravatars be displayed.
|
||||
If nil, default to `gravatar-size'."
|
||||
:type 'integer
|
||||
:type '(choice (const nil) integer)
|
||||
:version "24.1"
|
||||
:group 'gnus-gravatar)
|
||||
|
||||
(defcustom gnus-gravatar-properties '(:ascent center :relief 1)
|
||||
"List of image properties applied to Gravatar images."
|
||||
:type 'list
|
||||
:type 'sexp
|
||||
:version "24.1"
|
||||
:group 'gnus-gravatar)
|
||||
|
||||
|
@ -45,7 +45,10 @@
|
||||
"Time used to determine if we should use images from the cache."
|
||||
:version "24.1"
|
||||
:group 'gnus-art
|
||||
:type 'integer)
|
||||
;; FIXME hardly the friendliest type. The allowed value is actually
|
||||
;; any time value, but we are assuming no-one cares about USEC and
|
||||
;; PSEC here. It would be better to eg make it a number of minutes.
|
||||
:type '(list integer integer))
|
||||
|
||||
(defcustom gnus-html-image-automatic-caching t
|
||||
"Whether automatically cache retrieve images."
|
||||
|
@ -64,7 +64,8 @@ not get notifications."
|
||||
|
||||
(defcustom gnus-notifications-timeout nil
|
||||
"Timeout used for notifications sent via `notifications-notify'."
|
||||
:type 'integer
|
||||
:type '(choice (const :tag "Server default" nil)
|
||||
(integer :tag "Milliseconds"))
|
||||
:group 'gnus-notifications)
|
||||
|
||||
(defvar gnus-notifications-sent nil
|
||||
|
@ -77,7 +77,7 @@ Some people may want to add \"unknown\" to this list."
|
||||
|
||||
(defcustom gnus-picon-properties '(:color-symbols (("None" . "white")))
|
||||
"List of image properties applied to picons."
|
||||
:type 'list
|
||||
:type 'sexp
|
||||
:version "24.3"
|
||||
:group 'gnus-picon)
|
||||
|
||||
|
@ -385,7 +385,7 @@ lines."
|
||||
integer)
|
||||
:group 'gnus-summary-tree)
|
||||
|
||||
(defcustom gnus-selected-tree-face 'modeline
|
||||
(defcustom gnus-selected-tree-face 'mode-line
|
||||
"*Face used for highlighting selected articles in the thread tree."
|
||||
:type 'face
|
||||
:group 'gnus-summary-tree)
|
||||
|
@ -12415,7 +12415,9 @@ If REVERSE, save parts that do not match TYPE."
|
||||
(not (gnus-ephemeral-group-p (car where))))
|
||||
(gnus-registry-handle-action
|
||||
(mail-header-id header) nil
|
||||
(gnus-group-prefixed-name (car where) gnus-override-method)
|
||||
(gnus-group-prefixed-name
|
||||
(car where)
|
||||
(or gnus-override-method (gnus-find-method-for-group group)))
|
||||
(mail-header-subject header)
|
||||
(mail-header-from header)))
|
||||
(when (and (stringp id)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user