Now on revision 113338. ------------------------------------------------------------ revno: 113338 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-07-08 23:59:45 -0700 message: ChangeLog fix diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-09 05:09:45 +0000 +++ lisp/ChangeLog 2013-07-09 06:59:45 +0000 @@ -37,31 +37,32 @@ * subr.el (read-quoted-char): Remove unused local variable `char'. 2013-07-07 Michael Kifer - Stefan Monnier + + * ediff.el (ediff-version): Version update. + (ediff-files-command, ediff3-files-command, ediff-merge-command) + (ediff-merge-with-ancestor-command, ediff-directories-command) + (ediff-directories3-command, ediff-merge-directories-command) + (ediff-merge-directories-with-ancestor-command): New functions. + All are command-line interfaces to ediff: to facilitate calling + Emacs with the appropriate ediff functions invoked. + + * viper-cmd.el (viper-del-forward-char-in-insert): New function. + (viper-save-kill-buffer): Check if buffer is modified. + + * viper.el (viper-version): Version update. + (viper-emacs-state-mode-list): Add egg-status-buffer-mode. + +2013-07-07 Stefan Monnier * faces.el (tty-run-terminal-initialization): Run new tty-setup-hook. - - * viper.el (viper-emacs-state-mode-list): Add egg-status-buffer-mode. - (viper-version): Version update. - (viper-go-away, viper-setup-hooks): Function changed. - (viper--lookup-key, viper-catch-tty-ESC, viper-uncatch-tty-ESC) + * viper-cmd.el (viper-envelop-ESC-key): Remove function. + (viper-intercept-ESC-key): Simplify. + * viper-keym.el (viper-ESC-key): Make it a constant, don't use kbd. + * viper.el (viper--tty-ESC-filter, viper--lookup-key) + (viper-catch-tty-ESC, viper-uncatch-tty-ESC) (viper-setup-ESC-to-escape): New functions. - - * viper-cmd.el (viper-del-forward-char-in-insert): New function. - (viper-save-kill-buffer): Check if buffer is modified. - (viper-envelop-ESC-key): Function deleted. - (viper-intercept-ESC-key): Function changed. - - * viper-keym.el (viper-ESC-key): Constant changed. - - * ediff.el (ediff-files-command, ediff3-files-command): New functions. - (ediff-merge-command, ediff-merge-with-ancestor-command): New functions. - (ediff-directories-command, ediff-directories3-command): New functions. - (ediff-merge-directories-command): New function. - (ediff-merge-directories-with-ancestor-command): New function. - All the above are command-line interfaces to ediff: facilitate calling - Emacs with the appropriate ediff functions invoked. - (ediff-version): Version update. + (viper-go-away, viper-set-hooks): Call viper-setup-ESC-to-escape. + (viper-set-hooks): Do not modify flyspell-mode-hook. (Bug#13793) 2013-07-07 Eli Zaretskii ------------------------------------------------------------ revno: 113337 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-07-08 23:29:29 -0700 message: * filelock.c: Fix comment to match code. diff: === modified file 'src/filelock.c' --- src/filelock.c 2013-07-07 18:48:16 +0000 +++ src/filelock.c 2013-07-09 06:29:29 +0000 @@ -381,9 +381,9 @@ #endif } -/* Create the lock file FILE with contents CONTENTS. Return 0 if +/* Create the lock file LFNAME with contents LOCK_INFO_STR. Return 0 if successful, an errno value on failure. If FORCE, remove any - existing FILE if necessary. */ + existing LFNAME if necessary. */ static int create_lock_file (char *lfname, char *lock_info_str, bool force) ------------------------------------------------------------ revno: 113336 fixes bug: http://debbugs.gnu.org/14552 committer: Leo Liu branch nick: trunk timestamp: Tue 2013-07-09 13:09:45 +0800 message: * ido.el (ido-add-virtual-buffers-to-list): Robustify. (Bug#14552) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-09 02:47:44 +0000 +++ lisp/ChangeLog 2013-07-09 05:09:45 +0000 @@ -3,6 +3,7 @@ * ido.el (ido-read-directory-name): Handle fallback. (ido-read-file-name): Update DIR to ido-current-directory. (Bug#1516) + (ido-add-virtual-buffers-to-list): Robustify. (Bug#14552) 2013-07-09 Dmitry Gutov === modified file 'lisp/ido.el' --- lisp/ido.el 2013-07-09 02:47:44 +0000 +++ lisp/ido.el 2013-07-09 05:09:45 +0000 @@ -3461,8 +3461,14 @@ (setq ido-virtual-buffers nil) (let (name) (dolist (head recentf-list) - (and (setq name (file-name-nondirectory head)) - (null (get-file-buffer head)) + (setq name (file-name-nondirectory head)) + ;; In case HEAD is a directory with trailing /. See bug#14552. + (when (equal name "") + (setq name (file-name-nondirectory (directory-file-name head)))) + (when (equal name "") + (setq name head)) + (and (not (equal name "")) + (null (get-file-buffer head)) (not (assoc name ido-virtual-buffers)) (not (member name ido-temp-list)) (not (ido-ignore-item-p name ido-ignore-buffers)) ------------------------------------------------------------ revno: 113335 committer: Paul Eggert branch nick: trunk timestamp: Mon 2013-07-08 22:04:45 -0700 message: Space between "defined" and "(". diff: === modified file 'src/frame.c' --- src/frame.c 2013-07-06 10:41:38 +0000 +++ src/frame.c 2013-07-09 05:04:45 +0000 @@ -1855,7 +1855,7 @@ /* Return the value of frame parameter PROP in frame FRAME. */ #ifdef HAVE_WINDOW_SYSTEM -#if !HAVE_NS && !defined(WINDOWSNT) +#if !HAVE_NS && !defined (WINDOWSNT) static #endif Lisp_Object === modified file 'src/image.c' --- src/image.c 2013-07-08 13:26:13 +0000 +++ src/image.c 2013-07-09 05:04:45 +0000 @@ -8054,7 +8054,7 @@ init_color_table (); -#if defined(HAVE_MAGICKEXPORTIMAGEPIXELS) && ! defined(HAVE_NS) +#if defined (HAVE_MAGICKEXPORTIMAGEPIXELS) && ! defined (HAVE_NS) if (imagemagick_render_type != 0) { /* Magicexportimage is normally faster than pixelpushing. This === modified file 'src/lisp.h' --- src/lisp.h 2013-07-07 18:00:14 +0000 +++ src/lisp.h 2013-07-09 05:04:45 +0000 @@ -3922,7 +3922,7 @@ extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); -#if HAVE_NS || defined(WINDOWSNT) +#if HAVE_NS || defined WINDOWSNT extern Lisp_Object get_frame_param (struct frame *, Lisp_Object); #endif extern void frames_discard_buffer (Lisp_Object); === modified file 'src/nsfns.m' --- src/nsfns.m 2013-07-06 17:58:41 +0000 +++ src/nsfns.m 2013-07-09 05:04:45 +0000 @@ -885,7 +885,7 @@ #ifdef NS_IMPL_GNUSTEP sprintf(tmp, "gnustep-gui-%s", Xstr(GNUSTEP_GUI_VERSION)); -#elif defined(NS_IMPL_COCOA) +#elif defined (NS_IMPL_COCOA) sprintf(tmp, "apple-appkit-%.2f", NSAppKitVersionNumber); #else tmp = "ns-unknown"; @@ -902,7 +902,7 @@ { #ifdef NS_IMPL_GNUSTEP return GNUSTEP_GUI_MAJOR_VERSION * 100 + GNUSTEP_GUI_MINOR_VERSION; -#elif defined(NS_IMPL_COCOA) +#elif defined (NS_IMPL_COCOA) return (int)NSAppKitVersionNumber; #endif return 0; @@ -2493,7 +2493,7 @@ vy = (short) (primary_display_height - vfr.size.height - vfr.origin.y); } - + m->geom.x = (short) fr.origin.x; m->geom.y = y; m->geom.width = (unsigned short) fr.size.width; === modified file 'src/nsmenu.m' --- src/nsmenu.m 2013-06-02 19:14:25 +0000 +++ src/nsmenu.m 2013-07-09 05:04:45 +0000 @@ -612,8 +612,8 @@ if (trackingMenu == 0) return; /*fprintf (stderr, "Updating menu '%s'\n", [[self title] UTF8String]); NSLog (@"%@\n", event); */ -#if ! defined(NS_IMPL_COCOA) || \ - MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 +#if (! defined (NS_IMPL_COCOA) \ + || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) /* Don't know how to do this for anything other than OSX >= 10.5 This is wrong, as it might run Lisp code in the event loop. */ ns_update_menubar (frame, true, self); @@ -1240,7 +1240,7 @@ #ifdef NS_IMPL_GNUSTEP [self insertItemWithItemIdentifier: identifier atIndex: idx]; #endif - + [item setTag: tag]; [item setEnabled: enabled]; ------------------------------------------------------------ revno: 113334 fixes bug: http://debbugs.gnu.org/1516 committer: Leo Liu branch nick: trunk timestamp: Tue 2013-07-09 10:47:44 +0800 message: * ido.el (ido-read-directory-name): Handle fallback. (ido-read-file-name): Update DIR to ido-current-directory. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-09 01:17:48 +0000 +++ lisp/ChangeLog 2013-07-09 02:47:44 +0000 @@ -1,3 +1,9 @@ +2013-07-09 Leo Liu + + * ido.el (ido-read-directory-name): Handle fallback. + (ido-read-file-name): Update DIR to ido-current-directory. + (Bug#1516) + 2013-07-09 Dmitry Gutov * progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove extra === modified file 'lisp/ido.el' --- lisp/ido.el 2013-07-06 12:37:12 +0000 +++ lisp/ido.el 2013-07-09 02:47:44 +0000 @@ -4754,9 +4754,7 @@ (eq (get this-command 'ido) 'dir) (memq this-command ido-read-file-name-as-directory-commands)) (setq filename - (ido-read-directory-name prompt dir default-filename mustmatch initial)) - (if (eq ido-exit 'fallback) - (setq filename 'fallback))) + (ido-read-directory-name prompt dir default-filename mustmatch initial))) ((and (not (eq (get this-command 'ido) 'ignore)) (not (memq this-command ido-read-file-name-non-ido)) (or (null predicate) (eq predicate 'file-exists-p))) @@ -4777,6 +4775,7 @@ (setq ido-exit nil) (setq filename (ido-read-internal 'file prompt 'ido-file-history default-filename mustmatch initial)) + (setq dir ido-current-directory) ; See bug#1516. (cond ((eq ido-exit 'fallback) (setq filename 'fallback)) @@ -4810,10 +4809,14 @@ (ido-work-file-index -1)) (setq filename (ido-read-internal 'dir prompt 'ido-file-history default-dirname mustmatch initial)) - (if filename - (if (and (stringp filename) (string-equal filename ".")) - ido-current-directory - (concat ido-current-directory filename))))) + (cond + ((eq ido-exit 'fallback) + (let ((read-file-name-function nil)) + (run-hook-with-args 'ido-before-fallback-functions 'read-directory-name) + (read-directory-name prompt ido-current-directory + default-dirname mustmatch initial))) + ((equal filename ".") ido-current-directory) + (t (concat ido-current-directory filename))))) ;;;###autoload (defun ido-completing-read (prompt choices &optional _predicate require-match ------------------------------------------------------------ revno: 113333 committer: Dmitry Gutov branch nick: trunk timestamp: Tue 2013-07-09 05:17:48 +0400 message: * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove extra "autoload". Remove "warn lower camel case" section, previously commented out. Highlight negation char. Do not highlight the target in singleton method definitions. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-08 22:26:37 +0000 +++ lisp/ChangeLog 2013-07-09 01:17:48 +0000 @@ -1,3 +1,10 @@ +2013-07-09 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove extra + "autoload". Remove "warn lower camel case" section, previously + commented out. Highlight negation char. Do not highlight the + target in singleton method definitions. + 2013-07-08 Stefan Monnier * faces.el (tty-setup-hook): Declare the hook. === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-07-03 15:46:45 +0000 +++ lisp/progmodes/ruby-mode.el 2013-07-09 01:17:48 +0000 @@ -1721,7 +1721,7 @@ (defconst ruby-font-lock-keywords (list ;; functions - '("^\\s *def\\s +\\([^( \t\n]+\\)" + '("^\\s *def\\s +\\(?:[^( \t\n.]*\\.\\)?\\([^( \t\n]+\\)" 1 font-lock-function-name-face) (list (concat "\\(^\\|[^.@$]\\|\\.\\.\\)\\(" @@ -1809,7 +1809,6 @@ "warn" ;; keyword-like private methods on Module "alias_method" - "autoload" "attr" "attr_accessor" "attr_reader" @@ -1855,9 +1854,9 @@ ;; expression expansion '(ruby-match-expression-expansion 2 font-lock-variable-name-face t) - ;; warn lower camel case - ;'("\\<[a-z]+[a-z0-9]*[A-Z][A-Za-z0-9]*\\([!?]?\\|\\>\\)" - ; 0 font-lock-warning-face) + ;; negation char + '("[^[:alnum:]_]\\(!\\)[^=]" + 1 font-lock-negation-char-face) ) "Additional expressions to highlight in Ruby mode.") ------------------------------------------------------------ revno: 113332 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2013-07-08 23:51:26 +0000 message: Merge changes made in Gnus master diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-07-06 23:40:56 +0000 +++ doc/misc/ChangeLog 2013-07-08 23:51:26 +0000 @@ -1,3 +1,9 @@ +2013-07-08 Tassilo Horn + + * gnus.texi (lines): Correct description of + `gnus-registry-track-extra's default value. Mention + `gnus-registry-remove-extra-data'. + 2013-07-06 Lars Ingebrigtsen * gnus.texi (Group Parameters): Mention regexp === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2013-07-06 23:40:56 +0000 +++ doc/misc/gnus.texi 2013-07-08 23:51:26 +0000 @@ -26006,9 +26006,13 @@ @defvar gnus-registry-track-extra This is a list of symbols, so it's best to change it from the -Customize interface. By default it's @code{(subject sender)}, which -may work for you. It can be annoying if your mail flow is large and -people don't stick to the same groups. +Customize interface. By default it's @code{(subject sender recipient)}, +which may work for you. It can be annoying if your mail flow is large +and people don't stick to the same groups. + +When you decide to stop tracking any of those extra data, you can use +the command @code{gnus-registry-remove-extra-data} to purge it from +the existing registry entries. @end defvar @defvar gnus-registry-split-strategy === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-07-06 23:40:56 +0000 +++ lisp/gnus/ChangeLog 2013-07-08 23:51:26 +0000 @@ -1,3 +1,12 @@ +2013-07-08 Lars Magne Ingebrigtsen + + * nnml.el (nnml-request-compact-group): Don't bug out if we can't + delete files (bug#13481). + +2013-07-08 Tassilo Horn + + * gnus-registry.el (gnus-registry-remove-extra-data): New function. + 2013-07-06 Lars Ingebrigtsen * gnus-art.el (gnus-block-private-groups): Allow `global' methods to === modified file 'lisp/gnus/gnus-registry.el' --- lisp/gnus/gnus-registry.el 2013-02-24 22:44:49 +0000 +++ lisp/gnus/gnus-registry.el 2013-07-08 23:51:26 +0000 @@ -1186,6 +1186,29 @@ (gnus-select-group-with-message-id group message-id) t) (throw 'found t)))))))) +(defun gnus-registry-remove-extra-data (extra) + "Remove tracked EXTRA data from the gnus registry. +EXTRA is a list of symbols. Valid symbols are those contained in +the docs of `gnus-registry-track-extra'. This command is useful +when you stop tracking some extra data and now want to purge it +from your existing entries." + (interactive (list (mapcar 'intern + (completing-read-multiple + "Extra data: " + '("subject" "sender" "recipient"))))) + (when extra + (let ((db gnus-registry-db)) + (registry-reindex db) + (loop for k being the hash-keys of (oref db :data) + using (hash-value v) + do (let ((newv (delq nil (mapcar #'(lambda (entry) + (unless (member (car entry) extra) + entry)) + v)))) + (registry-delete db (list k) nil) + (gnus-registry-insert db k newv))) + (registry-reindex db)))) + ;; TODO: a few things (provide 'gnus-registry) === modified file 'lisp/gnus/nnml.el' --- lisp/gnus/nnml.el 2013-01-01 09:11:05 +0000 +++ lisp/gnus/nnml.el 2013-07-08 23:51:26 +0000 @@ -1094,7 +1094,10 @@ (concat group ":" new-number-string))) ;; Save to the new file: (nnmail-write-region (point-min) (point-max) newfile)) - (funcall nnmail-delete-file-function oldfile)) + (condition-case () + (funcall nnmail-delete-file-function oldfile) + (file-error + (message "Couldn't delete %s" oldfile)))) ;; 2/ Update all marks for this article: ;; #### NOTE: it is possible that the new article number ;; #### already belongs to a range, whereas the corresponding ------------------------------------------------------------ revno: 113331 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2013-07-08 18:26:37 -0400 message: * lisp/faces.el (tty-setup-hook): Declare the hook. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-07-08 17:54:39 +0000 +++ etc/NEWS 2013-07-08 22:26:37 +0000 @@ -540,6 +540,8 @@ * Lisp Changes in Emacs 24.4 +** New hook `tty-setup-hook'. + +++ ** New macro with-eval-after-load. Like eval-after-load, but better behaved. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-08 21:54:54 +0000 +++ lisp/ChangeLog 2013-07-08 22:26:37 +0000 @@ -1,5 +1,7 @@ 2013-07-08 Stefan Monnier + * faces.el (tty-setup-hook): Declare the hook. + * emacs-lisp/pcase.el (pcase--split-pred): Add `vars' argument to try and detect when a guard/pred depends on local vars (bug#14773). (pcase--u1): Adjust caller. === modified file 'lisp/faces.el' --- lisp/faces.el 2013-07-07 19:35:54 +0000 +++ lisp/faces.el 2013-07-08 22:26:37 +0000 @@ -2097,6 +2097,10 @@ nil)))) type) +(defvar tty-setup-hook nil + "Hook run after running the initialization function of a new text terminal. +This can be used to fine tune the `input-decode-map', for example.") + (defun tty-run-terminal-initialization (frame &optional type) "Run the special initialization code for the terminal type of FRAME. The optional TYPE parameter may be used to override the autodetected ------------------------------------------------------------ revno: 113330 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14773 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2013-07-08 17:54:54 -0400 message: * lisp/emacs-lisp/pcase.el (pcase--split-pred): Add `vars' argument to try and detect when a guard/pred depends on local vars. (pcase--u1): Adjust caller. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-08 17:33:17 +0000 +++ lisp/ChangeLog 2013-07-08 21:54:54 +0000 @@ -1,3 +1,9 @@ +2013-07-08 Stefan Monnier + + * emacs-lisp/pcase.el (pcase--split-pred): Add `vars' argument to try + and detect when a guard/pred depends on local vars (bug#14773). + (pcase--u1): Adjust caller. + 2013-07-08 Eli Zaretskii * simple.el (line-move-partial, line-move): Account for @@ -17,7 +23,7 @@ 2013-07-07 Michael Kifer Stefan Monnier - * faces.el (tty-run-terminal-initialization): Function changed. + * faces.el (tty-run-terminal-initialization): Run new tty-setup-hook. * viper.el (viper-emacs-state-mode-list): Add egg-status-buffer-mode. (viper-version): Version update. === modified file 'lisp/emacs-lisp/pcase.el' --- lisp/emacs-lisp/pcase.el 2013-01-08 22:26:21 +0000 +++ lisp/emacs-lisp/pcase.el 2013-07-08 21:54:54 +0000 @@ -482,12 +482,19 @@ all)) '(:pcase--succeed . nil)))) -(defun pcase--split-pred (upat pat) - ;; FIXME: For predicates like (pred (> a)), two such predicates may - ;; actually refer to different variables `a'. +(defun pcase--split-pred (vars upat pat) (let (test) (cond - ((equal upat pat) '(:pcase--succeed . :pcase--fail)) + ((and (equal upat pat) + ;; For predicates like (pred (> a)), two such predicates may + ;; actually refer to different variables `a'. + (or (and (eq 'pred (car upat)) (symbolp (cadr upat))) + ;; FIXME: `vars' gives us the environment in which `upat' will + ;; run, but we don't have the environment in which `pat' will + ;; run, so we can't do a reliable verification. But let's try + ;; and catch at least the easy cases such as (bug#14773). + (not (pcase--fgrep (mapcar #'car vars) (cadr upat))))) + '(:pcase--succeed . :pcase--fail)) ((and (eq 'pred (car upat)) (eq 'pred (car-safe pat)) (or (member (cons (cadr upat) (cadr pat)) @@ -589,7 +596,7 @@ (if (eq (car upat) 'pred) (pcase--mark-used sym)) (let* ((splitrest (pcase--split-rest - sym (lambda (pat) (pcase--split-pred upat pat)) rest)) + sym (lambda (pat) (pcase--split-pred vars upat pat)) rest)) (then-rest (car splitrest)) (else-rest (cdr splitrest))) (pcase--if (if (and (eq (car upat) 'pred) (symbolp (cadr upat))) ------------------------------------------------------------ revno: 113329 committer: Jan D. branch nick: trunk timestamp: Mon 2013-07-08 19:54:39 +0200 message: * NEWS: NS can be build with ImageMagick. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-07-06 09:35:37 +0000 +++ etc/ChangeLog 2013-07-08 17:54:39 +0000 @@ -1,3 +1,7 @@ +2013-07-08 Jan Djärv + + * NEWS: NS can be build with ImageMagick. + 2013-07-06 Juanma Barranquero * NEWS: Document new "generic commands" support. === modified file 'etc/NEWS' --- etc/NEWS 2013-07-06 19:17:22 +0000 +++ etc/NEWS 2013-07-08 17:54:39 +0000 @@ -60,6 +60,10 @@ ** Directories passed to configure option `--enable-locallisppath' are no longer created during installation. +--- +** Emacs for NS (OSX, GNUStep) can be built with ImageMagick support. +pkg-config is required to find ImageMagick libraries. + * Startup Changes in Emacs 24.4 ------------------------------------------------------------ revno: 113328 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2013-07-08 20:33:17 +0300 message: Fix lisp/ChangeLog entry for last commit. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-08 17:30:50 +0000 +++ lisp/ChangeLog 2013-07-08 17:33:17 +0000 @@ -2,6 +2,8 @@ * simple.el (line-move-partial, line-move): Account for line-spacing. + (line-move-partial): Avoid setting vscroll when the last + partially-visible line in window is of default height. 2013-07-08 Lars Magne Ingebrigtsen ------------------------------------------------------------ revno: 113327 committer: Eli Zaretskii branch nick: trunk timestamp: Mon 2013-07-08 20:30:50 +0300 message: Improve scrolling when line-spacing is non-nil. lisp/simple.el (line-move-partial, line-move): Account for line-spacing. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-08 11:19:51 +0000 +++ lisp/ChangeLog 2013-07-08 17:30:50 +0000 @@ -1,3 +1,8 @@ +2013-07-08 Eli Zaretskii + + * simple.el (line-move-partial, line-move): Account for + line-spacing. + 2013-07-08 Lars Magne Ingebrigtsen * net/shr.el (shr-map): Reinstate the `u' key binding, since it's === modified file 'lisp/simple.el' --- lisp/simple.el 2013-07-07 15:49:03 +0000 +++ lisp/simple.el 2013-07-08 17:30:50 +0000 @@ -4764,15 +4764,27 @@ (this-height (nth 0 this-lh)) (this-ypos (nth 2 this-lh)) (dfh (default-font-height)) - py vs) + (lsp (if (display-graphic-p) + (or line-spacing + (default-value 'line-spacing) + (frame-parameter nil 'line-spacing) + 0) + 0)) + py vs rowh dlh) + (if (floatp lsp) + (setq lsp (* dfh lsp))) + ;; Default height of a text line, accounting for the default + ;; face's font and line-spacing, if any. + (setq dlh (+ dfh lsp)) (when (or (null lh) - (>= rbot dfh) - (<= ypos (- dfh)) + (>= rbot dlh) + (<= ypos (- dlh)) (null this-lh) - (<= this-ypos (- dfh))) + (<= this-ypos (- dlh))) (unless lh (let ((wend (pos-visible-in-window-p t nil t))) (setq rbot (nth 3 wend) + rowh (nth 4 wend) vpos (nth 5 wend)))) (unless this-lh (let ((wstart (pos-visible-in-window-p nil nil t))) @@ -4789,14 +4801,14 @@ (cond ;; If last line of window is fully visible, and vscrolling ;; more would make this line invisible, move forward. - ((and (or (< (setq vs (window-vscroll nil t)) dfh) + ((and (or (< (setq vs (window-vscroll nil t)) dlh) (null this-height) - (<= this-height dfh)) + (<= this-height dlh)) (or (null rbot) (= rbot 0))) nil) ;; If cursor is not in the bottom scroll margin, and the ;; current line is is not too tall, move forward. - ((and (or (null this-height) (<= this-height dfh)) + ((and (or (null this-height) (<= this-height dlh)) vpos (> vpos 0) (< py @@ -4806,15 +4818,26 @@ ;; or clear vscroll and move forward at end of tall image. ((> vs 0) (when (or (and rbot (> rbot 0)) - (and this-height (> this-height dfh))) - (set-window-vscroll nil (+ vs dfh) t))) + (and this-height (> this-height dlh))) + (set-window-vscroll nil (+ vs dlh) t))) ;; If cursor just entered the bottom scroll margin, move forward, - ;; but also vscroll one line so redisplay won't recenter. + ;; but also optionally vscroll one line so redisplay won't recenter. ((and vpos (> vpos 0) (= py (min (- (window-screen-lines) scroll-margin 1) (1- vpos)))) - (set-window-vscroll nil dfh t) + ;; Don't vscroll if the partially-visible line at window + ;; bottom has the default height (a.k.a. "just one more text + ;; line"): in that case, we do want redisplay to behave + ;; normally, i.e. recenter or whatever. + ;; + ;; Note: ROWH + RBOT from the value returned by + ;; pos-visible-in-window-p give the total height of the + ;; partially-visible glyph row at the end of the window. As + ;; we are dealing with floats, we disregard sub-pixel + ;; discrepancies between that and DLH. + (if (and rowh rbot (>= (- (+ rowh rbot) dlh) 1)) + (set-window-vscroll nil dlh t)) (line-move-1 arg noerror to-end) t) ;; If there are lines above the last line, scroll-up one line. @@ -4823,7 +4846,7 @@ t) ;; Finally, start vscroll. (t - (set-window-vscroll nil dfh t))))))) + (set-window-vscroll nil dlh t))))))) ;; This is like line-move-1 except that it also performs @@ -4857,13 +4880,25 @@ ;; If we moved into a tall line, set vscroll to make ;; scrolling through tall images more smooth. (let ((lh (line-pixel-height)) - (dfh (default-font-height))) + (dfh (default-font-height)) + (lsp (if (display-graphic-p) + (or line-spacing + (default-value 'line-spacing) + (frame-parameter nil 'line-spacing) + 0) + 0)) + dlh) + ;; DLH is the default height of a text line, accounting + ;; for the default face's font and line-spacing, if any. + (if (floatp lsp) + (setq lsp (* dfh lsp))) + (setq dlh (+ dfh lsp)) (if (and (< arg 0) (< (point) (window-start)) - (> lh dfh)) + (> lh dlh)) (set-window-vscroll nil - (- lh dfh) t)))) + (- lh dlh) t)))) (line-move-1 arg noerror to-end))))) ;; Display-based alternative to line-move-1. ------------------------------------------------------------ revno: 113326 fixes bug: http://debbugs.gnu.org/14798 committer: Jan D. branch nick: trunk timestamp: Mon 2013-07-08 15:26:13 +0200 message: configure.ac (HAVE_IMAGEMAGICK): Check on NS also. image.c (imagemagick_load_image): Do not use MagickExportImagePixels on NS even if it is present. Pixmap on NS is a void*. diff: === modified file 'ChangeLog' --- ChangeLog 2013-07-08 06:15:38 +0000 +++ ChangeLog 2013-07-08 13:26:13 +0000 @@ -1,3 +1,7 @@ +2013-07-08 Magnus Henoch (tiny change) + + * configure.ac (HAVE_IMAGEMAGICK): Check on NS also (Bug#14798). + 2013-07-08 Paul Eggert Try to fix FreeBSD 9.1 porting problem (Bug#14812). === modified file 'configure.ac' --- configure.ac 2013-07-07 23:22:43 +0000 +++ configure.ac 2013-07-08 13:26:13 +0000 @@ -2041,7 +2041,7 @@ fi HAVE_IMAGEMAGICK=no -if test "${HAVE_X11}" = "yes"; then +if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then if test "${with_imagemagick}" != "no"; then ## 6.2.8 is the earliest version known to work, but earlier versions ## might work - let us know if you find one. === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-07 23:22:43 +0000 +++ src/ChangeLog 2013-07-08 13:26:13 +0000 @@ -1,3 +1,8 @@ +2013-07-08 Magnus Henoch (tiny change). + + * image.c (imagemagick_load_image): Do not use MagickExportImagePixels + on NS even if it is present. Pixmap on NS is a void*. + 2013-07-07 Paul Eggert Port to Ubuntu 10 (Bug#14803). === modified file 'src/image.c' --- src/image.c 2013-07-06 02:40:50 +0000 +++ src/image.c 2013-07-08 13:26:13 +0000 @@ -8054,7 +8054,7 @@ init_color_table (); -#ifdef HAVE_MAGICKEXPORTIMAGEPIXELS +#if defined(HAVE_MAGICKEXPORTIMAGEPIXELS) && ! defined(HAVE_NS) if (imagemagick_render_type != 0) { /* Magicexportimage is normally faster than pixelpushing. This ------------------------------------------------------------ revno: 113325 [merge] committer: K. Handa branch nick: trunk timestamp: Mon 2013-07-08 20:57:12 +0900 message: automated/decoder-tests.el (decoder-tests-prefer-utf-8-read): Use with-coding-priority to avoid side-effect (Bug#14781). diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-07-05 14:06:14 +0000 +++ test/ChangeLog 2013-07-08 11:51:55 +0000 @@ -1,3 +1,8 @@ +2013-07-08 Kenichi Handa + + * automated/decoder-tests.el (decoder-tests-prefer-utf-8-read): + Use with-ccoding-priority to avoid side-effect (Bug#14781). + 2013-07-05 Michael Albinus * automated/file-notify-tests.el === modified file 'test/automated/decoder-tests.el' --- test/automated/decoder-tests.el 2013-06-28 14:39:08 +0000 +++ test/automated/decoder-tests.el 2013-07-08 11:51:42 +0000 @@ -213,10 +213,9 @@ ;; PREFER is non-nil, prefer that coding system before reading. (defun decoder-tests-prefer-utf-8-read (file detect prefer) - (if prefer - (prefer-coding-system prefer)) (with-temp-buffer - (insert-file-contents file) + (with-coding-priority (if prefer (list prefer)) + (insert-file-contents file)) (if (eq buffer-file-coding-system detect) nil (format "Invalid detection: %s" buffer-file-coding-system)))) ------------------------------------------------------------ revno: 113324 committer: Lars Magne Ingebrigtsen branch nick: trunk timestamp: Mon 2013-07-08 13:19:51 +0200 message: * net/shr.el (shr-map): Reinstate the `u' key binding It's been used a while. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-07 23:05:52 +0000 +++ lisp/ChangeLog 2013-07-08 11:19:51 +0000 @@ -1,3 +1,8 @@ +2013-07-08 Lars Magne Ingebrigtsen + + * net/shr.el (shr-map): Reinstate the `u' key binding, since it's + been used a while. + 2013-07-07 Juanma Barranquero * subr.el (read-quoted-char): Remove unused local variable `char'. === modified file 'lisp/net/shr.el' --- lisp/net/shr.el 2013-06-30 13:11:41 +0000 +++ lisp/net/shr.el 2013-07-08 11:19:51 +0000 @@ -145,6 +145,7 @@ (define-key map [follow-link] 'mouse-face) (define-key map "I" 'shr-insert-image) (define-key map "w" 'shr-copy-url) + (define-key map "u" 'shr-copy-url) (define-key map "v" 'shr-browse-url) (define-key map "o" 'shr-save-contents) (define-key map "\r" 'shr-browse-url) ------------------------------------------------------------ revno: 113323 committer: Glenn Morris branch nick: trunk timestamp: Mon 2013-07-08 06:17:45 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/Makefile.in' --- autogen/Makefile.in 2013-06-04 10:17:52 +0000 +++ autogen/Makefile.in 2013-07-08 10:17:45 +0000 @@ -59,7 +59,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=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 +# 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=binary-io --avoid=close --avoid=dup --avoid=fchdir --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 fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings memrchr mktime pipe2 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@ @@ -192,12 +192,13 @@ @BUILDING_FOR_WINDOWSNT_FALSE@ ftoastr.h dup2.c errno.in.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ euidaccess.c execinfo.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ execinfo.in.h at-func.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ faccessat.c fcntl.in.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ faccessat.c fcntl.c fcntl.in.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ fdatasync.c fdopendir.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ filemode.h fpending.c fpending.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ at-func.c fstatat.c fsync.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ getgroups.c getloadavg.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ getopt.c getopt.in.h getopt1.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ getdtablesize.c getgroups.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ getloadavg.c getopt.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ getopt.in.h getopt1.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ getopt_int.h gettimeofday.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ group-member.c ignore-value.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ intprops.h inttypes.in.h lstat.c \ @@ -239,10 +240,11 @@ $(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 \ - $(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/fpending.m4 \ - $(top_srcdir)/m4/fstatat.m4 $(top_srcdir)/m4/fsync.m4 \ + $(top_srcdir)/m4/faccessat.m4 $(top_srcdir)/m4/fcntl.m4 \ + $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdatasync.m4 \ + $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/filemode.m4 \ + $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fstatat.m4 \ + $(top_srcdir)/m4/fsync.m4 $(top_srcdir)/m4/getdtablesize.m4 \ $(top_srcdir)/m4/getgroups.m4 $(top_srcdir)/m4/getloadavg.m4 \ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettime.m4 \ $(top_srcdir)/m4/gettimeofday.m4 \ @@ -255,7 +257,8 @@ $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/memrchr.m4 \ $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \ $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/off_t.m4 \ - $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/pselect.m4 \ + $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/pipe2.m4 \ + $(top_srcdir)/m4/pselect.m4 \ $(top_srcdir)/m4/pthread_sigmask.m4 $(top_srcdir)/m4/putenv.m4 \ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/readlinkat.m4 \ $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/sha1.m4 \ @@ -291,10 +294,11 @@ 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 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 + dtotimespec.c filemode.c gettext.h gettime.c pipe2.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 = @BUILDING_FOR_WINDOWSNT_FALSE@am_libgnu_a_OBJECTS = \ @BUILDING_FOR_WINDOWSNT_FALSE@ allocator.$(OBJEXT) \ @@ -311,6 +315,7 @@ @BUILDING_FOR_WINDOWSNT_FALSE@ filemode.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_FALSE@ $(am__objects_1) \ @BUILDING_FOR_WINDOWSNT_FALSE@ gettime.$(OBJEXT) \ +@BUILDING_FOR_WINDOWSNT_FALSE@ pipe2.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_FALSE@ acl-errno-valid.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_FALSE@ file-has-acl.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_FALSE@ qcopy-acl.$(OBJEXT) \ @@ -346,13 +351,13 @@ @BUILDING_FOR_WINDOWSNT_TRUE@ u64.$(OBJEXT) utimens.$(OBJEXT) \ @BUILDING_FOR_WINDOWSNT_TRUE@ $(am__objects_1) am__EXTRA_libgnu_a_SOURCES_DIST = openat-proc.c ftoastr.c dup2.c \ - euidaccess.c execinfo.c at-func.c faccessat.c fdatasync.c \ - fdopendir.c fpending.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 acl_entries.c readlink.c readlinkat.c sig2str.c \ - stat.c strtoimax.c strtol.c strtoll.c strtoul.c strtoull.c \ - strtoumax.c symlink.c time_r.c unsetenv.c + euidaccess.c execinfo.c at-func.c faccessat.c fcntl.c \ + fdatasync.c fdopendir.c fpending.c fstatat.c fsync.c \ + getdtablesize.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 acl_entries.c readlink.c \ + readlinkat.c sig2str.c stat.c strtoimax.c strtol.c strtoll.c \ + strtoul.c strtoull.c strtoumax.c symlink.c time_r.c unsetenv.c libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -1237,13 +1242,14 @@ @BUILDING_FOR_WINDOWSNT_FALSE@ md5.c sha1.c sha256.c sha512.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ dtoastr.c dtotimespec.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ filemode.c $(am__append_10) \ -@BUILDING_FOR_WINDOWSNT_FALSE@ gettime.c acl-errno-valid.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ file-has-acl.c qcopy-acl.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ qset-acl.c stat-time.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ strftime.c timespec.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ timespec-add.c timespec-sub.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ u64.c unistd.c utimens.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ openat-die.c save-cwd.c +@BUILDING_FOR_WINDOWSNT_FALSE@ gettime.c pipe2.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ acl-errno-valid.c file-has-acl.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ qcopy-acl.c qset-acl.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ stat-time.c strftime.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ timespec.c timespec-add.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ timespec-sub.c u64.c unistd.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ utimens.c openat-die.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ save-cwd.c @BUILDING_FOR_WINDOWSNT_TRUE@libgnu_a_SOURCES = c-ctype.h c-ctype.c \ @BUILDING_FOR_WINDOWSNT_TRUE@ c-strcase.h c-strcasecmp.c \ @BUILDING_FOR_WINDOWSNT_TRUE@ c-strncasecmp.c close-stream.c \ @@ -1262,9 +1268,10 @@ @BUILDING_FOR_WINDOWSNT_FALSE@EXTRA_libgnu_a_SOURCES = openat-proc.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ ftoastr.c dup2.c euidaccess.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ execinfo.c at-func.c faccessat.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ fdatasync.c fdopendir.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ fcntl.c fdatasync.c fdopendir.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ fpending.c at-func.c fstatat.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ fsync.c getgroups.c getloadavg.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ fsync.c getdtablesize.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ getgroups.c getloadavg.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ getopt.c getopt1.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ gettimeofday.c group-member.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ lstat.c memrchr.c mktime.c \ @@ -1372,6 +1379,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/euidaccess.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/faccessat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.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@ @@ -1380,6 +1388,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstatat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftoastr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getgroups.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getloadavg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ @@ -1393,6 +1402,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-die.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openat-proc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe2.Po@am__quote@ @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@ === modified file 'autogen/aclocal.m4' --- autogen/aclocal.m4 2013-05-08 10:17:38 +0000 +++ autogen/aclocal.m4 2013-07-08 10:17:45 +0000 @@ -999,6 +999,7 @@ m4_include([m4/extensions.m4]) m4_include([m4/extern-inline.m4]) m4_include([m4/faccessat.m4]) +m4_include([m4/fcntl.m4]) m4_include([m4/fcntl_h.m4]) m4_include([m4/fdatasync.m4]) m4_include([m4/fdopendir.m4]) @@ -1006,6 +1007,7 @@ m4_include([m4/fpending.m4]) m4_include([m4/fstatat.m4]) m4_include([m4/fsync.m4]) +m4_include([m4/getdtablesize.m4]) m4_include([m4/getgroups.m4]) m4_include([m4/getloadavg.m4]) m4_include([m4/getopt.m4]) @@ -1027,6 +1029,7 @@ m4_include([m4/nocrash.m4]) m4_include([m4/off_t.m4]) m4_include([m4/pathmax.m4]) +m4_include([m4/pipe2.m4]) m4_include([m4/pselect.m4]) m4_include([m4/pthread_sigmask.m4]) m4_include([m4/putenv.m4]) === modified file 'autogen/config.in' --- autogen/config.in 2013-07-03 10:17:43 +0000 +++ autogen/config.in 2013-07-08 10:17:45 +0000 @@ -120,6 +120,9 @@ enabled. */ #undef ENABLE_CHECKING +/* Define this to 1 if F_DUPFD behavior does not match POSIX */ +#undef FCNTL_DUPFD_BUGGY + /* Letter to use in finding device name of first PTY, if PTYs are supported. */ #undef FIRST_PTY_LETTER @@ -206,6 +209,9 @@ startup, if using GTK. */ #undef G_SLICE_ALWAYS_MALLOC +/* Define to 1 if you have the `accept4' function. */ +#undef HAVE_ACCEPT4 + /* Define to 1 if you have the `access' function. */ #undef HAVE_ACCESS @@ -439,6 +445,9 @@ /* Define to 1 if you have the `facl' function. */ #undef HAVE_FACL +/* Define to 1 if you have the `fcntl' function. */ +#undef HAVE_FCNTL + /* Define to 1 if you have the `fdatasync' function. */ #undef HAVE_FDATASYNC @@ -487,6 +496,9 @@ /* Define to 1 if you have the `getdelim' function. */ #undef HAVE_GETDELIM +/* Define to 1 if you have the `getdtablesize' function. */ +#undef HAVE_GETDTABLESIZE + /* Define to 1 if you have the `getgrent' function. */ #undef HAVE_GETGRENT @@ -738,6 +750,9 @@ systems that support xmenu.c. */ #undef HAVE_MENUS +/* Define to 1 if you have the `mkostemp' function. */ +#undef HAVE_MKOSTEMP + /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP @@ -769,6 +784,9 @@ /* Define to 1 if personality LINUX32 can be set. */ #undef HAVE_PERSONALITY_LINUX32 +/* Define to 1 if you have the `pipe2' function. */ +#undef HAVE_PIPE2 + /* Define to 1 if you have the png library (-lpng). */ #undef HAVE_PNG === modified file 'autogen/configure' --- autogen/configure 2013-07-06 01:39:21 +0000 +++ autogen/configure 2013-07-08 10:17:45 +0000 @@ -614,8 +614,6 @@ gltests_WITNESS gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE -gl_GNULIB_ENABLED_verify_FALSE -gl_GNULIB_ENABLED_verify_TRUE gl_GNULIB_ENABLED_strtoull_FALSE gl_GNULIB_ENABLED_strtoull_TRUE gl_GNULIB_ENABLED_strtoll_FALSE @@ -634,6 +632,8 @@ gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE gl_GNULIB_ENABLED_getgroups_FALSE gl_GNULIB_ENABLED_getgroups_TRUE +gl_GNULIB_ENABLED_getdtablesize_FALSE +gl_GNULIB_ENABLED_getdtablesize_TRUE gl_GNULIB_ENABLED_euidaccess_FALSE gl_GNULIB_ENABLED_euidaccess_TRUE gl_GNULIB_ENABLED_dosname_FALSE @@ -3373,6 +3373,7 @@ as_fn_append ac_header_list " dirent.h" as_fn_append ac_header_list " execinfo.h" as_fn_append ac_func_list " faccessat" +as_fn_append ac_func_list " fcntl" as_fn_append ac_func_list " fdopendir" as_fn_append ac_header_list " stdio_ext.h" as_fn_append ac_func_list " __fpending" @@ -3387,6 +3388,7 @@ as_fn_append ac_header_list " stdint.h" as_fn_append ac_header_list " inttypes.h" as_fn_append ac_func_list " lstat" +as_fn_append ac_func_list " pipe2" as_fn_append ac_header_list " sys/select.h" as_fn_append ac_func_list " pselect" as_fn_append ac_func_list " pthread_sigmask" @@ -3402,6 +3404,7 @@ as_fn_append ac_func_list " futimens" as_fn_append ac_func_list " utimensat" as_fn_append ac_func_list " lutimes" +as_fn_append ac_func_list " getdtablesize" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -7247,6 +7250,7 @@ # Code from module extern-inline: # Code from module faccessat: + # Code from module fcntl: # Code from module fcntl-h: # Code from module fdatasync: # Code from module fdopendir: @@ -7254,6 +7258,7 @@ # Code from module fpending: # Code from module fstatat: # Code from module fsync: + # Code from module getdtablesize: # Code from module getgroups: # Code from module getloadavg: # Code from module getopt-gnu: @@ -7276,6 +7281,7 @@ # Code from module nocrash: # Code from module openat-h: # Code from module pathmax: + # Code from module pipe2: # Code from module pselect: # Code from module pthread_sigmask: # Code from module putenv: @@ -14655,14 +14661,14 @@ -for ac_func in gethostname \ +for ac_func in accept4 gethostname \ getrusage get_current_dir_name \ lrand48 \ select getpagesize setlocale \ getrlimit setrlimit shutdown getaddrinfo \ strsignal setitimer \ sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ -gai_strerror mkstemp getline getdelim sync \ +gai_strerror mkostemp mkstemp getline getdelim sync \ difftime posix_memalign \ getpwent endpwent getgrent endgrent \ touchlock \ @@ -16433,7 +16439,7 @@ $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h if test "x$ac_cv_func_posix_openpt" = xyes; then - $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h + $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY)" >>confdefs.h $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h @@ -18402,6 +18408,8 @@ REPLACE_OPENAT=0; + + ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = x""yes; then : @@ -20692,6 +20700,8 @@ _ACEOF + + GNULIB_PSELECT=0; GNULIB_SELECT=0; HAVE_PSELECT=1; @@ -21891,6 +21901,8 @@ + + if false; then GL_COND_LIBTOOL_TRUE= GL_COND_LIBTOOL_FALSE='#' @@ -22441,6 +22453,169 @@ + if test $ac_cv_func_fcntl = no; then + + + + if test $ac_cv_func_fcntl = no; then + HAVE_FCNTL=0 + else + REPLACE_FCNTL=1 + fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5 +$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } +if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + # Guess that it works on glibc systems + case $host_os in #(( + *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; + *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; + esac +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include + +int +main () +{ +int result = 0; + if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; + if (errno != EINVAL) result |= 2; + return result; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_fcntl_f_dupfd_works=yes +else + gl_cv_func_fcntl_f_dupfd_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 +$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } + case $gl_cv_func_fcntl_f_dupfd_works in + *yes) ;; + *) + + + if test $ac_cv_func_fcntl = no; then + HAVE_FCNTL=0 + else + REPLACE_FCNTL=1 + fi + + +$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 +$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } +if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifndef F_DUPFD_CLOEXEC +choke me +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef __linux__ +/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace + it to support the semantics on older kernels that failed with EINVAL. */ +choke me +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_fcntl_f_dupfd_cloexec=yes +else + gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + gl_cv_func_fcntl_f_dupfd_cloexec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 +$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } + if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then + + + + if test $ac_cv_func_fcntl = no; then + HAVE_FCNTL=0 + else + REPLACE_FCNTL=1 + fi + + fi + fi + + + if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" + + fi + + + + + + GNULIB_FCNTL=1 + + + + + + + + + + @@ -24150,6 +24325,27 @@ + + if test $ac_cv_func_pipe2 != yes; then + HAVE_PIPE2=0 + fi + + + + + + + GNULIB_PIPE2=1 + + + + + + + + + + if test $ac_cv_func_pselect = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5 $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; } @@ -25637,7 +25833,8 @@ /* Test _Alignas only on platforms where gnulib can help. */ #if \ - (__GNUC__ || __IBMC__ || __IBMCPP__ \ + ((defined __cplusplus && 201103 <= __cplusplus) \ + || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) struct alignas_test { char c; char alignas (8) alignas_8; }; char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 @@ -27260,6 +27457,7 @@ gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false gl_gnulib_enabled_dosname=false gl_gnulib_enabled_euidaccess=false + gl_gnulib_enabled_getdtablesize=false gl_gnulib_enabled_getgroups=false gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false @@ -27269,7 +27467,6 @@ gl_gnulib_enabled_stat=false gl_gnulib_enabled_strtoll=false gl_gnulib_enabled_strtoull=false - gl_gnulib_enabled_verify=false gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b () { @@ -27549,6 +27746,43 @@ fi fi } + func_gl_gnulib_m4code_getdtablesize () + { + if ! $gl_gnulib_enabled_getdtablesize; then + + + + if test $ac_cv_func_getdtablesize != yes; then + HAVE_GETDTABLESIZE=0 + fi + + if test $HAVE_GETDTABLESIZE = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" + + : + fi + + + + + + GNULIB_GETDTABLESIZE=1 + + + + + + gl_gnulib_enabled_getdtablesize=true + fi + } func_gl_gnulib_m4code_getgroups () { if ! $gl_gnulib_enabled_getgroups; then @@ -27971,9 +28205,6 @@ if test $REPLACE_STAT = 1; then func_gl_gnulib_m4code_pathmax fi - if test $REPLACE_STAT = 1; then - func_gl_gnulib_m4code_verify - fi fi } func_gl_gnulib_m4code_strtoll () @@ -28080,12 +28311,6 @@ gl_gnulib_enabled_strtoull=true fi } - func_gl_gnulib_m4code_verify () - { - if ! $gl_gnulib_enabled_verify; then - gl_gnulib_enabled_verify=true - fi - } func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec () { if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then @@ -28104,6 +28329,9 @@ if test $HAVE_FACCESSAT = 0; then func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 fi + if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then + func_gl_gnulib_m4code_getdtablesize + fi if test $HAVE_FDOPENDIR = 0; then func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b fi @@ -28140,15 +28368,9 @@ if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then func_gl_gnulib_m4code_strtoll fi - if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then - func_gl_gnulib_m4code_verify - fi if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then func_gl_gnulib_m4code_strtoull fi - if test $ac_cv_func_strtoumax = no; then - func_gl_gnulib_m4code_verify - fi if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE= @@ -28174,6 +28396,14 @@ gl_GNULIB_ENABLED_euidaccess_FALSE= fi + if $gl_gnulib_enabled_getdtablesize; then + gl_GNULIB_ENABLED_getdtablesize_TRUE= + gl_GNULIB_ENABLED_getdtablesize_FALSE='#' +else + gl_GNULIB_ENABLED_getdtablesize_TRUE='#' + gl_GNULIB_ENABLED_getdtablesize_FALSE= +fi + if $gl_gnulib_enabled_getgroups; then gl_GNULIB_ENABLED_getgroups_TRUE= gl_GNULIB_ENABLED_getgroups_FALSE='#' @@ -28246,14 +28476,6 @@ gl_GNULIB_ENABLED_strtoull_FALSE= fi - if $gl_gnulib_enabled_verify; then - gl_GNULIB_ENABLED_verify_TRUE= - gl_GNULIB_ENABLED_verify_FALSE='#' -else - gl_GNULIB_ENABLED_verify_TRUE='#' - gl_GNULIB_ENABLED_verify_FALSE= -fi - if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE= gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#' @@ -28715,6 +28937,10 @@ as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${gl_GNULIB_ENABLED_getdtablesize_TRUE}" && test -z "${gl_GNULIB_ENABLED_getdtablesize_FALSE}"; then + as_fn_error "conditional \"gl_GNULIB_ENABLED_getdtablesize\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -28751,10 +28977,6 @@ as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then - as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 ------------------------------------------------------------ revno: 113322 fixes bug: http://debbugs.gnu.org/14812 committer: Paul Eggert branch nick: trunk timestamp: Sun 2013-07-07 23:15:38 -0700 message: Try to fix FreeBSD 9.1 porting problem. This incorporates the following merge from gnulib: 2013-07-07 stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11 diff: === modified file 'ChangeLog' --- ChangeLog 2013-07-08 03:20:35 +0000 +++ ChangeLog 2013-07-08 06:15:38 +0000 @@ -1,3 +1,9 @@ +2013-07-08 Paul Eggert + + Try to fix FreeBSD 9.1 porting problem (Bug#14812). + This incorporates the following merge from gnulib: + 2013-07-07 stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11 + 2013-07-07 Paul Eggert Port to Ubuntu 10 (Bug#14803). === modified file 'lib/stdalign.in.h' --- lib/stdalign.in.h 2013-01-01 09:11:05 +0000 +++ lib/stdalign.in.h 2013-07-08 06:15:38 +0000 @@ -41,13 +41,28 @@ are 4 unless the option '-malign-double' is used. The result cannot be used as a value for an 'enum' constant, if you - want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */ + want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. + + Include for offsetof. */ #include -#if defined __cplusplus + +/* FreeBSD 9.1 , included by and lots of other + standard headers, defines conflicting implementations of _Alignas + and _Alignof that are no better than ours; override them. */ +#undef _Alignas +#undef _Alignof + +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +# ifdef __cplusplus +# if 201103 <= __cplusplus +# define _Alignof(type) alignof (type) +# else template struct __alignof_helper { char __a; __t __b; }; -# define _Alignof(type) offsetof (__alignof_helper, __b) -#else -# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +# define _Alignof(type) offsetof (__alignof_helper, __b) +# endif +# else +# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b) +# endif #endif #define alignof _Alignof #define __alignof_is_defined 1 @@ -77,12 +92,16 @@ */ -#if __GNUC__ || __IBMC__ || __IBMCPP__ || 0x5110 <= __SUNPRO_C -# define _Alignas(a) __attribute__ ((__aligned__ (a))) -#elif 1300 <= _MSC_VER -# define _Alignas(a) __declspec (align (a)) +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 +# if defined __cplusplus && 201103 <= __cplusplus +# define _Alignas(a) alignas (a) +# elif __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC || 0x5110 <= __SUNPRO_C +# define _Alignas(a) __attribute__ ((__aligned__ (a))) +# elif 1300 <= _MSC_VER +# define _Alignas(a) __declspec (align (a)) +# endif #endif -#ifdef _Alignas +#if defined _Alignas || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__) # define alignas _Alignas # define __alignas_is_defined 1 #endif === modified file 'lib/verify.h' --- lib/verify.h 2013-06-09 15:59:30 +0000 +++ lib/verify.h 2013-07-08 06:15:38 +0000 @@ -18,7 +18,7 @@ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef _GL_VERIFY_H -# define _GL_VERIFY_H +#define _GL_VERIFY_H /* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. @@ -31,16 +31,24 @@ Use this only with GCC. If we were willing to slow 'configure' down we could also use it with other compilers, but since this affects only the quality of diagnostics, why bother? */ -# if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \ - && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \ - && !defined __cplusplus) -# define _GL_HAVE__STATIC_ASSERT 1 -# endif +#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \ + && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \ + && !defined __cplusplus) +# define _GL_HAVE__STATIC_ASSERT 1 +#endif /* The condition (99 < __GNUC__) is temporary, until we know about the first G++ release that supports static_assert. */ -# if (99 < __GNUC__) && defined __cplusplus -# define _GL_HAVE_STATIC_ASSERT 1 -# endif +#if (99 < __GNUC__) && defined __cplusplus +# define _GL_HAVE_STATIC_ASSERT 1 +#endif + +/* FreeBSD 9.1 , included by and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE_STATIC_ASSERT +# include +# undef _Static_assert +#endif /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike @@ -143,50 +151,50 @@ Use a template type to work around the problem. */ /* Concatenate two preprocessor tokens. */ -# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) -# define _GL_CONCAT0(x, y) x##y +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y /* _GL_COUNTER is an integer, preferably one that changes each time we use it. Use __COUNTER__ if it works, falling back on __LINE__ otherwise. __LINE__ isn't perfect, but it's better than a constant. */ -# if defined __COUNTER__ && __COUNTER__ != __COUNTER__ -# define _GL_COUNTER __COUNTER__ -# else -# define _GL_COUNTER __LINE__ -# endif +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif /* Generate a symbol with the given prefix, making it unique if possible. */ -# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) /* Verify requirement R at compile-time, as an integer constant expression that returns 1. If R is false, fail at compile-time, preferably with a diagnostic that includes the string-literal DIAGNOSTIC. */ -# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ - (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) +#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) -# ifdef __cplusplus -# if !GNULIB_defined_struct__gl_verify_type +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_verify_type template struct _gl_verify_type { unsigned int _gl_verify_error_if_negative: w; }; -# define GNULIB_defined_struct__gl_verify_type 1 -# endif -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ +# define GNULIB_defined_struct__gl_verify_type 1 +# endif +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ _gl_verify_type<(R) ? 1 : -1> -# elif defined _GL_HAVE__STATIC_ASSERT -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - struct { \ - _Static_assert (R, DIAGNOSTIC); \ - int _gl_dummy; \ - } -# else -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } -# endif +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } +#endif /* Verify requirement R at compile-time, as a declaration without a trailing ';'. If R is false, fail at compile-time, preferably @@ -195,23 +203,23 @@ Unfortunately, unlike C11, this implementation must appear as an ordinary declaration, and cannot appear inside struct { ... }. */ -# ifdef _GL_HAVE__STATIC_ASSERT -# define _GL_VERIFY _Static_assert -# else -# define _GL_VERIFY(R, DIAGNOSTIC) \ - extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ - [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] -# endif +#ifdef _GL_HAVE__STATIC_ASSERT +# define _GL_VERIFY _Static_assert +#else +# define _GL_VERIFY(R, DIAGNOSTIC) \ + extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ + [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] +#endif /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ -# ifdef _GL_STATIC_ASSERT_H -# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert -# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) -# endif -# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert -# define static_assert _Static_assert /* C11 requires this #define. */ -# endif -# endif +#ifdef _GL_STATIC_ASSERT_H +# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert +# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) +# endif +# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert +# define static_assert _Static_assert /* C11 requires this #define. */ +# endif +#endif /* @assert.h omit start@ */ @@ -229,18 +237,18 @@ verify_true is obsolescent; please use verify_expr instead. */ -# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") +#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") /* Verify requirement R at compile-time. Return the value of the expression E. */ -# define verify_expr(R, E) \ - (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) +#define verify_expr(R, E) \ + (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ -# define verify(R) _GL_VERIFY (R, "verify (" #R ")") +#define verify(R) _GL_VERIFY (R, "verify (" #R ")") /* @assert.h omit end@ */ === modified file 'm4/stdalign.m4' --- m4/stdalign.m4 2013-03-30 17:37:57 +0000 +++ m4/stdalign.m4 2013-07-08 06:15:38 +0000 @@ -31,7 +31,8 @@ /* Test _Alignas only on platforms where gnulib can help. */ #if \ - (__GNUC__ || __IBMC__ || __IBMCPP__ \ + ((defined __cplusplus && 201103 <= __cplusplus) \ + || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) struct alignas_test { char c; char alignas (8) alignas_8; }; char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.