Now on revision 112150. ------------------------------------------------------------ revno: 112150 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-03-26 22:13:31 -0700 message: * configure.ac (HAVE_XKBGETKEYBOARD): Remove; subsumed by HAVE_XKB. All uses changed. diff: === modified file 'ChangeLog' --- ChangeLog 2013-03-26 22:08:58 +0000 +++ ChangeLog 2013-03-27 05:13:31 +0000 @@ -1,3 +1,8 @@ +2013-03-27 Paul Eggert + + * configure.ac (HAVE_XKBGETKEYBOARD): Remove. + Subsumed by HAVE_XKB. All uses changed. + 2013-03-27 Aidan Gauland #include #endif @@ -5605,7 +5605,9 @@ present and mapped to the usual X keysyms. */) (Lisp_Object frame) { -#ifdef HAVE_XKBGETKEYBOARD +#ifndef HAVE_XKB + return Qlambda; +#else XkbDescPtr kb; struct frame *f = check_x_frame (frame); Display *dpy = FRAME_X_DISPLAY (f); @@ -5683,9 +5685,7 @@ } unblock_input (); return have_keys; -#else /* not HAVE_XKBGETKEYBOARD */ - return Qlambda; -#endif /* not HAVE_XKBGETKEYBOARD */ +#endif } ------------------------------------------------------------ revno: 112149 author: Andrew Cohen committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2013-03-27 01:17:08 +0000 message: lisp/gnus/nnir.el: Fix byte-compile warning. nnoo-define-skeleton should come after other deffoos diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-03-26 02:26:53 +0000 +++ lisp/gnus/ChangeLog 2013-03-27 01:17:08 +0000 @@ -1,3 +1,8 @@ +2013-03-27 Andrew Cohen + + * nnir.el: Fix byte-compile warning. nnoo-define-skeleton should come + after other deffoos. + 2013-03-26 Andrew Cohen * nnir.el: Major rewrite. Cleaner separation between searches and group === modified file 'lisp/gnus/nnir.el' --- lisp/gnus/nnir.el 2013-03-25 22:40:58 +0000 +++ lisp/gnus/nnir.el 2013-03-27 01:17:08 +0000 @@ -886,7 +886,7 @@ ;; (car (assoc '(nnir "nnir-ephemeral" (nnir-address "nnir")) ;; gnus-opened-servers)))) -(nnoo-define-skeleton nnir) + (defmacro nnir-add-result (dirnam artno score prefix server artlist) @@ -1880,6 +1880,11 @@ (nnir-request-update-info pgroup (gnus-get-info pgroup))) t)) +(deffoo nnir-request-close () + t) + + +(nnoo-define-skeleton nnir) ;; The end. (provide 'nnir) ------------------------------------------------------------ revno: 112148 committer: Aidan Gauland branch nick: trunk timestamp: Wed 2013-03-27 11:08:58 +1300 message: Added eshell-tramp module * lisp/eshell/em-unix.el: Moved su and sudo to... * lisp/eshell/em-tramp.el: ...Eshell tramp module * doc/misc/eshell.texi: Updated manual to reflect changes. External su and sudo commands are now the default; the internal, TRAMP-using variants can still be used by enabling the eshell-tramp module. diff: === modified file 'ChangeLog' --- ChangeLog 2013-03-25 17:58:35 +0000 +++ ChangeLog 2013-03-26 22:08:58 +0000 @@ -1,3 +1,13 @@ +2013-03-27 Aidan Gauland * configure.ac (HAVE_XKB): Define if Xkb is present. === modified file 'doc/misc/eshell.texi' --- doc/misc/eshell.texi 2013-02-22 17:13:05 +0000 +++ doc/misc/eshell.texi 2013-03-26 22:08:58 +0000 @@ -460,8 +460,9 @@ @cmindex su @itemx sudo @cmindex sudo -Uses TRAMP's @command{su} or @command{sudo} method to run a command via -@command{su} or @command{sudo}. +Uses TRAMP's @command{su} or @command{sudo} method @pxref{Inline methods, , , tramp} +to run a command via @command{su} or @command{sudo}. These commands +are in the eshell-tramp module, which is disabled by default. @end table === added file 'lisp/eshell/em-tramp.el' --- lisp/eshell/em-tramp.el 1970-01-01 00:00:00 +0000 +++ lisp/eshell/em-tramp.el 2013-03-26 22:08:58 +0000 @@ -0,0 +1,143 @@ +;;; em-tramp.el --- Eshell features that require TRAMP + +;; Copyright (C) 1999-2013 Free Software Foundation, Inc. + +;; Author: Aidan Gauland + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; Eshell features that require TRAMP. + +;;; Code: + +(eval-when-compile + (require 'esh-mode) + (require 'eshell) + (require 'tramp)) + +(require 'esh-util) + +;;;###autoload +(progn + (defgroup eshell-tramp nil + "This module defines commands that use TRAMP in a way that is + not transparent to the user. So far, this includes only the + built-in su and sudo commands, which are not compatible with + the full, external su and sudo commands, and require the user + to understand how to use the TRAMP sudo method." + :tag "TRAMP Eshell features" + :group 'eshell-module)) + +(defun eshell-tramp-initialize () + "Initialize the TRAMP-using commands code." + (when (eshell-using-module 'eshell-cmpl) + (add-hook 'pcomplete-try-first-hook + 'eshell-complete-host-reference nil t)) + (make-local-variable 'eshell-complex-commands) + (setq eshell-complex-commands + (append '("su" "sudo") + eshell-complex-commands))) + +(defun eshell/su (&rest args) + "Alias \"su\" to call TRAMP. + +Uses the system su through TRAMP's su method." + (setq args (eshell-stringify-list (eshell-flatten-list args))) + (let ((orig-args (copy-tree args))) + (eshell-eval-using-options + "su" args + '((?h "help" nil nil "show this usage screen") + (?l "login" nil login "provide a login environment") + (? nil nil login "provide a login environment") + :usage "[- | -l | --login] [USER] +Become another USER during a login session.") + (throw 'eshell-replace-command + (let ((user "root") + (host (or (file-remote-p default-directory 'host) + "localhost")) + (dir (or (file-remote-p default-directory 'localname) + (expand-file-name default-directory))) + (prefix (file-remote-p default-directory))) + (dolist (arg args) + (if (string-equal arg "-") (setq login t) (setq user arg))) + ;; `eshell-eval-using-options' does not handle "-". + (if (member "-" orig-args) (setq login t)) + (if login (setq dir "~/")) + (if (and prefix + (or + (not (string-equal + "su" (file-remote-p default-directory 'method))) + (not (string-equal + user (file-remote-p default-directory 'user))))) + (eshell-parse-command + "cd" (list (format "%s|su:%s@%s:%s" + (substring prefix 0 -1) user host dir))) + (eshell-parse-command + "cd" (list (format "/su:%s@%s:%s" user host dir))))))))) + +(put 'eshell/su 'eshell-no-numeric-conversions t) + +(defun eshell/sudo (&rest args) + "Alias \"sudo\" to call Tramp. + +Uses the system sudo through TRAMP's sudo method." + (setq args (eshell-stringify-list (eshell-flatten-list args))) + (let ((orig-args (copy-tree args))) + (eshell-eval-using-options + "sudo" args + '((?h "help" nil nil "show this usage screen") + (?u "user" t user "execute a command as another USER") + :show-usage + :usage "[(-u | --user) USER] COMMAND +Execute a COMMAND as the superuser or another USER.") + (throw 'eshell-external + (let ((user (or user "root")) + (host (or (file-remote-p default-directory 'host) + "localhost")) + (dir (or (file-remote-p default-directory 'localname) + (expand-file-name default-directory))) + (prefix (file-remote-p default-directory))) + ;; `eshell-eval-using-options' reads options of COMMAND. + (while (and (stringp (car orig-args)) + (member (car orig-args) '("-u" "--user"))) + (setq orig-args (cddr orig-args))) + (let ((default-directory + (if (and prefix + (or + (not + (string-equal + "sudo" + (file-remote-p default-directory 'method))) + (not + (string-equal + user + (file-remote-p default-directory 'user))))) + (format "%s|sudo:%s@%s:%s" + (substring prefix 0 -1) user host dir) + (format "/sudo:%s@%s:%s" user host dir)))) + (eshell-named-command (car orig-args) (cdr orig-args)))))))) + +(put 'eshell/sudo 'eshell-no-numeric-conversions t) + +(provide 'em-tramp) + +;; Local Variables: +;; generated-autoload-file: "esh-groups.el" +;; End: + +;;; em-tramp.el ends here === modified file 'lisp/eshell/em-unix.el' --- lisp/eshell/em-unix.el 2013-02-19 03:29:28 +0000 +++ lisp/eshell/em-unix.el 2013-03-26 22:08:58 +0000 @@ -148,7 +148,7 @@ (make-local-variable 'eshell-complex-commands) (setq eshell-complex-commands (append '("grep" "egrep" "fgrep" "agrep" "glimpse" "locate" - "cat" "time" "cp" "mv" "make" "du" "diff" "su" "sudo") + "cat" "time" "cp" "mv" "make" "du" "diff") eshell-complex-commands))) (defalias 'eshell/date 'current-time-string) @@ -1038,85 +1038,6 @@ (put 'eshell/occur 'eshell-no-numeric-conversions t) -(defun eshell/su (&rest args) - "Alias \"su\" to call Tramp." - (require 'tramp) - (setq args (eshell-stringify-list (eshell-flatten-list args))) - (let ((orig-args (copy-tree args))) - (eshell-eval-using-options - "su" args - '((?h "help" nil nil "show this usage screen") - (?l "login" nil login "provide a login environment") - (? nil nil login "provide a login environment") - :usage "[- | -l | --login] [USER] -Become another USER during a login session.") - (throw 'eshell-replace-command - (let ((user "root") - (host (or (file-remote-p default-directory 'host) - "localhost")) - (dir (or (file-remote-p default-directory 'localname) - (expand-file-name default-directory))) - (prefix (file-remote-p default-directory))) - (dolist (arg args) - (if (string-equal arg "-") (setq login t) (setq user arg))) - ;; `eshell-eval-using-options' does not handle "-". - (if (member "-" orig-args) (setq login t)) - (if login (setq dir "~/")) - (if (and prefix - (or - (not (string-equal - "su" (file-remote-p default-directory 'method))) - (not (string-equal - user (file-remote-p default-directory 'user))))) - (eshell-parse-command - "cd" (list (format "%s|su:%s@%s:%s" - (substring prefix 0 -1) user host dir))) - (eshell-parse-command - "cd" (list (format "/su:%s@%s:%s" user host dir))))))))) - -(put 'eshell/su 'eshell-no-numeric-conversions t) - -(defun eshell/sudo (&rest args) - "Alias \"sudo\" to call Tramp." - (require 'tramp) - (setq args (eshell-stringify-list (eshell-flatten-list args))) - (let ((orig-args (copy-tree args))) - (eshell-eval-using-options - "sudo" args - '((?h "help" nil nil "show this usage screen") - (?u "user" t user "execute a command as another USER") - :show-usage - :usage "[(-u | --user) USER] COMMAND -Execute a COMMAND as the superuser or another USER.") - (throw 'eshell-external - (let ((user (or user "root")) - (host (or (file-remote-p default-directory 'host) - "localhost")) - (dir (or (file-remote-p default-directory 'localname) - (expand-file-name default-directory))) - (prefix (file-remote-p default-directory))) - ;; `eshell-eval-using-options' reads options of COMMAND. - (while (and (stringp (car orig-args)) - (member (car orig-args) '("-u" "--user"))) - (setq orig-args (cddr orig-args))) - (let ((default-directory - (if (and prefix - (or - (not - (string-equal - "sudo" - (file-remote-p default-directory 'method))) - (not - (string-equal - user - (file-remote-p default-directory 'user))))) - (format "%s|sudo:%s@%s:%s" - (substring prefix 0 -1) user host dir) - (format "/sudo:%s@%s:%s" user host dir)))) - (eshell-named-command (car orig-args) (cdr orig-args)))))))) - -(put 'eshell/sudo 'eshell-no-numeric-conversions t) - (provide 'em-unix) ;; Local Variables: ------------------------------------------------------------ revno: 112147 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-03-26 23:22:39 +0200 message: Fix MinGW64 compilation of w32.c. src/w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-26 15:34:45 +0000 +++ src/ChangeLog 2013-03-26 21:22:39 +0000 @@ -1,3 +1,7 @@ +2013-03-26 Eli Zaretskii + + * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64. + 2013-03-26 Jan Djärv * gtkutil.c (style_changed_cb): Check if frame is live and an === modified file 'src/w32.c' --- src/w32.c 2013-03-26 14:04:07 +0000 +++ src/w32.c 2013-03-26 21:22:39 +0000 @@ -130,11 +130,11 @@ #define SDDL_REVISION_1 1 #endif /* SDDL_REVISION_1 */ -#ifndef MAXIMUM_REPARSE_DATA_BUFFER_SIZE -/* MSVC doesn't provide the definition of REPARSE_DATA_BUFFER and the - associated macros, except on ntifs.h, which cannot be included - because it triggers conflicts with other Windows API headers. So - we define it here by hand. */ +#if defined(_MSC_VER) || defined(_W64) +/* MSVC and MinGW64 don't provide the definition of + REPARSE_DATA_BUFFER and the associated macros, except on ntifs.h, + which cannot be included because it triggers conflicts with other + Windows API headers. So we define it here by hand. */ typedef struct _REPARSE_DATA_BUFFER { ULONG ReparseTag; ------------------------------------------------------------ revno: 112146 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-03-26 22:30:43 +0200 message: Fix _setjmp calls for MinGW64. nt/config.nt: Don't undefine HAVE__SETJMP here. nt/inc/ms-w32.h (HAVE__SETJMP) [_W64]: Undefine for MinGW64 here.. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-03-26 17:32:52 +0000 +++ nt/ChangeLog 2013-03-26 20:30:43 +0000 @@ -1,9 +1,7 @@ 2013-03-26 Eli Zaretskii * inc/ms-w32.h (USE_NO_MINGW_SETJMP_TWO_ARGS): Don't define. - - * config.nt (HAVE__SETJMP) [!_W64]: Don't define for MinGW64, as - its _setjmp accepts 2 arguments. + (HAVE__SETJMP) [_W64]: Undefine for MinGW64. * addsection.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Do not define for MinGW64. === modified file 'nt/config.nt' --- nt/config.nt 2013-03-26 17:32:52 +0000 +++ nt/config.nt 2013-03-26 20:30:43 +0000 @@ -1143,12 +1143,8 @@ /* Define to 1 if you have the `_ftime' function. */ #undef HAVE__FTIME -/* Define to 1 if _setjmp and _longjmp work. MinGW64 uses a - 2-argument _setjmp, and setjmp is a macro defined to supply the 2nd - arg correctly, so don't use _setjmp directly in that case. */ -#ifndef _W64 +/* Define to 1 if _setjmp and _longjmp work. */ #define HAVE__SETJMP 1 -#endif /* Define to 1 if you have the `__builtin_unwind_init' function. */ #undef HAVE___BUILTIN_UNWIND_INIT === modified file 'nt/inc/ms-w32.h' --- nt/inc/ms-w32.h 2013-03-26 17:32:52 +0000 +++ nt/inc/ms-w32.h 2013-03-26 20:30:43 +0000 @@ -161,6 +161,10 @@ /* Make sure 'struct timespec' and 'struct timezone' are defined. */ #include #include +/* MinGW64 uses a 2-argument _setjmp, and setjmp is a macro defined to + supply the 2nd arg correctly, so don't use _setjmp directly in that + case. */ +#undef HAVE__SETJMP #endif #ifdef _MSC_VER ------------------------------------------------------------ revno: 112145 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-03-26 19:32:52 +0200 message: Fix problem with _setjmp in MinGW64-compiled Emacs. nt/inc/ms-w32.h (USE_NO_MINGW_SETJMP_TWO_ARGS): Don't define. nt/config.nt (HAVE__SETJMP) [!_W64]: Don't define for MinGW64, as its _setjmp accepts 2 arguments. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-03-26 14:26:24 +0000 +++ nt/ChangeLog 2013-03-26 17:32:52 +0000 @@ -1,5 +1,10 @@ 2013-03-26 Eli Zaretskii + * inc/ms-w32.h (USE_NO_MINGW_SETJMP_TWO_ARGS): Don't define. + + * config.nt (HAVE__SETJMP) [!_W64]: Don't define for MinGW64, as + its _setjmp accepts 2 arguments. + * addsection.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Do not define for MinGW64. === modified file 'nt/config.nt' --- nt/config.nt 2013-03-15 17:12:03 +0000 +++ nt/config.nt 2013-03-26 17:32:52 +0000 @@ -1143,8 +1143,12 @@ /* Define to 1 if you have the `_ftime' function. */ #undef HAVE__FTIME -/* Define to 1 if _setjmp and _longjmp work. */ +/* Define to 1 if _setjmp and _longjmp work. MinGW64 uses a + 2-argument _setjmp, and setjmp is a macro defined to supply the 2nd + arg correctly, so don't use _setjmp directly in that case. */ +#ifndef _W64 #define HAVE__SETJMP 1 +#endif /* Define to 1 if you have the `__builtin_unwind_init' function. */ #undef HAVE___BUILTIN_UNWIND_INIT === modified file 'nt/inc/ms-w32.h' --- nt/inc/ms-w32.h 2013-03-26 13:45:01 +0000 +++ nt/inc/ms-w32.h 2013-03-26 17:32:52 +0000 @@ -158,7 +158,6 @@ #ifdef _W64 /* MinGW64 specific stuff. */ -#define USE_NO_MINGW_SETJMP_TWO_ARGS 1 /* Make sure 'struct timespec' and 'struct timezone' are defined. */ #include #include ------------------------------------------------------------ revno: 112144 fixes bug: http://debbugs.gnu.org/14038 committer: Jan D. branch nick: trunk timestamp: Tue 2013-03-26 16:34:45 +0100 message: * gtkutil.c (style_changed_cb): Check if frame is live and an X frame. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-26 14:04:07 +0000 +++ src/ChangeLog 2013-03-26 15:34:45 +0000 @@ -1,3 +1,8 @@ +2013-03-26 Jan Djärv + + * gtkutil.c (style_changed_cb): Check if frame is live and an + X frame (Bug#14038). + 2013-03-26 Eli Zaretskii * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]: === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-03-24 12:59:45 +0000 +++ src/gtkutil.c 2013-03-26 15:34:45 +0000 @@ -1094,7 +1094,9 @@ FOR_EACH_FRAME (rest, frame) { FRAME_PTR f = XFRAME (frame); - if (FRAME_X_DISPLAY (f) == dpy) + if (FRAME_LIVE_P (f) + && FRAME_X_P (f) + && FRAME_X_DISPLAY (f) == dpy) { x_set_scroll_bar_default_width (f); xg_frame_set_char_size (f, FRAME_COLS (f), FRAME_LINES (f)); ------------------------------------------------------------ revno: 112143 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-03-26 16:26:24 +0200 message: More MinGW64 related fixes. nt/addsection.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Do not define for MinGW64. nt/preprep.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Do not define for MinGW64. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-03-26 13:45:01 +0000 +++ nt/ChangeLog 2013-03-26 14:26:24 +0000 @@ -1,5 +1,11 @@ 2013-03-26 Eli Zaretskii + * addsection.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Do not + define for MinGW64. + + * preprep.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Do not define + for MinGW64. + Fix more incompatibilities between MinGW.org and MinGW64 headers reported by Óscar Fuentes in http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00733.html === modified file 'nt/addsection.c' --- nt/addsection.c 2013-01-01 09:11:05 +0000 +++ nt/addsection.c 2013-03-26 14:26:24 +0000 @@ -25,7 +25,7 @@ #include #include #include -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(_W64) #define _ANONYMOUS_UNION #define _ANONYMOUS_STRUCT #endif === modified file 'nt/preprep.c' --- nt/preprep.c 2013-01-01 09:11:05 +0000 +++ nt/preprep.c 2013-03-26 14:26:24 +0000 @@ -25,7 +25,7 @@ #include #include #include -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(_W64) #define _ANONYMOUS_UNION #define _ANONYMOUS_STRUCT #endif ------------------------------------------------------------ revno: 112142 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-03-26 16:04:07 +0200 message: More MinGW64 fixes. src/w32.c Move inclusion of time.h before sys/time.h, so that MinGW64 could see its own definitions of 'struct timeval' and 'struct timezone'. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-26 13:47:58 +0000 +++ src/ChangeLog 2013-03-26 14:04:07 +0000 @@ -4,6 +4,8 @@ Define only for _WIN32_WINNT less than 0x0500. (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for MinGW64. + Move inclusion of time.h before sys/time.h, so that MinGW64 could + see its own definitions of 'struct timeval' and 'struct timezone'. Fix incompatibilities between MinGW.org and MinGW64 headers. * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined. === modified file 'src/w32.c' --- src/w32.c 2013-03-26 13:45:01 +0000 +++ src/w32.c 2013-03-26 14:04:07 +0000 @@ -29,10 +29,10 @@ #include #include #include +#include /* must be before nt/inc/sys/time.h, for MinGW64 */ #include #include #include -#include /* must include CRT headers *before* config.h */ ------------------------------------------------------------ revno: 112141 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-03-26 15:47:58 +0200 message: src/ChangeLog: Fix last log entry. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-26 13:45:01 +0000 +++ src/ChangeLog 2013-03-26 13:47:58 +0000 @@ -2,6 +2,8 @@ * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]: Define only for _WIN32_WINNT less than 0x0500. + (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for + MinGW64. Fix incompatibilities between MinGW.org and MinGW64 headers. * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined. ------------------------------------------------------------ revno: 112140 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-03-26 15:45:01 +0200 message: Fix more MinGW64 incompatibilities. Reported by ׃scar Fuentes in http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00733.html nt/inc/ms-w32.h (_WIN32_WINNT) [!_W64]: Don't define for MinGW64. nt/inc/sys/stat.h (chmod): Remove _CRTIMP from prototype. src/w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]: Define only for _WIN32_WINNT less than 0x0500. diff: === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-03-26 08:21:27 +0000 +++ nt/ChangeLog 2013-03-26 13:45:01 +0000 @@ -2,11 +2,15 @@ Fix more incompatibilities between MinGW.org and MinGW64 headers reported by Óscar Fuentes in + http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00733.html http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00699.html and in http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00707.html. * inc/ms-w32.h (USE_NO_MINGW_SETJMP_TWO_ARGS) [_W64]: Define to 1. For MinGW64, include sys/types.h and time.h. + (_WIN32_WINNT) [!_W64]: Don't define for MinGW64. + + * inc/sys/stat.h (chmod): Remove _CRTIMP from prototype. * inc/sys/time.h (struct timeval) [!_W64]: Guard definition with _W64. === modified file 'nt/inc/ms-w32.h' --- nt/inc/ms-w32.h 2013-03-26 08:21:27 +0000 +++ nt/inc/ms-w32.h 2013-03-26 13:45:01 +0000 @@ -129,9 +129,11 @@ /* Prevent accidental use of features unavailable in older Windows versions we still support. MinGW64 defines this to a higher value - in its system headers, so define our override before including any - system headers. */ -#define _WIN32_WINNT 0x0400 + in its system headers, and is not really compatible with values + lower than 0x0500, so leave it alone. */ +#ifndef _W64 +# define _WIN32_WINNT 0x0400 +#endif /* Make a leaner executable. */ #define WIN32_LEAN_AND_MEAN 1 === modified file 'nt/inc/sys/stat.h' --- nt/inc/sys/stat.h 2013-03-26 08:21:27 +0000 +++ nt/inc/sys/stat.h 2013-03-26 13:45:01 +0000 @@ -111,6 +111,6 @@ int __cdecl __MINGW_NOTHROW lstat (const char*, struct stat*); int __cdecl __MINGW_NOTHROW fstatat (int, char const *, struct stat *, int); -_CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int); +int __cdecl __MINGW_NOTHROW chmod (const char*, int); #endif /* INC_SYS_STAT_H_ */ === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-26 08:21:27 +0000 +++ src/ChangeLog 2013-03-26 13:45:01 +0000 @@ -1,5 +1,8 @@ 2013-03-26 Eli Zaretskii + * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]: + Define only for _WIN32_WINNT less than 0x0500. + Fix incompatibilities between MinGW.org and MinGW64 headers. * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined. === modified file 'src/w32.c' --- src/w32.c 2013-03-26 08:21:27 +0000 +++ src/w32.c 2013-03-26 13:45:01 +0000 @@ -69,7 +69,8 @@ #include #include -#ifdef __GNUC__ +/* MinGW64 (_W64) defines these in its _mingw.h. */ +#if defined(__GNUC__) && !defined(_W64) #define _ANONYMOUS_UNION #define _ANONYMOUS_STRUCT #endif @@ -96,6 +97,7 @@ #ifndef _MSC_VER #include #endif +#if _WIN32_WINNT < 0x0500 #if !defined (__MINGW32__) || __W32API_MAJOR_VERSION < 3 || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 15) /* This either is not in psapi.h or guarded by higher value of _WIN32_WINNT than what we use. w32api supplied with MinGW 3.15 @@ -114,6 +116,7 @@ SIZE_T PrivateUsage; } PROCESS_MEMORY_COUNTERS_EX,*PPROCESS_MEMORY_COUNTERS_EX; #endif +#endif #include #include ------------------------------------------------------------ revno: 112139 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-03-26 06:17:36 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2013-03-14 10:17:38 +0000 +++ autogen/config.in 2013-03-26 10:17:36 +0000 @@ -1106,6 +1106,9 @@ /* Define to 1 if XIM is available */ #undef HAVE_XIM +/* Define to 1 if you have the Xkb extension. */ +#undef HAVE_XKB + /* Define to 1 if you have the XkbGetKeyboard function. */ #undef HAVE_XKBGETKEYBOARD === modified file 'autogen/configure' --- autogen/configure 2013-03-18 10:17:40 +0000 +++ autogen/configure 2013-03-26 10:17:36 +0000 @@ -10636,6 +10636,9 @@ $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h + +$as_echo "#define HAVE_XKB 1" >>confdefs.h + fi for ac_func in XrmSetDatabase XScreenResourceString \ ------------------------------------------------------------ revno: 112138 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2013-03-26 10:21:27 +0200 message: Fix more incompatibilities between MinGW.org and MinGW64 headers Reported by ׃scar Fuentes in http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00699.html and in http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00707.html. nt/inc/ms-w32.h (USE_NO_MINGW_SETJMP_TWO_ARGS) [_W64]: Define to 1. For MinGW64, include sys/types.h and time.h. nt/inc/sys/time.h (struct timeval) [!_W64]: Guard definition with _W64. (struct timezone) [!_TIMEZONE_DEFINED]: Guard definition with _TIMEZONE_DEFINED. nt/addpm.c (_WIN32_IE) [_W64]: For MinGW64, don't define to 0x400. nt/inc/sys/stat.h: Remove _CRTIMP from prototypes of fstat, stat, lstat, and fstatat. lib-src/ntlib.c (struct timespec) [!_TIMEZONE_DEFINED]: Define the struct only if _TIMEZONE_DEFINED is not defined. src/w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined. src/w32.c (REPARSE_DATA_BUFFER): Guard with MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2013-03-23 15:30:38 +0000 +++ lib-src/ChangeLog 2013-03-26 08:21:27 +0000 @@ -1,3 +1,9 @@ +2013-03-26 Eli Zaretskii + + Fix incompatibilities between MinGW.org and MinGW64 headers. + * ntlib.c (struct timespec) [!_TIMEZONE_DEFINED]: Define the + struct only if _TIMEZONE_DEFINED is not defined. + 2013-03-23 cg (tiny change) * makefile.w32-in (LIB_SRC): Move before first use. === modified file 'lib-src/ntlib.c' --- lib-src/ntlib.c 2013-01-01 09:11:05 +0000 +++ lib-src/ntlib.c 2013-03-26 08:21:27 +0000 @@ -34,11 +34,15 @@ #include "ntlib.h" +/* MinGW64 defines _TIMEZONE_DEFINED and defines 'struct timespec' in + its system headers. */ +#ifndef _TIMEZONE_DEFINED struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ }; +#endif #define MAXPATHLEN _MAX_PATH === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-03-25 13:48:37 +0000 +++ nt/ChangeLog 2013-03-26 08:21:27 +0000 @@ -1,3 +1,23 @@ +2013-03-26 Eli Zaretskii + + Fix more incompatibilities between MinGW.org and MinGW64 headers + reported by Óscar Fuentes in + http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00699.html + and in + http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00707.html. + * inc/ms-w32.h (USE_NO_MINGW_SETJMP_TWO_ARGS) [_W64]: Define to 1. + For MinGW64, include sys/types.h and time.h. + + * inc/sys/time.h (struct timeval) [!_W64]: Guard definition with + _W64. + (struct timezone) [!_TIMEZONE_DEFINED]: Guard definition with + _TIMEZONE_DEFINED. + + * addpm.c (_WIN32_IE) [_W64]: For MinGW64, don't define to 0x400. + + * inc/sys/stat.h: Remove _CRTIMP from prototypes of fstat, stat, + lstat, and fstatat. + 2013-03-25 Eli Zaretskii Fix incompatibilities between MinGW.org and MinGW64 headers === modified file 'nt/addpm.c' --- nt/addpm.c 2013-01-01 09:11:05 +0000 +++ nt/addpm.c 2013-03-26 08:21:27 +0000 @@ -34,7 +34,11 @@ installed, then the DDE fallback for creating icons the Windows 3.1 progman way will be used instead, but that is prone to lockups caused by other applications not servicing their message queues. */ +/* MinGW64 defines _W64 and barfs if _WIN32_IE is defined to anything + below 0x500. */ +#ifndef _W64 #define _WIN32_IE 0x400 +#endif /* Request C Object macros for COM interfaces. */ #define COBJMACROS 1 === modified file 'nt/inc/ms-w32.h' --- nt/inc/ms-w32.h 2013-03-25 13:48:37 +0000 +++ nt/inc/ms-w32.h 2013-03-26 08:21:27 +0000 @@ -154,6 +154,14 @@ #ifdef emacs +#ifdef _W64 +/* MinGW64 specific stuff. */ +#define USE_NO_MINGW_SETJMP_TWO_ARGS 1 +/* Make sure 'struct timespec' and 'struct timezone' are defined. */ +#include +#include +#endif + #ifdef _MSC_VER #include #include === modified file 'nt/inc/sys/stat.h' --- nt/inc/sys/stat.h 2013-02-01 06:30:51 +0000 +++ nt/inc/sys/stat.h 2013-03-26 08:21:27 +0000 @@ -106,11 +106,11 @@ /* Prevent redefinition by other headers, e.g. wchar.h. */ #define _STAT_DEFINED -_CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*); +int __cdecl __MINGW_NOTHROW fstat (int, struct stat*); +int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); +int __cdecl __MINGW_NOTHROW lstat (const char*, struct stat*); +int __cdecl __MINGW_NOTHROW fstatat (int, char const *, + struct stat *, int); _CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int); -_CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); -_CRTIMP int __cdecl __MINGW_NOTHROW lstat (const char*, struct stat*); -_CRTIMP int __cdecl __MINGW_NOTHROW fstatat (int, char const *, - struct stat *, int); #endif /* INC_SYS_STAT_H_ */ === modified file 'nt/inc/sys/time.h' --- nt/inc/sys/time.h 2013-03-25 13:48:37 +0000 +++ nt/inc/sys/time.h 2013-03-26 08:21:27 +0000 @@ -6,31 +6,34 @@ * have the below stuff. */ +/* The guards are for MinGW64, which defines these structs on its + system headers which are included by ms-w32.h. */ +#ifndef _W64 struct timeval { long tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; +#endif +#ifndef _TIMEZONE_DEFINED struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ }; +#endif void gettimeofday (struct timeval *, struct timezone *); #define ITIMER_REAL 0 #define ITIMER_PROF 1 -/* MinGW64 defines 'struct itimerval' and _TIMESPEC_DEFINED in sys/types.h. */ -#ifndef _TIMESPEC_DEFINED struct itimerval { struct timeval it_interval; /* timer interval */ struct timeval it_value; /* current value */ }; -#endif int getitimer (int, struct itimerval *); int setitimer (int, struct itimerval *, struct itimerval *); === modified file 'src/ChangeLog' --- src/ChangeLog 2013-03-25 17:59:59 +0000 +++ src/ChangeLog 2013-03-26 08:21:27 +0000 @@ -1,3 +1,11 @@ +2013-03-26 Eli Zaretskii + + Fix incompatibilities between MinGW.org and MinGW64 headers. + * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined. + + * w32.c (REPARSE_DATA_BUFFER): Guard with + MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined. + 2013-03-25 Jan Djärv * xterm.c: Include X11/XKBlib.h === modified file 'src/w32.c' --- src/w32.c 2013-03-07 03:01:17 +0000 +++ src/w32.c 2013-03-26 08:21:27 +0000 @@ -127,7 +127,7 @@ #define SDDL_REVISION_1 1 #endif /* SDDL_REVISION_1 */ -#ifdef _MSC_VER +#ifndef MAXIMUM_REPARSE_DATA_BUFFER_SIZE /* MSVC doesn't provide the definition of REPARSE_DATA_BUFFER and the associated macros, except on ntifs.h, which cannot be included because it triggers conflicts with other Windows API headers. So === modified file 'src/w32term.c' --- src/w32term.c 2013-03-24 00:16:11 +0000 +++ src/w32term.c 2013-03-26 08:21:27 +0000 @@ -109,9 +109,10 @@ Lisp_Object w32_display_name_list; -#if _WIN32_WINNT < 0x0500 +#if _WIN32_WINNT < 0x0500 && !defined(_W64) /* Pre Windows 2000, this was not available, but define it here so - that Emacs compiled on such a platform will run on newer versions. */ + that Emacs compiled on such a platform will run on newer versions. + MinGW64 (_W64) defines these unconditionally, so avoid redefining. */ typedef struct tagWCRANGE { ------------------------------------------------------------ revno: 112137 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13951 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2013-03-25 23:38:18 -0400 message: * lisp/desktop.el (desktop--v2s): Rename from desktop-internal-v2s. Change return value to be a sexp. Delay `get-buffer' to after restoring the desktop. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-03-26 02:49:05 +0000 +++ lisp/ChangeLog 2013-03-26 03:38:18 +0000 @@ -1,3 +1,9 @@ +2013-03-26 Stefan Monnier + + * desktop.el (desktop--v2s): Rename from desktop-internal-v2s. + Change return value to be a sexp. Delay `get-buffer' to after + restoring the desktop (bug#13951). + 2013-03-26 Leo Liu * register.el: Move semantic tag handling back to === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-01-02 16:13:04 +0000 +++ lisp/desktop.el 2013-03-26 03:38:18 +0000 @@ -697,83 +697,69 @@ ll))) ;; ---------------------------------------------------------------------------- -(defun desktop-internal-v2s (value) - "Convert VALUE to a pair (QUOTE . TXT); (eval (read TXT)) gives VALUE. -TXT is a string that when read and evaluated yields VALUE. +(defun desktop--v2s (value) + "Convert VALUE to a pair (QUOTE . SEXP); (eval SEXP) gives VALUE. +SEXP is an sexp that when evaluated yields VALUE. QUOTE may be `may' (value may be quoted), `must' (value must be quoted), or nil (value must not be quoted)." (cond ((or (numberp value) (null value) (eq t value) (keywordp value)) - (cons 'may (prin1-to-string value))) + (cons 'may value)) ((stringp value) (let ((copy (copy-sequence value))) (set-text-properties 0 (length copy) nil copy) - ;; Get rid of text properties because we cannot read them - (cons 'may (prin1-to-string copy)))) + ;; Get rid of text properties because we cannot read them. + (cons 'may copy))) ((symbolp value) - (cons 'must (prin1-to-string value))) + (cons 'must value)) ((vectorp value) - (let* ((special nil) - (pass1 (mapcar - (lambda (el) - (let ((res (desktop-internal-v2s el))) - (if (null (car res)) - (setq special t)) - res)) - value))) + (let* ((pass1 (mapcar #'desktop--v2s value)) + (special (assq nil pass1))) (if special - (cons nil (concat "(vector " - (mapconcat (lambda (el) - (if (eq (car el) 'must) - (concat "'" (cdr el)) - (cdr el))) - pass1 - " ") - ")")) - (cons 'may (concat "[" (mapconcat 'cdr pass1 " ") "]"))))) + (cons nil `(vector + ,@(mapcar (lambda (el) + (if (eq (car el) 'must) + `',(cdr el) (cdr el))) + pass1))) + (cons 'may `[,@(mapcar #'cdr pass1)])))) ((consp value) (let ((p value) newlist use-list* anynil) (while (consp p) - (let ((q.txt (desktop-internal-v2s (car p)))) - (or anynil (setq anynil (null (car q.txt)))) - (setq newlist (cons q.txt newlist))) + (let ((q.sexp (desktop--v2s (car p)))) + (push q.sexp newlist)) (setq p (cdr p))) - (if p - (let ((last (desktop-internal-v2s p))) - (or anynil (setq anynil (null (car last)))) - (or anynil - (setq newlist (cons '(must . ".") newlist))) - (setq use-list* t) - (setq newlist (cons last newlist)))) - (setq newlist (nreverse newlist)) - (if anynil + (when p + (let ((last (desktop--v2s p))) + (setq use-list* t) + (push last newlist))) + (if (assq nil newlist) (cons nil - (concat (if use-list* "(desktop-list* " "(list ") - (mapconcat (lambda (el) - (if (eq (car el) 'must) - (concat "'" (cdr el)) - (cdr el))) - newlist - " ") - ")")) + `(,(if use-list* 'desktop-list* 'list) + ,@(mapcar (lambda (el) + (if (eq (car el) 'must) + `',(cdr el) (cdr el))) + (nreverse newlist)))) (cons 'must - (concat "(" (mapconcat 'cdr newlist " ") ")"))))) + `(,@(mapcar #'cdr + (nreverse (if use-list* (cdr newlist) newlist))) + ,@(if use-list* (cdar newlist))))))) ((subrp value) - (cons nil (concat "(symbol-function '" - (substring (prin1-to-string value) 7 -1) - ")"))) + (cons nil `(symbol-function + ',(intern-soft (substring (prin1-to-string value) 7 -1))))) ((markerp value) - (let ((pos (prin1-to-string (marker-position value))) - (buf (prin1-to-string (buffer-name (marker-buffer value))))) - (cons nil (concat "(let ((mk (make-marker)))" - " (add-hook 'desktop-delay-hook" - " (list 'lambda '() (list 'set-marker mk " - pos " (get-buffer " buf ")))) mk)")))) - (t ; save as text - (cons 'may "\"Unprintable entity\"")))) + (let ((pos (marker-position value)) + (buf (buffer-name (marker-buffer value)))) + (cons nil + `(let ((mk (make-marker))) + (add-hook 'desktop-delay-hook + `(lambda () + (set-marker ,mk ,,pos (get-buffer ,,buf)))) + mk)))) + (t ; Save as text. + (cons 'may "Unprintable entity")))) ;; ---------------------------------------------------------------------------- (defun desktop-value-to-string (value) @@ -781,9 +767,11 @@ Not all types of values are supported." (let* ((print-escape-newlines t) (float-output-format nil) - (quote.txt (desktop-internal-v2s value)) - (quote (car quote.txt)) - (txt (cdr quote.txt))) + (quote.sexp (desktop--v2s value)) + (quote (car quote.sexp)) + (txt + (let ((print-quoted t)) + (prin1-to-string (cdr quote.sexp))))) (if (eq quote 'must) (concat "'" txt) txt)))